#994 closed defect (fixed)
Checkbox defaults on
Reported by: | Owned by: | bill | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When using the checkbox widget, the default value sent when the form is submitted is 'on' whether the default for the checkbox was on or off.
If the checkbox is checked, then unchecked, the correct value (ie. no value) is submitted (ie. the act of unsetting the checkbox forces the value to be correct).
Tested against: 0.3.1 and trunk
Change History (6)
comment:1 Changed 15 years ago by
Component: | General → Widgets |
---|
comment:2 Changed 15 years ago by
Owner: | changed from anonymous to bill |
---|---|
Status: | new → assigned |
comment:3 Changed 15 years ago by
comment:4 Changed 15 years ago by
Yikes, sorry about that. Trying again:
in in src/widget/html/Checkbox.js, if the line:
this.inputNode.checked = this.checked;
is added, the correct behaviour results ie.
postCreate: function(args, frag) { // find any associated label and create a labeleby relationship var label = document.getElementsByTagName("label"); if (label && label[0].htmlFor != undefined) { label[0].id = (label[0].htmlFor + "label"); dojo.widget.wai.setAttr(this.domNode, "waiState", "labelledby", label[0].id); } this.inputNode.checked = this.checked; },
comment:5 Changed 15 years ago by
Milestone: | → 0.4 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in [4445]. (Let me know if it isn't working)
Note: See
TracTickets for help on using
tickets.
in src/widget/html/dojo.js, if the line:
is added, the correct behaviour results ie.