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

<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:configemail" prefix="emailmessages" title_preset="email_messages_edit_direct"/>

<!-- 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('emailmessages','<inp2:emailmessages_SaveEvent/>');
						}
					) );

				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
							cancel_edit('emailmessages','OnCancelEdit','<inp2:emailmessages_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('emailmessages', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
					}
			 	) );

				a_toolbar.Render();

			</script>
		</td>
	</tr>
</tbody>
</table>

<inp2:emailmessages_SaveWarning name="grid_save_warning"/>
<inp2:emailmessages_ErrorWarning name="form_error_warning"/>

<div id="scroll_container">
	<table class="edit-form">
		<inp2:m_RenderElement name="subsection" prefix="emailmessages" fields="Description,Subject,MessageType,Headers" title="!la_section_General!"/>
			<inp2:m_RenderElement name="inp_edit_hidden" prefix="emailmessages" field="LanguageId"/>
			<inp2:m_RenderElement name="inp_edit_hidden" prefix="emailmessages" field="EventId"/>

			<inp2:m_RenderElement name="inp_label" prefix="emailmessages" field="Description" title="!la_fld_Description!" as_label="1"/>

			<inp2:m_RenderElement name="inp_edit_box" prefix="emailmessages" field="Subject" title="!la_fld_Subject!" size="60"/>

			<inp2:m_RenderElement name="inp_edit_radio" prefix="emailmessages" field="MessageType" title="!la_fld_MessageType!"/>
			<inp2:m_RenderElement name="inp_edit_textarea" prefix="emailmessages" field="Headers" title="!la_fld_ExtraHeaders!" control_options="{max_height: 50}"/>

		<inp2:m_RenderElement name="subsection" prefix="emailmessages" fields="Body" title="!la_section_Message!"/>

		<inp2:m_RenderElement name="inp_edit_fck" prefix="emailmessages" field="Body" title="!la_fld_ExtraHeaders!" rows="5" cols="60" 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"/>