On 2011-05-24 17:41, Mark Erbaugh wrote:
> Did something change with webpy's handling of Checkboxes on web forms between 
> 0.3 and 0.34 (and 0.35).

Yes, that's why my own application contains the following
compatibility code:


# this is copied from 0.32, as 0.33 works differently
class Checkbox(web.form.Input):
    def render(self):
        checked_description = self.attrs.pop('checked_description', None)
        x = u'<input name="%s" type="checkbox" ' % websafe(self.name)
        if self.value: x += u'checked="checked" '
        x += force_unicode(self.addatts())
        x += u' />'
        x += self.rendernote(self.note)
        if checked_description:
            return '<label>%s %s</label>' % (x, checked_description)
        else:
            return x


Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to