<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_messages_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('emailmessages','<inp2:m_if check="emailmessages_PropertyEquals" property="ID" value="0" >OnCreate<inp2:m_else/>OnUpdate</inp2:m_if>');
						}
					) );

				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
							submit_event('emailmessages','OnCancel');
						}
				 ) );

				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" 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="Type" title="!la_fld_EventType!"/> -->
			<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!" allow_html="0" 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" prefix="emailmessages" field="Body" title="!la_fld_MessageBody!" control_options="{min_height: 200}" rows="20" cols="85"/>
	</table>
</div>

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