From 8747306424feebc8441a3ccc0f108bf04cb33d1b Mon Sep 17 00:00:00 2001 From: lLefevre Date: Mon, 7 Nov 2011 13:03:04 +0000 Subject: [PATCH] // fix update form.tpl in AdminTaxRulesGroupsController --- .../themes/template/helper/form/form.tpl | 28 +++++++++---------- .../template/helper/list/list_header.tpl | 20 +++++++------ .../themes/template/helper/view/view.tpl | 18 ++++++------ .../form_new.tpl => tax_rules/form.tpl} | 7 +++-- .../themes/template/tax_rules_group/form.tpl | 5 ++-- .../admin/AdminAttributesGroupsController.php | 1 + controllers/admin/AdminTabsController.php | 2 ++ .../admin/AdminTaxRulesGroupController.php | 9 ++++-- 8 files changed, 50 insertions(+), 40 deletions(-) rename admin-dev/themes/template/{tax_rules_group/form_new.tpl => tax_rules/form.tpl} (96%) diff --git a/admin-dev/themes/template/helper/form/form.tpl b/admin-dev/themes/template/helper/form/form.tpl index e24b659e6..3ed7d63d3 100644 --- a/admin-dev/themes/template/helper/form/form.tpl +++ b/admin-dev/themes/template/helper/form/form.tpl @@ -64,21 +64,21 @@ {/if} -
-
- {if $show_toolbar} - {include file="toolbar.tpl" toolbar_btn=$toolbar_btn} -
-

- {block name=pageTitle} - {$title|default:' '} - {/block} -

-
- {/if} -
{block name="leadin"}{/block}
+{if $show_toolbar} +
+
+ {include file="toolbar.tpl" toolbar_btn=$toolbar_btn} +
+

+ {block name=pageTitle} + {$title|default:' '} + {/block} +

+
+
{block name="leadin"}{/block}
+
-
+{/if} {if isset($fields.title)}

{$fields.title}

{/if}
diff --git a/admin-dev/themes/template/helper/list/list_header.tpl b/admin-dev/themes/template/helper/list/list_header.tpl index ad3fba81a..ded3ac459 100644 --- a/admin-dev/themes/template/helper/list/list_header.tpl +++ b/admin-dev/themes/template/helper/list/list_header.tpl @@ -60,17 +60,19 @@ {/if}{* End if simple_header *} {if $show_toolbar} -
-
- {include file="toolbar.tpl" toolbar_btn=$toolbar_btn} -
-

{block name=pageTitle} - {$title|default:' '} - {/block}

+
+
+ {include file="toolbar.tpl" toolbar_btn=$toolbar_btn} +
+

{block name=pageTitle} + {$title|default:' '} + {/block} +

+
+
-
-
{/if} +
{block name="leadin"}{/block}
  diff --git a/admin-dev/themes/template/helper/view/view.tpl b/admin-dev/themes/template/helper/view/view.tpl index 8c63d6447..f61d2099e 100644 --- a/admin-dev/themes/template/helper/view/view.tpl +++ b/admin-dev/themes/template/helper/view/view.tpl @@ -24,20 +24,20 @@ * International Registered Trademark & Property of PrestaShop SA *} -
-
- {if $show_toolbar} - {include file="toolbar.tpl" toolbar_btn=$toolbar_btn} -
+{if $show_toolbar} +
+
+ {include file="toolbar.tpl" toolbar_btn=$toolbar_btn} +

{block name=pageTitle} {$title|default:' '} {/block}

-
- {/if} -
{block name="leadin"}{/block}
+
+
{block name="leadin"}{/block}
+
-
+{/if} {block name="override_tpl"}{/block} diff --git a/admin-dev/themes/template/tax_rules_group/form_new.tpl b/admin-dev/themes/template/tax_rules/form.tpl similarity index 96% rename from admin-dev/themes/template/tax_rules_group/form_new.tpl rename to admin-dev/themes/template/tax_rules/form.tpl index 5417fbb95..76b212101 100644 --- a/admin-dev/themes/template/tax_rules_group/form_new.tpl +++ b/admin-dev/themes/template/tax_rules/form.tpl @@ -24,6 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} {extends file="../helper/form/form.tpl"} + {block name="label"} {if $input.type == 'select' && $input.name == 'country[]'} - {else} -
{/if} +
{/block} {block name="script"} diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index 947785d49..c84b87e40 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -134,6 +134,7 @@ class AdminAttributesGroupsControllerCore extends AdminController $helper->no_link = true; $helper->shopLinkType = ''; $helper->identifier = $this->identifier; + $helper->toolbar_fix = false; $helper->orderBy = 'position'; $helper->orderWay = 'ASC'; $helper->currentIndex = self::$currentIndex; diff --git a/controllers/admin/AdminTabsController.php b/controllers/admin/AdminTabsController.php index 5d68b2112..312c03de9 100644 --- a/controllers/admin/AdminTabsController.php +++ b/controllers/admin/AdminTabsController.php @@ -195,6 +195,8 @@ class AdminTabsControllerCore extends AdminController $helper->shopLinkType = ''; $helper->identifier = $this->identifier; $helper->imageType = $this->imageType; + $helper->toolbar_fix = false; + $helper->show_toolbar = false; $helper->orderBy = 'position'; $helper->orderWay = 'ASC'; $helper->currentIndex = self::$currentIndex; diff --git a/controllers/admin/AdminTaxRulesGroupController.php b/controllers/admin/AdminTaxRulesGroupController.php index c0876e4b8..845b36ec4 100644 --- a/controllers/admin/AdminTaxRulesGroupController.php +++ b/controllers/admin/AdminTaxRulesGroupController.php @@ -78,7 +78,6 @@ class AdminTaxRulesGroupControllerCore extends AdminController $this->lang = false; $this->simple_header = true; $this->toolbar_btn = null; - $this->no_back = false; $this->list_no_link = true; $this->fieldsDisplay = array( @@ -132,6 +131,8 @@ class AdminTaxRulesGroupControllerCore extends AdminController ON (a.`id_tax` = t.`id_tax`)'; $this->_where = 'AND `id_tax_rules_group` = '.(int)$id_group; + $this->show_toolbar = false; + return parent::initList(); } @@ -194,10 +195,10 @@ class AdminTaxRulesGroupControllerCore extends AdminController 'desc' => $this->l('Add new tax rule') ); $content = parent::initForm(); + $this->tpl_folder = 'tax_rules/'; $content .= $this->initRuleForm(); // We change the variable $ tpl_folder to avoid the overhead calling the file in list_action_edit.tpl in intList (); - $this->tpl_folder = 'tax_rules/'; $content .= $this->initRulesList((int)$obj->id); } @@ -332,12 +333,14 @@ class AdminTaxRulesGroupControllerCore extends AdminController $this->getlanguages(); $helper = new HelperForm(); - $helper->override_tpl = $this->tpl_folder; + $helper->override_folder = $this->tpl_folder; $helper->currentIndex = self::$currentIndex; $helper->token = $this->token; $helper->table = 'tax_rule'; $helper->identifier = 'id_tax_rule'; $helper->id = $obj->id; + $helper->toolbar_fix = true; + $helper->show_toolbar = false; $helper->languages = $this->_languages; $helper->default_form_language = $this->default_form_language; $helper->allow_employee_form_lang = $this->allow_employee_form_lang;