Changeset 12034
- Timestamp:
- 22 Nov 2014, 07:23:05 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
r12028 r12034 52 52 53 53 grok.context(IIkobaObject) 54 55 WARNING = _('You can not edit your document after final submission.' 56 ' You really want to submit?') 54 57 55 58 … … 806 809 return super(DocumentEditFormPage, self).update() 807 810 811 @action(_('Save'), style='primary') 812 def save(self, **data): 813 msave(self, **data) 814 return 815 816 @action(_('Final Submit'), warning=WARNING) 817 def finalsubmit(self, **data): 818 msave(self, **data) 819 IWorkflowInfo(self.context).fireTransition('submit') 820 self.flash(_('Form has been submitted.')) 821 self.redirect(self.url(self.context)) 822 return 823 808 824 809 825 class DocumentTriggerTransitionFormPage(IkobaEditFormPage): -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/documentpage.pt
r12033 r12034 1 1 <div class="wfstatus-sub" i18n:domain="waeup.kofa"> 2 Document State: 3 <span tal:replace="context/translated_state"> 4 VERIFICATIONSTATE 5 </span> 2 Document State: <span tal:replace="context/translated_state"> 3 VERIFICATIONSTATE</span> 6 4 </div> 7 5 -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12028 r12034 860 860 self.browser.getControl(name="form.title").value = 'My second doc' 861 861 self.browser.getControl("Save").click() 862 self.assertEqual(document.title, 'My second doc') 862 863 self.assertTrue('Form has been saved.' in self.browser.contents) 863 864 self.browser.getLink("View").click() 864 865 self.assertEqual(self.browser.url, self.documents_path + '/d102/index') 865 # Customer can't edit the document once it has been verified 866 IWorkflowState(document).setState(VERIFIED) 866 # Costumer can submit the form. The form is also saved. 867 self.browser.getLink("Edit").click() 868 self.browser.getControl(name="form.title").value = 'My third doc' 869 self.browser.getControl("Final Submit").click() 870 self.assertEqual(document.title, 'My third doc') 871 self.assertEqual(document.state, 'submitted') 872 self.assertTrue('Document State: submitted for verification' in self.browser.contents) 873 # Customer can't edit the document once it has been submitted 867 874 self.browser.open(self.documents_path + '/d102/edit') 868 875 self.assertTrue('The requested form is locked' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.