<inp2:adm_SetPopupSize width="827" height="600"/>

<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="lang" section="in-portal:configure_lang" title_preset="email_template_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();
				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() {
							submit_event('email-template','OnCancel');
						}
				 ) );

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

				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_if check="email-template_IsSingle">
					a_toolbar.HideButton('prev');
					a_toolbar.HideButton('next');
					a_toolbar.HideButton('sep1');
				<inp2:m_else/>
					<inp2:m_if check="email-template_IsLast">
						a_toolbar.DisableButton('next');
					</inp2:m_if>
					<inp2:m_if check="email-template_IsFirst">
						a_toolbar.DisableButton('prev');
					</inp2:m_if>
				</inp2:m_if>
			</script>
		</td>
	</tr>
</tbody>
</table>

<inp2:email-template_SaveWarning name="grid_save_warning"/>
<inp2:email-template_ErrorWarning name="form_error_warning"/>
<input type="hidden" name="regional" value="<inp2:m_Get name='regional'/>"/>

<div id="scroll_container">
	<table class="edit-form">
		<inp2:m_RenderElement name="subsection" title="la_section_General"/>
			<inp2:m_RenderElement name="inp_id_label" prefix="email-template" field="TemplateId" title="la_fld_Id"/>
			<!--## <inp2:m_RenderElement name="inp_label" prefix="email-template" field="Type" title="la_fld_Type"/> ##-->

			<inp2:lang_Field name="LanguageId" result_to_var="language_id"/>
			<inp2:m_RenderElement name="inp_edit_box_ml" prefix="email-template" field="l{$language_id}_Subject" title="la_fld_Subject" size="60"/>
			<inp2:m_RenderElement name="inp_edit_textarea" prefix="email-template" field="Headers" title="la_fld_ExtraHeaders" control_options="{min_height: 50}" rows="3" cols="60"/>

		<inp2:m_RenderElement name="subsection" title="la_section_Message"/>
			<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="email-template" field="l{$language_id}_HtmlBody" title="la_fld_HtmlVersion" control_options="{min_height: 200}" rows="20" cols="85"/>
			<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="email-template" field="l{$language_id}_PlainTextBody" title="la_fld_TextVersion" control_options="{min_height: 200}" rows="20" cols="85"/>
		<inp2:m_RenderElement name="inp_edit_filler"/>
	</table>
</div>

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