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

<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="lang" section="in-portal:configure_lang" title_preset="languages_edit_general" 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('lang','<inp2:lang_SaveEvent/>');
						}
					) );
				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
							submit_event('lang','OnCancelEdit');
						}
				 ) );

				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('lang', '<inp2:lang_PrevId/>');
						}
				 ) );
				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
							go_to_id('lang', '<inp2:lang_NextId/>');
						}
				 ) );



				a_toolbar.Render();

				<inp2:m_if check="lang_IsSingle" >
					a_toolbar.HideButton('prev');
					a_toolbar.HideButton('next');
					a_toolbar.HideButton('sep1');
				<inp2:m_else/>
					<inp2:m_if check="lang_IsLast" >
						a_toolbar.DisableButton('next');
					</inp2:m_if>
					<inp2:m_if check="lang_IsFirst" >
						a_toolbar.DisableButton('prev');
					</inp2:m_if>
				</inp2:m_if>
			</script>
		</td>
	</tr>
</tbody>
</table>

<inp2:lang_SaveWarning name="grid_save_warning"/>
<inp2:lang_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_id_label" prefix="lang" field="LanguageId"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="PackName"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="LocalName"/>

			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputDateFormat"/>
			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputTimeFormat"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="DateFormat"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="ShortDateFormat"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="TimeFormat"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="ShortTimeFormat"/>

			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="DecimalPoint"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="ThousandSep"/>
			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="PrimaryLang"/>
			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="AdminInterfaceLang"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="Priority"/>
			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="Enabled"/>
			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="UnitSystem"/>
			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="Locale" has_empty="1"/>

			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconURL"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconDisabledURL"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="UserDocsUrl"/>

			<inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="FilenameReplacements" control_options="{min_height: 200}" cols="50" rows="10"/>

			<inp2:m_if check="lang_IsNewMode">
				<inp2:m_if check="lang_FieldVisible" field="CopyLabels">
					<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
						<inp2:m_inc param="tab_index" by="1"/>
						<td class="label-cell">
							<inp2:m_phrase name="la_fld_CopyLabels"/>:
						</td>
						<td class="control-mid">&nbsp;</td>
						<td class="control-cell">
							<input type="hidden" id="<inp2:lang_InputName field="CopyLabels"/>" name="<inp2:lang_InputName field="CopyLabels"/>" value="<inp2:lang_Field field="CopyLabels" db="db"/>">
							<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_CopyLabels" name="_cb_CopyLabels" <inp2:lang_Field field="CopyLabels" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:lang_InputName field="CopyLabels"/>'))">

							<inp2:m_inc param="tab_index" by="1"/>
							<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lang_InputName field="CopyFromLanguage"/>" id="<inp2:lang_InputName field="CopyFromLanguage"/>">
								<option value="0">--<inp2:m_phrase name="la_prompt_Select_Source"/></option>
								<inp2:lang_PredefinedOptions field="CopyFromLanguage" block="inp_option_item" selected="selected"/>
							</select>
						</td>
					</tr>
				</inp2:m_if>
			</inp2:m_if>

			<inp2:m_RenderElement name="inp_edit_checkboxes" prefix="lang" field="SynchronizationModes"/>

		<inp2:m_RenderElement name="subsection" title="la_section_EmailDesignTemplates"/>
			<inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="HtmlEmailTemplate" title="la_fld_HtmlEmailTemplate" control_options="{min_height: 200}" style="width: 100%; height: 200px;"/>
			<inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="TextEmailTemplate" title="la_fld_TextEmailTemplate" control_options="{min_height: 200}" style="width: 100%; height: 200px;"/>

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

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