// fix update form.tpl in AdminTaxRulesGroupsController

This commit is contained in:
lLefevre
2011-11-07 13:03:04 +00:00
parent 659a9a6319
commit 8747306424
8 changed files with 50 additions and 40 deletions
+14 -14
View File
@@ -64,21 +64,21 @@
<script type="text/javascript" src="../js/form.js"></script>
{/if}
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{if $show_toolbar}
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>
{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}
</h3>
</div>
{/if}
<div class="leadin">{block name="leadin"}{/block}</div>
{if $show_toolbar}
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>
{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}
</h3>
</div>
<div class="leadin">{block name="leadin"}{/block}</div>
</div>
</div>
</div>
{/if}
{if isset($fields.title)}<h2>{$fields.title}</h2>{/if}
<form id="{$table}_form" class="defaultForm" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
@@ -60,17 +60,19 @@
{/if}{* End if simple_header *}
{if $show_toolbar}
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}</h3>
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}
</h3>
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="leadin">{block name="leadin"}{/block}</div>
<a name="{$table}">&nbsp;</a>
@@ -24,20 +24,20 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{if $show_toolbar}
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
{if $show_toolbar}
<div class="toolbar-placeholder">
<div class="toolbarBox {if $toolbar_fix}toolbarHead{/if}">
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
<div class="pageTitle">
<h3>
{block name=pageTitle}
<span id="current_obj" style="font-weight: normal;">{$title|default:'&nbsp;'}</span>
{/block}
</h3>
</div>
{/if}
<div class="leadin">{block name="leadin"}{/block}</div>
</div>
<div class="leadin">{block name="leadin"}{/block}</div>
</div>
</div>
</div>
{/if}
{block name="override_tpl"}{/block}
@@ -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[]'}
<div id="add_new_tax_rule" style="display:none">
@@ -64,10 +65,12 @@
populateStates($(this).val(), '');
});
$('.toolbar_btn').click(function() {
$('#desc-tax_rules_group-new').click(function() {
initForm();
$('#add_new_tax_rule').slideToggle();
$('#add_new_tax_rule').show();
return false;
}, function() {
$('#add_new_tax_rule').hide();
});
});
@@ -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[]'}
<div id="add_new_tax_rule" style="display:none">
@@ -52,10 +53,8 @@
{block name="end_field_block"}
{if $input.type == 'submit'}
</div>
</div>
{else}
</div>
{/if}
</div>
{/block}
{block name="script"}
@@ -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;
@@ -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;
@@ -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;