Changeset 7797
- Timestamp:
- 8 Mar 2012, 07:45:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/widgets/sequencewidget.py
r7795 r7797 23 23 import grok 24 24 from zope.browserpage import ViewPageTemplateFile 25 from zope.formlib.interfaces import IInputWidget 26 from zope.formlib.widgets import ListSequenceWidget 25 from zope.formlib.interfaces import IInputWidget, IDisplayWidget 26 from zope.formlib.widgets import ( 27 ListSequenceWidget, SequenceDisplayWidget) 27 28 from zope.publisher.interfaces.browser import IBrowserRequest 28 29 from zope.schema.interfaces import IField, IList … … 36 37 template = ViewPageTemplateFile('sequencewidget.pt') 37 38 39 class KofaSequenceDisplayWidget(SequenceDisplayWidget): 40 """A sequence widget for lists. 38 41 39 # Register our sequence widget as default for lists. 42 This is basically a plain copy from zope.formlib. We have, 43 however, the possibility to tweak html tags. 44 """ 45 46 tag = None 47 itemTag = None 48 49 # Register our sequence widgets as default for lists. 40 50 @grok.adapter(IList, IField, IBrowserRequest) 41 51 @grok.implementer(IInputWidget) 42 52 def seq_input_widget(obj, field, req, *args, **kw): 43 53 return SIRPSequenceWidget(obj, field, req, *args, **kw) 54 55 @grok.adapter(IList, IField, IBrowserRequest) 56 @grok.implementer(IDisplayWidget) 57 def seq_display_widget(obj, field, req, *args, **kw): 58 return KofaSequenceDisplayWidget(obj, field, req, *args, **kw)
Note: See TracChangeset for help on using the changeset viewer.