Changeset 5850 for main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Timestamp:
- 12 Mar 2011, 14:27:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r5847 r5850 50 50 from zope.formlib.sequencewidget import ListSequenceWidget, SequenceDisplayWidget 51 51 from zope.formlib.widget import CustomWidgetFactory 52 from waeup.sirp.utils.helpers import ReST2HTML 52 53 from waeup.sirp.widgets.objectwidget import ( 53 54 WAeUPObjectWidget, WAeUPObjectDisplayWidget) … … 225 226 grok.context(IApplicantsContainer) 226 227 grok.name('index') 227 228 pnav = 3 229 228 230 @property 229 231 def title(self): … … 234 236 def label(self): 235 237 return self.title 236 pnav = 3 238 239 def descriptionToHTML(self): 240 return ReST2HTML(self.context.description) 237 241 238 242 class ManageApplicantsContainerActionButton(ManageActionButton): … … 245 249 """ 246 250 grok.context(IApplicantsContainer) 247 grok.name('manage ')251 grok.name('manage2') 248 252 249 253 @property … … 303 307 class ManageApplicantsContainer(WAeUPEditFormPage): 304 308 grok.context(IApplicantsContainer) 305 grok.name(' edit')309 grok.name('manage') 306 310 form_fields = grok.AutoFields(IApplicantsContainer) 307 311 # Use friendlier date widget... 308 312 form_fields['startdate'].custom_widget = FriendlyDateWidget 309 313 form_fields['enddate'].custom_widget = FriendlyDateWidget 310 label = 'Edit container' 311 title = label 314 315 @property 316 def title(self): 317 return "Manage applicants container: %s" % getattr( 318 self.context, '__name__', 'unnamed') 319 320 @property 321 def label(self): 322 return self.title 323 312 324 pnav = 3 313 325 314 326 def update(self): 315 datepicker.need() 327 datepicker.need() # Enable jQuery datepicker in date fields. 316 328 return super(ManageApplicantsContainer, self).update() 317 329 318 @grok.action(' Apply')330 @grok.action('Save') 319 331 def apply(self, **data): 320 332 self.applyData(self.context, **data)
Note: See TracChangeset for help on using the changeset viewer.