<inp2:adm_SetPopupSize width="950" height="700"/>

<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:emaillog" prefix="email-log" title_preset="email_log_edit"/>

<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
	<tr>
		<td>
			<script type="text/javascript">
				a_toolbar = new ToolBar();

				<inp2:m_RenderElement design="toolbar_button" icon="cancel" title="la_ToolTip_Close">
					submit_event('email-log', 'OnGoBack');
				</inp2:m_RenderElement>

				a_toolbar.AddButton( new ToolBarSeparator('sep1') );

				<inp2:m_RenderElement design="toolbar_button" icon="prev" title="la_ToolTip_Prev">
					go_to_id('email-log', '<inp2:email-log_PrevId/>');
				</inp2:m_RenderElement>

				<inp2:m_RenderElement design="toolbar_button" icon="next" title="la_ToolTip_Next">
					go_to_id('email-log', '<inp2:email-log_NextId/>');
				</inp2:m_RenderElement>

				a_toolbar.Render();

				<inp2:m_if check="email-log_IsSingle">
					a_toolbar.HideButton('prev');
					a_toolbar.HideButton('next');
					a_toolbar.HideButton('sep1');
				<inp2:m_else/>
					<inp2:m_if check="email-log_IsLast">a_toolbar.DisableButton('next');</inp2:m_if>
					<inp2:m_if check="email-log_IsFirst">a_toolbar.DisableButton('prev');</inp2:m_if>
				</inp2:m_if>
			</script>
		</td>
	</tr>
</tbody>
</table>

<inp2:email-log_SaveWarning name="grid_save_warning"/>
<inp2:email-log_ErrorWarning name="form_error_warning"/>

<div id="scroll_container">
	<table class="edit-form">
		<inp2:m_RenderElement name="inp_id_label" prefix="email-log" field="EmailLogId" title="la_fld_Id"/>

		<inp2:m_if check="email-log_Field" name="EventName" db="db">
			<inp2:m_RenderElement name="inp_label" prefix="email-log" field="EventName" title="la_fld_Event"/>
		</inp2:m_if>

		<inp2:m_RenderElement name="inp_label" prefix="email-log" field="From" title="la_fld_Sender"/>
		<inp2:m_RenderElement name="inp_label" prefix="email-log" field="To" title="la_fld_Recipient"/>

		<inp2:m_DefineElement name="recipient_element">
			<inp2:m_Param name="recipient_name"/> &lt;<inp2:m_Param name="recipient_email"/>&gt;
			<inp2:m_ifnot check="m_Param" name="is_last">; </inp2:m_ifnot>
		</inp2:m_DefineElement>

		<inp2:m_DefineElement name="recipient_type_element">
			<strong><inp2:RecipientType/>:</strong> <inp2:RecipientsByType render_as="recipient_element" strip_nl="2"/>
		</inp2:m_DefineElement>

		<inp2:m_RenderElement design="form_row" prefix="email-log" field="OtherRecipients">
			<td class="control-cell" valign="top">
				<inp2:$prefix_PrintOtherRecipients render_as="recipient_type_element"/>
			</td>
		</inp2:m_RenderElement>

		<inp2:m_RenderElement name="inp_label" prefix="email-log" field="Subject"/>

		<inp2:m_RenderElement design="form_row" prefix="email-log" field="HtmlBody" title="la_fld_HtmlVersion">
			<td class="control-cell" valign="top">
				<iframe src="<inp2:m_Link {$prefix}_event='OnGetHtmlBody' pass='m,$prefix'/>" style="border: 1px solid black;" width="640" height="250" align="left">
					You browser doesn't support frames!
				</iframe>
			</td>
		</inp2:m_RenderElement>

		<inp2:m_RenderElement design="form_row" prefix="email-log" field="TextBody" title="la_fld_TextVersion">
			<td class="control-cell" valign="top">
				<div style="border: 1px solid black; width: 624px; height: 234px; padding: 8px; font-family: serif; font-size: 16px;">
					<inp2:$prefix_Field name="$field" nl2br="1"/>
				</div>
			</td>
		</inp2:m_RenderElement>

		<inp2:m_RenderElement name="inp_label" prefix="email-log" field="SentOn"/>

		<!--##
			<inp2:m_RenderElement name="inp_label" prefix="email-log" field="EventParams"/>
			<inp2:m_RenderElement name="inp_label" prefix="email-log" field="AccessKey"/>
		##-->

		<inp2:m_RenderElement name="inp_edit_filler"/>
	</table>
</div>

<inp2:m_include t="incs/footer"/>