- Timestamp:
- 10 Jun 2011, 06:58:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r6321 r6322 76 76 TRANSITION_OBJECTS = create_workflow() 77 77 78 TRANSITION_DICT = dict([79 (transition_object.transition_id,transition_object.title)80 for transition_object in TRANSITION_OBJECTS])78 #TRANSITION_DICT = dict([ 79 # (transition_object.transition_id,transition_object.title) 80 # for transition_object in TRANSITION_OBJECTS]) 81 81 82 82 class ApplicantsRootPage(WAeUPPage): … … 419 419 if state == INITIALIZED: 420 420 IWorkflowInfo(self.context[pin]).fireTransition('start') 421 timestamp = datetime.now().strftime("%d/%m/%Y %H:%M")422 transition_title = TRANSITION_DICT['start']423 self.context[pin].messages += '<br />%s - %s' % (424 timestamp,transition_title)425 421 self.redirect(self.url(self.context[pin], 'edit')) 426 422 return … … 496 492 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 497 493 grok.template('form_edit') 494 manage_applications = True 498 495 pnav = 3 499 496 … … 551 548 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 552 549 grok.template('form_edit') 550 manage_applications = False 551 553 552 554 553 def emitLockMessage(self): … … 566 565 567 566 def dataNotComplete(self): 568 if self.context.confirm_passport is not True: 567 #import pdb; pdb.set_trace() 568 if not self.request.form.get('confirm_passport', False): 569 569 return 'Passport confirmation box not ticked.' 570 570 if len(self.errors) > 0: … … 572 572 return False 573 573 574 @property575 def getTransitions(self):576 return None577 578 574 @grok.action('Save') 579 575 def save(self, **data): … … 597 593 return 598 594 state = IWorkflowState(self.context).getState() 599 # Cannot happen but anyway ... 595 # This shouldn't happen, but the application officer 596 # might have forgotten to lock the form after changing the state 600 597 if state != STARTED: 601 self.flash('This form cannot be submitted. ')598 self.flash('This form cannot be submitted. Wrong state!') 602 599 return 603 600 IWorkflowInfo(self.context).fireTransition('submit')
Note: See TracChangeset for help on using the changeset viewer.