Changeset 199 for waeup_product/trunk/Widgets.py
- Timestamp:
- 4 Apr 2006, 13:26:08 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Widgets.py
r58 r199 1 1 #-*- mode: python; mode: fold -*- 2 2 from Globals import InitializeClass 3 from Products.CPSSchemas.Widget import CPSWidgetType3 ##from Products.CPSSchemas.Widget import CPSWidgetType 4 4 from Products.CPSSchemas.BasicWidgets import CPSStringWidget, CPSEmailWidget 5 5 from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget 6 from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry 6 from Products.CPSSchemas.Widget import widgetRegistry 7 ##from Products.CPSSchemas.WidgetTypesTool import WidgetTypeRegistry 7 8 from DateTime.DateTime import DateTime 8 9 from AccessControl import getSecurityManager … … 42 43 InitializeClass(StudentIdWidget) 43 44 44 class StudentIdWidgetType(CPSWidgetType): 45 """Student Id String widget type.""" 46 meta_type = "StudentId Widget Type" 47 cls = StudentIdWidget 45 widgetRegistry.register(StudentIdWidget) 46 47 ##Class StudentIdWidgetType(CPSWidgetType): 48 ## """Student Id String widget type.""" 49 ## meta_type = "StudentId Widget Type" 50 ## cls = StudentIdWidget 48 51 49 52 ###) … … 51 54 class ScratchcardPinWidget(CPSStringWidget): ###( 52 55 """ ScratchcardPin Widget""" 53 meta_type = "Scratchcard Pin Widget"56 meta_type = "Scratchcard Pin Widget" 54 57 valid_pins = ['123456', 55 58 '234567', … … 78 81 79 82 InitializeClass(ScratchcardPinWidget) 80 81 class ScratchcardPinWidgetType(CPSWidgetType): 82 """Scratchcard Pin widget type.""" 83 meta_type = "Scratchcard Pin Widget Type" 84 cls = ScratchcardPinWidget 83 widgetRegistry.register(ScratchcardPinWidget) 84 85 ##class ScratchcardPinWidgetType(CPSWidgetType): 86 ## """Scratchcard Pin widget type.""" 87 ## meta_type = "Scratchcard Pin Widget Type" 88 ## cls = ScratchcardPinWidget 85 89 86 90 ###) … … 88 92 ########### 89 93 90 WidgetTypeRegistry.register(StudentIdWidgetType)91 WidgetTypeRegistry.register(ScratchcardPinWidgetType)94 ##WidgetTypeRegistry.register(StudentIdWidgetType) 95 ##WidgetTypeRegistry.register(ScratchcardPinWidgetType) 92 96 93 97 ##class MyProjectWeekDateTimeWidget(CPSDateTimeWidget): ###(
Note: See TracChangeset for help on using the changeset viewer.