X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fcheckbox-foot.html;h=c4700942531af93feb507c8bd4f3f83e7fb91ea5;hb=5f10fda22d066f3e730db11b7c26938547014631;hp=be1caab916809f12b4864bdbf1b106071324b026;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;p=freeside.git diff --git a/httemplate/search/elements/checkbox-foot.html b/httemplate/search/elements/checkbox-foot.html index be1caab91..c47009425 100644 --- a/httemplate/search/elements/checkbox-foot.html +++ b/httemplate/search/elements/checkbox-foot.html @@ -26,7 +26,8 @@ array is a hashref of either: of "submit" becomes the "value" property of the button (and thus its label). If "confirm" is specified, the button will have an onclick handler that displays the value of "confirm" in a popup message box and asks the user to -confirm the choice. +confirm the choice. The hashref may also have a "name" property, which +sets the name of the submit button. - "onclick" and "label". Creates a non-submit button that executes the Javascript code in "onclick". "label" is used as the text of the button. @@ -74,6 +75,15 @@ function setAll(setTo) { checkboxes[i].checked = setTo; } } +function toCGIString() { + var out = ''; + for (var i = 0; i < checkboxes.length; i++) { + if (checkboxes[i].checked) { + out += '&' + checkboxes[i].name + '=' + checkboxes[i].value; + } + } + return out; +} <%init> my %opt = @_;