From cd58c0968b9cc608cff485971409e24f37bd7e27 Mon Sep 17 00:00:00 2001 From: Davy Rolink Date: Sat, 16 Nov 2013 14:59:37 +0100 Subject: [PATCH] Fixed admin toolbar save button javascript actions, problem occurred when there were multiple toolbars on one page --- admin-dev/themes/default/template/toolbar.tpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin-dev/themes/default/template/toolbar.tpl b/admin-dev/themes/default/template/toolbar.tpl index ebecb244a..edf0c1152 100644 --- a/admin-dev/themes/default/template/toolbar.tpl +++ b/admin-dev/themes/default/template/toolbar.tpl @@ -23,7 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -
+
{block name=toolbarBox}
    @@ -52,7 +52,7 @@ var modules_list_loaded = false; $(function() { //get reference on save link - btn_save = $('span[class~="process-icon-save"]').parent(); + btn_save = $('#{$table}_toolbar span[class~="process-icon-save"]').parent(); //get reference on form submit button btn_submit = $('#{$table}_form_submit_btn'); @@ -93,6 +93,9 @@ //submit the form {block name=formSubmit} btn_save.click(function() { + // Vars + var btn_submit = $('#{$table}_form_submit_btn'); + // Avoid double click if (submited) return false;