From 296530b320b644d45b503b69a65599df6ec9eaf1 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 7 Jul 2014 13:25:20 +0000 Subject: [PATCH] Fix etemplate2 submit() method for those buttons which they do not have nested ids --- etemplate/js/etemplate2.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index c75722135e..ada8af36fc 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -539,9 +539,10 @@ etemplate2.prototype.submit = function(button, async, no_validation) target = target[idx]; } } - else if (typeof values.button == 'undefined') + else if (typeof values.button == 'undefined' || jQuery.isEmptyObject(values.button)) { - values.button = button.id; + delete values.button; + values[button.id] = true; } }