<inp2:adm_SetPopupSize width="780" height="670"/>

<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_export"/>

<!-- 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() {

						document.getElementById('hidden_export_columns').value = select_to_string('<inp2:p.export_InputName field="ExportColumns"/>');
						submit_event('p.export','OnExportBegin');

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

				a_toolbar.Render();
			</script>
		</td>
	</tr>
</tbody>
</table>


<inp2:p.export_SaveWarning name="grid_save_warning"/>
<inp2:p.export_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_radio" prefix="p.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
			<inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
			<inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>

			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>

			<inp2:m_RenderElement design="form_row" prefix="p.export" field="ExportColumns" title="la_fld_ExportColumns">
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td>
								<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:p.export_InputName field="ExportColumns"/>', 1)" class="button">
								<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:p.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
								<img src="img/spacer.gif" width="1" height="5" alt=""><br />
							</td>
							<td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
							<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
						</tr>
						<tr>
							<td>
								<select multiple id="<inp2:p.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
									<inp2:p.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
								</select>
								<input type="hidden" id="hidden_export_columns" name="<inp2:p.export_InputName field="ExportColumns"/>" value="<inp2:p.export_Field field="ExportColumns"/>" />
							</td>
							<td align="center">
								<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:p.export_InputName field="AvailableColumns"/>', '<inp2:p.export_InputName field="ExportColumns"/>')" class="button"><br>
								<img src="img/spacer.gif" width="1" height="4" alt=""><br>
								<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('<inp2:p.export_InputName field="ExportColumns"/>', '<inp2:p.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.export_InputName field="AvailableColumns"/>');" class="button">
							</td>
							<td>
								<select multiple id="<inp2:p.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
									<inp2:p.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
								</select>
							</td>
						</tr>
					</table>
				</td>
			</inp2:m_RenderElement>

			<inp2:m_RenderElement design="form_row" prefix="p.export" field="CategoryFormat" title="la_fld_CategoryFormat">
				<td class="control-cell">
					<table cellspacing="0" cellpadding="0">
						<tr>
							<td rowspan="2" valign="top">
								<input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="1"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_1" value="1" />
							</td>
							<td>
								<label for="<inp2:p.export_InputName field="CategoryFormat"/>_1"><inp2:m_phrase label="la_MixedCategoryPath"/></label>
							</td>
						</tr>
						<tr>
							<td>
								<span class="<inp2:m_if check="p.export_HasError" field="CategorySeparator">error</inp2:m_if>"><inp2:m_phrase name="la_fld_CategorySeparator"/></span><inp2:m_if check="p.export_IsRequired" field="CategorySeparator"><span class="error"> *</span></inp2:m_if>:
								 <input type="text" name="<inp2:p.export_InputName field="CategorySeparator"/>" id="<inp2:p.export_InputName field="CategorySeparator"/>" value="<inp2:p.export_Field field="CategorySeparator"/>" size="2" maxlength="1" /><br />
								(will look like "Category:Sub-category:Sub-sub-category")

							</td>
						</tr>

						<tr>
							<td rowspan="2" valign="top">
								<input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="2"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_2" value="2" />
							</td>
							<td>
								<label for="<inp2:p.export_InputName field="CategoryFormat"/>_2"><inp2:m_phrase label="la_SeparatedCategoryPath"/></label><br />
								(the fields will be titled Category1..CategoryN accordingly)
							</td>
						</tr>
					</table>
				</td>
			</inp2:m_RenderElement>

			<inp2:m_if check="m_GetEquals" name="m_cat_id" value="0" inverse="inverse">
				<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IsBaseCategory" title="la_fld_IsBaseCategory" />
			</inp2:m_if>

			<inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
		<inp2:m_RenderElement name="inp_edit_filler"/>
	</table>
</div>

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