No, i've reported it on irc, but i don't know if i'm doing something
wrong or not...
And the bug in the tracker (
http://framework.zend.com/issues/browse/ZF-4274 ) is different from my
issue i think.
This issue is when you create your element with the "addElement" method
of the "form", you'll have the "unchecked" value for the "checked" value
in the html....
My issue is on the 'setCheckedValue' and 'setUncheckedValue' methods. It
puts "0" for the 2 HTML values...
I think the issue is surely linked, but not the same (the result HTML is
differenet).
Matthew Weier O'Phinney a écrit :
-- Apsy <[EMAIL PROTECTED]> wrote
(on Tuesday, 23 September 2008, 10:55 PM +0200):
I would like to know if for you my code is correct, because is so,
there's a bug in the Dojo Checkbox Component :p
Didn't you report this on the tracker already? If not you, somebody else
has...
$cgu_accept = new Zend_Dojo_Form_Element_CheckBox('cgu_accept');
$cgu_accept->setDijitParam('invalidMessage', 'You must validate the cgu');
$cgu_accept->setCheckedValue('checked');
$cgu_accept->setUncheckedValue('unchecked');
$cgu_accept->setLabel('blablabla')
->addValidator(new
Zend_Validate_Identical($cgu_accept->getCheckedValue()))
->setIgnore(true);
produces HTML code :
<dd>
<input type="hidden" value="0" name="cgu_accept"/>
<div wairole="presentation" class="dijitReset dijitInline
dijitCheckBox" role="presentation" widgetid="cgu_accept">
<input
type="checkbox"
dojoattachevent="onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick"
dojoattachpoint="focusNode"
class="dijitReset dijitCheckBoxInput"
name="cgu_accept"
id="cgu_accept"
value="0"
tabindex="0"
style="-moz-user-select: none;"/>
</div>
</dd>
As you can see here, i've defined the "checked' and 'unchecked" value
but i have a 0 in the input value for the both...
Any Help ?