Changeset 7141 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 19 Nov 2011, 14:32:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7136 r7141 1545 1545 def update(self): 1546 1546 super(StudentPasswordFormPage, self).update() 1547 #self.wf_info = IWorkflowInfo(self.context)1548 1547 return 1549 1548 … … 1554 1553 msg = getattr(error, 'message', '') 1555 1554 if isinstance(msg, basestring) and msg != '': 1555 # invariant error 1556 1556 new_status.append(msg) 1557 1557 else: 1558 other_errors = True 1559 if other_errors: 1560 if new_status: 1561 new_status.append('see below for further errors') 1562 else: 1563 new_status.append('See below for details.') 1564 if new_status: 1565 self.status = u'There were errors: %s' % ', '.join(new_status) 1558 # field error 1559 new_status.append('see below for details') 1560 continue 1561 self.status = u'Error: %s' % ', '.join(new_status) 1566 1562 return 1567 1563 1568 1564 @grok.action('Save', failure=onFailure) 1569 1565 def save(self, **data): 1566 if not isinstance(data.get('password', None), basestring): 1567 self.flash('Password unchanged.') 1568 return 1570 1569 self.applyData(self.context, **data) 1571 self.flash(' Form has been saved.')1570 self.flash('Password has been set.') 1572 1571 return 1573 1572
Note: See TracChangeset for help on using the changeset viewer.