Changeset 6709 for main/waeup.sirp
- Timestamp:
- 10 Sep 2011, 00:29:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/uli-studentpw/src/waeup/sirp/students/browser.py
r6705 r6709 571 571 572 572 def update(self): 573 #datepicker.need() # Enable jQuery datepicker in date fields.574 573 super(StudentBaseEditFormPage, self).update() 575 574 self.wf_info = IWorkflowInfo(self.context) 576 575 return 577 576 578 @grok.action('Save') 577 def onFailure(self, action, data, errors): 578 new_status = [] 579 other_errors = False 580 for error in errors: 581 msg = getattr(error, 'message', '') 582 if isinstance(msg, basestring) and msg != '': 583 new_status.append(msg) 584 else: 585 other_errors = True 586 if other_errors: 587 if new_status: 588 new_status.append('see below for further errors') 589 else: 590 new_status.append('See below for details.') 591 if new_status: 592 self.status = u'There were errors: %s' % ', '.join(new_status) 593 return 594 595 @grok.action('Save', failure=onFailure) 579 596 def save(self, **data): 580 print "PW1: ", self.context.password581 597 form = self.request.form 582 598 ob_class = self.__implemented__.__name__.replace('waeup.sirp.','') … … 588 604 if fields_string: 589 605 self.context.loggerInfo(ob_class, 'saved: % s' % fields_string) 590 print "PW2: ", self.context.password591 606 return 592 607
Note: See TracChangeset for help on using the changeset viewer.