Changeset 8974 for main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
- Timestamp:
- 11 Jul 2012, 16:36:26 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8972 r8974 1594 1594 self.flash(_('Activation code is invalid.')) 1595 1595 return 1596 if code.state == USED: 1597 self.flash(_('Activation code has already been used.')) 1598 return 1596 1599 # Mark pin as used (this also fires a pin related transition) 1597 1600 # and fire transition start_clearance 1598 if code.state == USED: 1599 self.flash(_('Activation code has already been used.')) 1600 return 1601 else: 1602 comment = _(u"invalidated") 1603 # Here we know that the ac is in state initialized so we do not 1604 # expect an exception, but the owner might be different 1605 if not invalidate_accesscode(pin,comment,self.context.student_id): 1606 self.flash(_('You are not the owner of this access code.')) 1607 return 1608 self.context.clr_code = pin 1601 comment = _(u"invalidated") 1602 # Here we know that the ac is in state initialized so we do not 1603 # expect an exception, but the owner might be different 1604 if not invalidate_accesscode(pin, comment, self.context.student_id): 1605 self.flash(_('You are not the owner of this access code.')) 1606 return 1607 self.context.clr_code = pin 1609 1608 IWorkflowInfo(self.context).fireTransition('start_clearance') 1610 1609 self.flash(_('Clearance process has been started.')) … … 1623 1622 def form_fields(self): 1624 1623 if self.context.is_postgrad: 1625 form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked') 1626 else: 1627 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 1624 form_fields = grok.AutoFields(IPGStudentClearance).omit( 1625 'clearance_locked') 1626 else: 1627 form_fields = grok.AutoFields(IUGStudentClearance).omit( 1628 'clearance_locked') 1628 1629 return form_fields 1629 1630
Note: See TracChangeset for help on using the changeset viewer.