Skip to content

Commit

Permalink
Changed radio button and checkbox widget labels from token to value (…
Browse files Browse the repository at this point in the history
…wrapped

by a unicode conversion) to make it consistent with the parent
``SequenceWidget`` class. This way, edit and display views of the widgets
show the same label. See LP623210.
  • Loading branch information
strichter committed Jan 4, 2012
1 parent c404931 commit 5de5db9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ CHANGES
- Remove ":list" from radio inputs, since radio buttons can be only one value
by definition. See LP580840.

- Changed radio button and checkbox widget labels from token to value (wrapped
by a unicode conversion) to make it consistent with the parent
``SequenceWidget`` class. This way, edit and display views of the widgets
show the same label. See LP623210.

- Remove dependency on zope.site.hooks, which was moved to zope.component in
3.8.0 (present in ZTK 1.0 and above).

Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/checkbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def update(self):
for count, term in enumerate(self.terms):
checked = self.isChecked(term)
id = '%s-%i' % (self.id, count)
label = term.token
label = unicode(term.value)
if zope.schema.interfaces.ITitledTokenizedTerm.providedBy(term):
label = translate(term.title, context=self.request,
default=term.title)
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/radio.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def update(self):
for count, term in enumerate(self.terms):
checked = self.isChecked(term)
id = '%s-%i' % (self.id, count)
label = term.token
label = unicode(term.value)
if zope.schema.interfaces.ITitledTokenizedTerm.providedBy(term):
label = translate(term.title, context=self.request,
default=term.title)
Expand Down

0 comments on commit 5de5db9

Please sign in to comment.