<inp2:adm_SetPopupSize width="875" height="650"/>

<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="email-template" title_preset="email_template_edit" tab_preset="Default"/>

<!-- 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();
				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
							submit_event('email-template','<inp2:email-template_SaveEvent/>');
						}
					) );

				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
							cancel_edit('email-template','OnCancelEdit','<inp2:email-template_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
						}
				 ) );


				a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
						reset_form('email-template', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
					}
			 	) );

			 	<inp2:m_if check="email-template_IsSingle" inverse="inverse">
					a_toolbar.AddButton( new ToolBarSeparator('sep1') );
				</inp2:m_if>

				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
							go_to_id('email-template', '<inp2:email-template_PrevId/>');
						}
				 ) );
				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
							go_to_id('email-template', '<inp2:email-template_NextId/>');
						}
				 ) );

				a_toolbar.Render();

				<inp2:m_RenderElement name="edit_navigation" prefix="email-template"/>
			</script>
		</td>

		<inp2:m_RenderElement name="ml_selector" prefix="email-template"/>
	</tr>
</tbody>
</table>

<inp2:email-template_SaveWarning name="grid_save_warning"/>
<inp2:email-template_ErrorWarning name="form_error_warning"/>

<div id="scroll_container">
	<table class="edit-form">
		<inp2:m_RenderElement name="subsection" prefix="email-template" fields="TemplateId,Description,Subject" title="la_section_General"/>
			<inp2:m_RenderElement name="inp_id_label" prefix="email-template" field="TemplateId" title="la_fld_Id"/>

			<inp2:m_if check="m_IsDebugMode">
				<inp2:m_RenderElement name="inp_edit_box" prefix="email-template" field="TemplateName"/>
			<inp2:m_else/>
				<inp2:m_RenderElement name="inp_label" prefix="email-template" field="TemplateName"/>
			</inp2:m_if>

			<inp2:m_RenderElement name="inp_label" prefix="email-template" field="Description" title="la_fld_Description"/>
			<inp2:m_RenderElement name="inp_edit_box_ml" prefix="email-template" field="Subject" format="no_default" title="la_fld_Subject"/>

		<inp2:m_RenderElement name="subsection" prefix="email-template" fields="HtmlBody,PlainTextBody" title="la_section_Message"/>
			<inp2:m_if check="m_IsDebugMode">
				<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="email-template" field="HtmlBody" format="no_default" title="la_fld_HtmlVersion" control_options="{min_height: 200}"/>
			<inp2:m_else/>
				<inp2:m_RenderElement name="inp_edit_fck" prefix="email-template" field="HtmlBody" format="no_default" title="la_fld_HtmlVersion" rows="5" cols="60" control_options="{min_height: 200}"/>
			</inp2:m_if>

			<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="email-template" field="PlainTextBody" format="no_default" title="la_fld_TextVersion" control_options="{min_height: 200}"/>
		<inp2:m_RenderElement name="inp_edit_filler" control_options="{max_height: 8}"/>
	</table>
</div>

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