Index: core/admin_templates/incs/form_blocks.tpl =================================================================== --- core/admin_templates/incs/form_blocks.tpl +++ core/admin_templates/incs/form_blocks.tpl @@ -1277,3 +1277,125 @@ <span id="error_msg_<inp2:m_Param name='prefix'/>" style="font-weight: bold;"><br/></span> </inp2:m_RenderElement> </inp2:m_DefineElement> + +<inp2:m_DefineElement name="inp_edit_export_presets"> + <inp2:m_RenderElement design="form_row" prefix="$prefix" field="ExportPresets" title="la_fld_ExportPresets"> + <td class="control-cell"> + <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:$prefix_InputName field="ExportPresets"/>" id="<inp2:$prefix_InputName field="ExportPresets"/>" onchange="update_fields(this.value)"> + <inp2:$prefix_PredefinedOptions field="ExportPresets" block="inp_option_item" selected="selected"/> + </select> + + <input class="button" type="button" value="<inp2:m_Phrase label="la_Text_Delete"/>" onclick="delete_preset()"> + + <script type="text/javascript" src="incs/ajax.js"></script> + <script type="text/javascript"> + var delete_busy = false; + + function delete_preset() + { + if (!confirm('<inp2:m_Phrase label="la_ConfirmDeleteExportPreset" js_escape="1"/>')) return; + var $kf = document.getElementById('kernel_form'); + tmp = $kf.elements['events[<inp2:m_param name="prefix"/>]'].value; + $kf.elements['events[<inp2:m_param name="prefix"/>]'].value = 'OnDeleteExportPreset'; + Request.method = 'POST'; + Request.params = Request.serializeForm($kf); + $kf.elements['events[<inp2:m_param name="prefix"/>]'].value = tmp; + Request.makeRequest('<inp2:m_t ajax="1" {$prefix}_event="OnDeleteExportPreset" no_amp="1" js_escape="1"/>', delete_busy, '', function() { + presets = document.getElementById('<inp2:$prefix_InputName field="ExportPresets"/>'); + + for (i=0; i< presets.options.length; i++) { + if (presets.options[i].selected) { + presets.options.remove[i]; + } + } + presets.options[0].selected = true; + }, function() {alert('error')} ); + } + + function update_preset_field(status) + { + if (status) { + presets = document.getElementById('<inp2:$prefix_InputName field="ExportPresets"/>'); + if ( presets.value != '' ) { + for (i=0; i< presets.options.length; i++) { + if (presets.options[i].selected) { + preset_name = presets.options[i].text + } + } + document.getElementById('<inp2:$prefix_InputName field="ExportPresetName"/>').value = preset_name; + } + } + document.getElementById('<inp2:$prefix_InputName field="ExportPresetName"/>').disabled = !status; + } + + function update_fields(preset) + { + $export = select_to_string(document.getElementById('<inp2:$prefix_InputName field="ExportColumns"/>')); + if ($export != '') { + string_to_selected($export, document.getElementById('<inp2:$prefix_InputName field="ExportColumns"/>')); + move_selected('<inp2:$prefix_InputName field="ExportColumns"/>', '<inp2:$prefix_InputName field="AvailableColumns"/>'); + } + + av = document.getElementById('<inp2:$prefix_InputName field="AvailableColumns"/>'); + fields = preset.split('|'); + + for (var i=0; i<fields.length; i++) { + fld = fields[i]; + var $cur = null; + for (var $i = 0; $i < av.length; $i++) + { + cur = av.options[$i]; + if (cur.value == fld) { + av.options[$i].selected = true; + move_selected('<inp2:$prefix_InputName field="AvailableColumns"/>', '<inp2:$prefix_InputName field="ExportColumns"/>'); + } + else { + av.options[$i].selected = false; + } + } + } + } + + $(document).ready( + function () { + update_preset_field(document.getElementById('<inp2:$prefix_InputName field="ExportPresetName"/>').checked); + } + ); + </script> + </td> + </inp2:m_RenderElement> + + <inp2:m_RenderElement design="form_row" prefix="$prefix" 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:$prefix_InputName field='ExportColumns'/>', 1)" class="button"> + <input type="button" value="<inp2:m_phrase name='la_btn_Down'/>" onclick="move_options_down('<inp2:$prefix_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:$prefix_InputName field='ExportColumns'/>" size="15" style="width: 225px;"> + <inp2:$prefix_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/> + </select> + <input type="hidden" id="hidden_export_columns" name="<inp2:$prefix_InputName field='ExportColumns'/>" value="<inp2:$prefix_Field field='ExportColumns'/>" /> + </td> + <td align="center"> + <input type="button" value=" «« " onclick="move_selected('<inp2:$prefix_InputName field='AvailableColumns'/>', '<inp2:$prefix_InputName field='ExportColumns'/>')" class="button"><br> + <img src="img/spacer.gif" width="1" height="4" alt=""><br> + <input type="button" value=" »» " onclick="move_selected('<inp2:$prefix_InputName field='ExportColumns'/>', '<inp2:$prefix_InputName field='AvailableColumns'/>'); select_sort('<inp2:$prefix_InputName field='AvailableColumns'/>');" class="button"> + </td> + <td> + <select multiple id="<inp2:$prefix_InputName field='AvailableColumns'/>" size="15" style="width: 225px;"> + <inp2:$prefix_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/> + </select> + </td> + </tr> + </table> + </td> + </inp2:m_RenderElement> +</inp2:m_DefineElement> Index: modules/in-commerce/admin_templates/export.tpl =================================================================== --- modules/in-commerce/admin_templates/export.tpl +++ modules/in-commerce/admin_templates/export.tpl @@ -44,40 +44,7 @@ <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=" «« " 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=" »» " 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 name="inp_edit_export_presets" prefix="p.export"/> <inp2:m_RenderElement design="form_row" prefix="p.export" field="CategoryFormat" title="la_fld_CategoryFormat"> <td class="control-cell"> @@ -116,9 +83,12 @@ <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_checkbox" prefix="p.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/> + <inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" /> + <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"/> \ No newline at end of file +<inp2:m_include t="incs/footer"/> Index: modules/in-commerce/admin_templates/orders/export/export.tpl =================================================================== --- modules/in-commerce/admin_templates/orders/export/export.tpl +++ modules/in-commerce/admin_templates/orders/export/export.tpl @@ -42,51 +42,8 @@ <inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/> <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/> - - <inp2:m_RenderElement design="form_row" prefix="ord.export" field="ExportPresets" title="la_fld_ExportPresets"> - <td class="control-cell"> - <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:ord.export_InputName field="ExportPresets"/>" id="<inp2:ord.export_InputName field="ExportPresets"/>" onchange="update_fields(this.value)"> - <inp2:ord.export_PredefinedOptions field="ExportPresets" block="inp_option_item" selected="selected"/> - </select> - - <input class="button" type="button" value="<inp2:m_Phrase label="la_Text_Delete"/>" onclick="delete_preset()"> - </td> - </inp2:m_RenderElement> - - <inp2:m_RenderElement design="form_row" prefix="ord.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:ord.export_InputName field="ExportColumns"/>', 1)" class="button"> - <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button"><br /> - <img src="img/s.gif" width="1" height="5" alt=""><br /> - </td> - <td><img src="img/s.gif" width="45" height="1" alt=""><br></td> - <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td> - </tr> - <tr> - <td> - <select multiple id="<inp2:ord.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;"> - <inp2:ord.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/> - </select> - <input type="hidden" id="hidden_export_columns" name="<inp2:ord.export_InputName field="ExportColumns"/>" value="<inp2:ord.export_Field field="ExportColumns"/>" /> - </td> - <td align="center"> - <input type="button" value=" «« " onclick="move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>')" class="button"><br> - <img src="img/s.gif" width="1" height="4" alt=""><br> - <input type="button" value=" »» " onclick="move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:ord.export_InputName field="AvailableColumns"/>');" class="button"> - </td> - <td> - <select multiple id="<inp2:ord.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;"> - <inp2:ord.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/> - </select> - </td> - </tr> - </table> - </td> - </inp2:m_RenderElement> - + <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/> + <inp2:m_RenderElement name="inp_edit_export_presets" prefix="ord.export"/> <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/> <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" /> @@ -95,77 +52,4 @@ </table> </div> -<script type="text/javascript" src="incs/ajax.js"></script> -<script type="text/javascript"> - var delete_busy = false; - - function delete_preset() - { - if (!confirm('<inp2:m_Phrase label="la_ConfirmDeleteExportPreset" js_escape="1"/>')) return; - var $kf = document.getElementById('kernel_form'); - tmp = $kf.elements['events[ord.export]'].value; - $kf.elements['events[ord.export]'].value = 'OnDeleteExportPreset'; - Request.method = 'POST'; - Request.params = Request.serializeForm($kf); - $kf.elements['events[ord.export]'].value = tmp; - Request.makeRequest('<inp2:m_t ajax="1" ord.export_event="OnDeleteExportPreset" no_amp="1" js_escape="1"/>', delete_busy, '', function() { - presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>'); - - for (i=0; i< presets.options.length; i++) { - if (presets.options[i].selected) { - presets.options.remove[i]; - } - } - presets.options[0].selected = true; - }, function() {alert('error')} ); - } - - function update_preset_field(status) - { - if (status) { - presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>'); - if ( presets.value != '' ) { - for (i=0; i< presets.options.length; i++) { - if (presets.options[i].selected) { - preset_name = presets.options[i].text - } - } - document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').value = preset_name; - } - } - document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').disabled = !status; - } - - function update_fields(preset) - { - $export = select_to_string(document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>')); - if ($export != '') { - string_to_selected($export, document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>')); - move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>'); - } - - av = document.getElementById('<inp2:ord.export_InputName field="AvailableColumns"/>'); - fields = preset.split('|'); - - for (var i=0; i<fields.length; i++) { - fld = fields[i]; - var $cur = null; - for (var $i = 0; $i < av.length; $i++) - { - cur = av.options[$i]; - if (cur.value == fld) { - av.options[$i].selected = true; - move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>'); - } - else { - av.options[$i].selected = false; - } - } - } - } - - update_preset_field(document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').checked) - -</script> - -<inp2:m_include t="incs/footer"/> \ No newline at end of file +<inp2:m_include t="incs/footer"/> Index: modules/in-commerce/units/products/products_config.php =================================================================== --- modules/in-commerce/units/products/products_config.php +++ modules/in-commerce/units/products/products_config.php @@ -629,6 +629,20 @@ 'LocalImage' => Array ('type' => 'string', 'default' => ''), 'LocalPath' => Array ('type' => 'string', 'default' => ''), 'FullUrl' => Array ('type' => 'string', 'default' => ''), + + // For export. + 'ExportPresets' => array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => array(), + 'default' => '', + ), + 'ExportSavePreset' => array( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => array(0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'default' => 0, + ), + 'ExportPresetName' => array('type' => 'string', 'default' => ''), ), 'Grids' => Array ( Index: modules/in-link/admin_templates/export.tpl =================================================================== --- modules/in-link/admin_templates/export.tpl +++ modules/in-link/admin_templates/export.tpl @@ -42,40 +42,7 @@ <inp2:m_RenderElement name="inp_edit_radio" prefix="l.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/> <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/> - - <inp2:m_RenderElement design="form_row" prefix="l.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:l.export_InputName field="ExportColumns"/>', 1)" class="button"> - <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:l.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:l.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;"> - <inp2:l.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/> - </select> - <input type="hidden" id="hidden_export_columns" name="<inp2:l.export_InputName field="ExportColumns"/>" value="<inp2:l.export_Field field="ExportColumns"/>" /> - </td> - <td align="center"> - <input type="button" value=" «« " onclick="move_selected('<inp2:l.export_InputName field="AvailableColumns"/>', '<inp2:l.export_InputName field="ExportColumns"/>')" class="button"><br> - <img src="img/spacer.gif" width="1" height="4" alt=""><br> - <input type="button" value=" »» " onclick="move_selected('<inp2:l.export_InputName field="ExportColumns"/>', '<inp2:l.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:l.export_InputName field="AvailableColumns"/>');" class="button"> - </td> - <td> - <select multiple id="<inp2:l.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;"> - <inp2:l.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/> - </select> - </td> - </tr> - </table> - </td> - </inp2:m_RenderElement> + <inp2:m_RenderElement name="inp_edit_export_presets" prefix="l.export"/> <inp2:m_RenderElement design="form_row" prefix="l.export" field="CategoryFormat" title="la_fld_CategoryFormat"> <td class="control-cell"> @@ -114,9 +81,12 @@ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.export" field="IsBaseCategory" title="la_fld_IsBaseCategory" /> </inp2:m_if> + <inp2:m_RenderElement name="inp_edit_checkbox" prefix="l.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/> + <inp2:m_RenderElement name="inp_edit_box" prefix="l.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" /> + <inp2:m_RenderElement name="inp_edit_box" prefix="l.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" /> <inp2:m_RenderElement name="inp_edit_filler"/> </table> </div> -<inp2:m_include t="incs/footer"/> \ No newline at end of file +<inp2:m_include t="incs/footer"/> Index: modules/in-link/units/links/links_config.php =================================================================== --- modules/in-link/units/links/links_config.php +++ modules/in-link/units/links/links_config.php @@ -570,6 +570,20 @@ 'LocalImage' => Array ('type' => 'string', 'default' => ''), 'LocalPath' => Array ('type' => 'string', 'default' => ''), 'FullUrl' => Array ('type' => 'string', 'default' => ''), + + // For export. + 'ExportPresets' => array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => array(), + 'default' => '', + ), + 'ExportSavePreset' => array( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => array(0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'default' => 0, + ), + 'ExportPresetName' => array('type' => 'string', 'default' => ''), ), 'Grids' => Array ( Index: modules/in-news/admin_templates/export.tpl =================================================================== --- modules/in-news/admin_templates/export.tpl +++ modules/in-news/admin_templates/export.tpl @@ -43,40 +43,7 @@ <inp2:m_RenderElement name="inp_edit_radio" prefix="n.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/> <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/> - - <inp2:m_RenderElement design="form_row" prefix="n.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:n.export_InputName field="ExportColumns"/>', 1)" class="button"> - <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:n.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:n.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;"> - <inp2:n.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/> - </select> - <input type="hidden" id="hidden_export_columns" name="<inp2:n.export_InputName field="ExportColumns"/>" value="<inp2:n.export_Field field="ExportColumns"/>" /> - </td> - <td align="center"> - <input type="button" value=" «« " onclick="move_selected('<inp2:n.export_InputName field="AvailableColumns"/>', '<inp2:n.export_InputName field="ExportColumns"/>')" class="button"><br> - <img src="img/spacer.gif" width="1" height="4" alt=""><br> - <input type="button" value=" »» " onclick="move_selected('<inp2:n.export_InputName field="ExportColumns"/>', '<inp2:n.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:n.export_InputName field="AvailableColumns"/>');" class="button"> - </td> - <td> - <select multiple id="<inp2:n.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;"> - <inp2:n.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/> - </select> - </td> - </tr> - </table> - </td> - </inp2:m_RenderElement> + <inp2:m_RenderElement name="inp_edit_export_presets" prefix="n.export"/> <inp2:m_RenderElement design="form_row" prefix="n.export" field="CategoryFormat" title="la_fld_CategoryFormat"> <td class="control-cell"> @@ -115,9 +82,12 @@ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.export" field="IsBaseCategory" title="la_fld_IsBaseCategory" /> </inp2:m_if> + <inp2:m_RenderElement name="inp_edit_checkbox" prefix="n.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/> + <inp2:m_RenderElement name="inp_edit_box" prefix="n.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" /> + <inp2:m_RenderElement name="inp_edit_box" prefix="n.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" /> <inp2:m_RenderElement name="inp_edit_filler"/> </table> </div> -<inp2:m_include t="incs/footer"/> \ No newline at end of file +<inp2:m_include t="incs/footer"/> Index: modules/in-news/units/articles/articles_config.php =================================================================== --- modules/in-news/units/articles/articles_config.php +++ modules/in-news/units/articles/articles_config.php @@ -511,6 +511,20 @@ 'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Title' => 'TITLE'), 'default' => '|Title|'), 'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1), // import related fields: end + + // For export. + 'ExportPresets' => array( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => array(), + 'default' => '', + ), + 'ExportSavePreset' => array( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => array(0 => 'la_No', 1 => 'la_Yes'), + 'use_phrases' => 1, 'default' => 0, + ), + 'ExportPresetName' => array('type' => 'string', 'default' => ''), ), 'Grids' => Array (