Changeset 388
- Timestamp:
- 17 Aug 2006, 20:26:31 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Widgets.py
r381 r388 143 143 ###) 144 144 145 class WAeUPIdWidget(CPSStringWidget): ###( 146 """ WAeUPId Widget""" 147 meta_type = "WAeUPId Widget" 148 149 def validate(self, datastructure, **kw): 150 """Validate datastructure and update datamodel.""" 151 152 valid = CPSStringWidget.validate(self, datastructure, **kw) 153 if not valid: 154 return 0 155 else: 156 widget_id = self.getWidgetId() 157 value = datastructure[widget_id].upper() 158 err = 0 159 if hasattr(self.aq_parent,value): 160 err = 'An object with the Id %s already exists in this context' % (value) 161 if err: 162 datastructure.setError(widget_id, err) 163 else: 164 datamodel = datastructure.getDataModel() 165 datamodel[self.fields[0]] = value 166 167 return not err 168 169 InitializeClass(WAeUPIdWidget) 170 171 widgetRegistry.register(WAeUPIdWidget) 172 173 174 ###) 175 145 176 class StudentIdWidget(CPSStringWidget): ###( 146 177 """ StudentId Widget""" -
WAeUP_SRP/trunk/profiles/default/layouts/department.xml
r370 r388 28 28 <property name="size_max">200</property> 29 29 </widget> 30 <widget name="code" meta_type="String Widget"> 30 <widget name="code" meta_type="WAeUPId Widget"> 31 <property name="title">Object ID</property> 32 <property name="fields"> 33 <element value="code"/> 34 </property> 35 <property name="label">Object ID</property> 36 <property name="label_edit">Object ID</property> 37 <property name="readonly_layout_modes"/> 38 <property name="hidden_layout_modes"/> 39 <property name="hidden_readonly_layout_modes"/> 40 </widget> 41 <widget name="code_alt" meta_type="String Widget"> 31 42 <property name="title">Object ID</property> 32 43 <property name="fields"> -
WAeUP_SRP/trunk/profiles/default/layouts/waeup_common.xml
r370 r388 20 20 <property name="size_max">200</property> 21 21 </widget> 22 <widget name="code" meta_type="String Widget"> 22 <widget name="code" meta_type="WAeUPId Widget"> 23 <property name="title">Object ID</property> 24 <property name="fields"> 25 <element value="code"/> 26 </property> 27 <property name="is_required">True</property> 28 <property name="label">Object ID</property> 29 <property name="label_edit">Object ID</property> 30 <property name="readonly_layout_modes"/> 31 <property name="hidden_layout_modes"/> 32 <property name="hidden_readonly_layout_modes"/> 33 </widget> 34 <widget name="code_alt" meta_type="String Widget"> 23 35 <property name="title">Object ID</property> 24 36 <property name="fields"> -
WAeUP_SRP/trunk/skins/waeup_custom/standard_error_message.pt
r351 r388 12 12 <metal:main fill-slot="main"> 13 13 14 14 15 <tal:haserror condition="error_type"> 15 16 <tal:NotFound condition="python:error_type == 'NotFound'"> … … 17 18 </tal:NotFound> 18 19 19 <tal:default condition="python: error_type != 'NotFound'">20 <tal:default condition="python:0 and error_type != 'NotFound'"> 20 21 <metal:block use-macro="here/error_lib_other/macros/other" /> 21 22 </tal:default> 22 23 23 <tal:debugging condition="python: checkPerm('Manage portal', here)">24 <tal:debugging condition="python:1 or checkPerm('Manage portal', here)"> 24 25 <table width="100%" cellpadding="2" cellspacing="2"> 25 26 <tr>
Note: See TracChangeset for help on using the changeset viewer.