From 38748c2fa18244f0ea3c4572185e9084f481377b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 8 Nov 2013 16:38:12 +0000 Subject: [PATCH] fix for action-checkboxes not transmitted in et2 --- etemplate/js/et2_extension_nextmatch_actions.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch_actions.js b/etemplate/js/et2_extension_nextmatch_actions.js index 8c1c3be5de..9760088c79 100644 --- a/etemplate/js/et2_extension_nextmatch_actions.js +++ b/etemplate/js/et2_extension_nextmatch_actions.js @@ -120,10 +120,10 @@ function nm_action(_action, _senders, _target, _ids) // fall through, if popup is open --> submit form case 'submit': var checkboxes = mgr.getActionsByAttr("checkbox", true); - var checkboxes_elem = document.getElementById(mgr.etemplate_var_prefix+'[nm][checkboxes]'); - if (checkboxes && checkboxes_elem) + var checkbox_values = {}; + if (checkboxes) for (var i in checkboxes) - checkboxes_elem.value += checkboxes[i].id + ":" + (checkboxes[i].checked ? "1" : "0") + ";"; + checkbox_values[checkboxes[i].id] = checkboxes[i].checked; var nextmatch = _action.data.nextmatch; if(!nextmatch && _senders.length) @@ -139,7 +139,7 @@ function nm_action(_action, _senders, _target, _ids) jQuery.extend(value, this.activeFilters, { "selected": idsArr, "select_all": _ids.all, - "checkboxes": checkboxes_elem ? checkboxes_elem.value : null + "checkboxes": checkbox_values, }); value[nextmatch.options.settings.action_var]= _action.id; @@ -152,7 +152,7 @@ function nm_action(_action, _senders, _target, _ids) // Force nextmatch to re-load affected rows nextmatch.refresh(idsArr); } - + // downloads need a regular submit via POST (no Ajax) if (_action.data.postSubmit) { @@ -160,7 +160,7 @@ function nm_action(_action, _senders, _target, _ids) } else { - nextmatch.getInstanceManager().submit(); + nextmatch.getInstanceManager().submit(); } if(_action.data.nm_action == 'open_popup')