[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/form/browser/ -
added specialized source widget for frozenset
Christian Zagrodnick
cz at gocept.com
Wed Apr 25 09:34:08 EDT 2007
Log message for revision 74757:
- added specialized source widget for frozenset
Changed:
U Zope3/trunk/src/zope/app/form/browser/configure.zcml
U Zope3/trunk/src/zope/app/form/browser/source.py
-=-
Modified: Zope3/trunk/src/zope/app/form/browser/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/configure.zcml 2007-04-25 13:32:56 UTC (rev 74756)
+++ Zope3/trunk/src/zope/app/form/browser/configure.zcml 2007-04-25 13:34:07 UTC (rev 74757)
@@ -457,7 +457,7 @@
zope.schema.interfaces.IIterableSource
zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.app.form.browser.interfaces.ISimpleInputWidget"
- factory=".source.SourceMultiSelectSetWidget"
+ factory=".source.SourceMultiSelectFrozenSetWidget"
permission="zope.Public"
/>
Modified: Zope3/trunk/src/zope/app/form/browser/source.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/source.py 2007-04-25 13:32:56 UTC (rev 74756)
+++ Zope3/trunk/src/zope/app/form/browser/source.py 2007-04-25 13:34:07 UTC (rev 74757)
@@ -34,7 +34,7 @@
from zope.app.form.browser.interfaces import ITerms, IWidgetInputErrorView
from zope.app.form.browser import \
SelectWidget, RadioWidget, MultiSelectWidget, OrderedMultiSelectWidget, \
- MultiCheckBoxWidget, MultiSelectSetWidget
+ MultiCheckBoxWidget, MultiSelectSetWidget, MultiSelectFrozenSetWidget
class SourceDisplayWidget(zope.app.form.browser.widget.DisplayWidget):
@@ -589,6 +589,13 @@
super(SourceMultiSelectSetWidget, self).__init__(
field, IterableSourceVocabulary(source, request), request)
+class SourceMultiSelectFrozenSetWidget(MultiSelectFrozenSetWidget):
+ """Provide a selection list for the frozenset to be selected."""
+
+ def __init__(self, field, source, request):
+ super(SourceMultiSelectFrozenSetWidget, self).__init__(
+ field, IterableSourceVocabulary(source, request), request)
+
class SourceMultiCheckBoxWidget(MultiCheckBoxWidget):
"""Provide a list of checkboxes that provide the choice for the list."""
More information about the Zope3-Checkins
mailing list