diff --git a/war/resources/scripts/hudson-behavior.js b/war/resources/scripts/hudson-behavior.js index 110afdf53409b071c6208e2f6dfb31f105677b1a..d9946854816a2ec8d4ed56d97bb41b32baba2467 100644 --- a/war/resources/scripts/hudson-behavior.js +++ b/war/resources/scripts/hudson-behavior.js @@ -1683,9 +1683,15 @@ function buildFormTree(form) { case "checkbox": p = findParent(e); var checked = xor(e.checked,Element.hasClassName(e,"negative")); - if(!e.groupingNode) - addProperty(p, e.name, checked); - else { + if(!e.groupingNode) { + v = e.getAttribute("value"); + if (v) {// if the value is present, we'll either set the value or not. useful for an array of checkboxes + if (checked) + addProperty(p, e.name, v); + } else {// otherwise it'll bind to boolean + addProperty(p, e.name, checked); + } + } else { if(checked) addProperty(p, e.name, e.formDom = {}); }