// fix new tax rule button

This commit is contained in:
Jerome Nadaud
2013-11-29 16:54:33 +01:00
parent 8ad3166226
commit 6da40e7159
2 changed files with 8 additions and 7 deletions
@@ -80,6 +80,9 @@
return false;
submited = true;
if ($(this).attr('href').replace('#', '').replace(/\s/g, '') != '')
return true;
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
@@ -90,6 +93,9 @@
if (btn_save_and_stay)
{
btn_save_and_stay.click(function() {
if ($(this).attr('href').replace('#', '').replace(/\s/g, '') != '')
return true;
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
@@ -334,11 +334,6 @@ class AdminTaxRulesGroupControllerCore extends AdminController
'label' => $this->l('Description:'),
'name' => 'description',
)
),
'submit' => array(
'title' => $this->l('Save and stay'),
'class' => 'btn btn-default',
'stay' => true
)
);
@@ -365,8 +360,8 @@ class AdminTaxRulesGroupControllerCore extends AdminController
$helper->default_form_language = $this->default_form_language;
$helper->allow_employee_form_lang = $this->allow_employee_form_lang;
$helper->fields_value = $this->getFieldsValue($this->object);
$helper->toolbar_btn['save'] = array(
'href' => self::$currentIndex.'&amp;id_tax_rules_group='.$obj->id.'&amp;updatetax_rules_group&amp;token='.$this->token,
$helper->toolbar_btn['save_new_rule'] = array(
'href' => self::$currentIndex.'&amp;id_tax_rules_group='.$obj->id.'&amp;action=create_rule&amp;token='.$this->token,
'desc' => 'Save tax rule',
'class' => 'process-icon-save'
);