diff --git a/admin-dev/themes/default/admin.css b/admin-dev/themes/default/admin.css index 8deeb6e7e..1fccae9ca 100644 --- a/admin-dev/themes/default/admin.css +++ b/admin-dev/themes/default/admin.css @@ -170,4 +170,4 @@ form.defaultForm{ background-color:#ebedf4; border:1px solid #ccced7; min-heig /*FOOTER*/ #footer {height:40px;background:#ECEADE url(footer-bg.png) repeat-x scroll left bottom;border:1px solid #999999;font-size:12px;clear:both;font-size:0.9em;color:#666666} -div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;} +div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1;} diff --git a/admin-dev/themes/template/group_shop/form.tpl b/admin-dev/themes/template/group_shop/form.tpl index 76746a520..4338ad3ae 100644 --- a/admin-dev/themes/template/group_shop/form.tpl +++ b/admin-dev/themes/template/group_shop/form.tpl @@ -1,162 +1,103 @@ -{* -* 2007-2011 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 8971 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - -{if $firstCall} - - -{/if} - -
- {if $form_id} - - {/if} -
- {foreach $fields as $key => $field} - {if $key == 'legend'} - - {if isset($field.image)}{$field.title}{/if} - {$field.title} - -
{l s ='You can\'t edit GroupShop when you have more than one Shop'}

- {elseif $key == 'input'} - {foreach $field as $input} - {if $input.name == 'id_state'} -
- {/if} - -
- {if $input.type == 'text'} - - {elseif $input.type == 'select'} - - {elseif $input.type == 'radio'} - {foreach $input.values as $value} - - - {/foreach} - {elseif $input.type == 'textarea'} - - {elseif $input.type == 'checkbox'} - - {/if} - {if isset($input.required) && $input.required} *{/if} - {if isset($input.p)} -

- {if is_array($input.p)} - {foreach $input.p as $p} - {if is_array($p)} - {$p.text}
- {else} - {$p}
- {/if} - {/foreach} - {else} - {$input.p} - {/if} -

- {/if} -
- {if $input.name == 'id_state'} -
- {/if} - {/foreach} - {elseif $key == 'submit'} -
- -
- {/if} - {/foreach} - {if $required_fields} -
* {l s ='Required field'}
- {/if} -
+{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision: 8971 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helper/form/form.tpl"} + +{block name=script} + + $(document).ready(function() { + $('input[name=share_order]').attr('disabled', true); + $('input[name=share_customer]').click(function() + { + var disabled = ($('input[name=share_customer]').attr('checked')) ? false : true; + $('input[name=share_order]').attr('disabled', disabled); + if (disabled) + $('#share_order_off').attr('checked', true); + }); + + $('#useImportData').click(function() { + $('#importList').slideToggle('slow'); + }); + }); + +{/block} + +{block name="label"} + + {if $input.type == 'text' && $input.name == 'name'} +
{l s ='You can\'t edit GroupShop when you have more than one Shop'}

+ {/if} + + {if isset($input.label)} + + {/if} + +{/block} + +{block name="other_fieldsets"} + {if isset($form_import)} +

+
+ {foreach $form_import as $key => $field} + {if $key == 'legend'} + + {if isset($field.image)}{$field.title}{/if} + {$field.title} + + {elseif $key == 'label'} + + {/if} +
+ {if $key == 'checkbox'} +
+ + {elseif $key == 'select'} + + {elseif $key == 'allcheckbox'} +
+
    + {foreach $field.values as $key => $label} +
  • + {/foreach} +
+
+ {elseif $key == 'p'} +

{$field}

+
+ {elseif $key == 'submit'} +
+ +
+ {/if} + {/foreach} +
+ {/if} +{/block} diff --git a/admin-dev/themes/template/group_shop/form_import.tpl b/admin-dev/themes/template/group_shop/form_import.tpl deleted file mode 100644 index a2f7d2766..000000000 --- a/admin-dev/themes/template/group_shop/form_import.tpl +++ /dev/null @@ -1,80 +0,0 @@ -{* -* 2007-2011 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 8971 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} -
-
- {foreach $fields as $key => $field} - {if $key == 'legend'} - - {if isset($field.image)}{$field.title}{/if} - {$field.title} - - {elseif $key == 'label'} - - {/if} - - {if $key == 'checkbox'} -
- - {elseif $key == 'select'} - - {elseif $key == 'allcheckbox'} -
-
    - {foreach $field.values as $key => $label} -
  • - {/foreach} -
-
- {elseif $key == 'p'} -

{$field}

-
- {elseif $key == 'submit'} -
- -
- {/if} - {/foreach} - {if $required_fields} -
* {l s ='Required field'}
- {/if} -
- - -

-{if $firstCall} - {if $back} - {l s='Back'} - {else} - {l s='Back to list'} - {/if} -
-{/if} \ No newline at end of file diff --git a/controllers/admin/AdminGroupShopController.php b/controllers/admin/AdminGroupShopController.php index bcd1e8071..899da1a2b 100644 --- a/controllers/admin/AdminGroupShopController.php +++ b/controllers/admin/AdminGroupShopController.php @@ -144,14 +144,6 @@ class AdminGroupShopControllerCore extends AdminController else $disabled = false; - $this->context->smarty->assign(array( - 'disabled' => $disabled, - 'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false, - 'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID() - )); - - $this->content .= parent::initForm(); - $import_data = array( 'attribute_group' => $this->l('Attribute groups'), 'attribute' => $this->l('Attributes'), @@ -187,23 +179,17 @@ class AdminGroupShopControllerCore extends AdminController 'type' => 'checkbox', 'values' => $import_data ), - 'p' => $this->l('Use this option to associate data (products, modules, etc.) the same way as the selected shop'), - 'submit' => array( - 'title' => $this->l(' Save '), - 'class' => 'button' - ) + 'p' => $this->l('Use this option to associate data (products, modules, etc.) the same way as the selected shop') ); - $helper = new HelperForm(); - // Check if form template has been overriden - if (file_exists($this->context->smarty->template_dir[0].'/'.$this->tpl_folder.'form_import.tpl')) - $helper->tpl = $this->tpl_folder.'form_import.tpl'; - $helper->currentIndex = self::$currentIndex; - $helper->token = $this->token; - $helper->table = $this->table; - $helper->id = $obj->id; - $helper->fields_value = $this->getFieldsValue($obj); - $this->content .= $helper->generateForm($this->fields_import_form); + $this->tpl_form_vars = array( + 'disabled' => $disabled, + 'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false, + 'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID(), + 'form_import' => $this->fields_import_form + ); + + return parent::initForm(); } public function postProcess()