// fix new tax rule button
This commit is contained in:
1 parent
8ad3166226
commit
6da40e7159
2 files changed
+8
-7
No files matched your search
@@ -80,6 +80,9 @@
|
|||||||
return false;
|
return false;
|
||||||
submited = true;
|
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
|
//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" />');
|
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
||||||
|
|
||||||
@@ -90,6 +93,9 @@
|
|||||||
if (btn_save_and_stay)
|
if (btn_save_and_stay)
|
||||||
{
|
{
|
||||||
btn_save_and_stay.click(function() {
|
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
|
//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" />');
|
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:'),
|
'label' => $this->l('Description:'),
|
||||||
'name' => '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->default_form_language = $this->default_form_language;
|
||||||
$helper->allow_employee_form_lang = $this->allow_employee_form_lang;
|
$helper->allow_employee_form_lang = $this->allow_employee_form_lang;
|
||||||
$helper->fields_value = $this->getFieldsValue($this->object);
|
$helper->fields_value = $this->getFieldsValue($this->object);
|
||||||
$helper->toolbar_btn['save'] = array(
|
$helper->toolbar_btn['save_new_rule'] = array(
|
||||||
'href' => self::$currentIndex.'&id_tax_rules_group='.$obj->id.'&updatetax_rules_group&token='.$this->token,
|
'href' => self::$currentIndex.'&id_tax_rules_group='.$obj->id.'&action=create_rule&token='.$this->token,
|
||||||
'desc' => 'Save tax rule',
|
'desc' => 'Save tax rule',
|
||||||
'class' => 'process-icon-save'
|
'class' => 'process-icon-save'
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user