- Timestamp:
- 13 Jul 2016, 04:36:41 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r14017 r14027 22 22 from zope.component import getUtility, getAdapter 23 23 from zope.i18n import translate 24 from hurry.workflow.interfaces import IWorkflowState 24 25 from waeup.kofa.interfaces import ( 25 26 IExtFileStore, IFileStoreNameChooser, IKofaUtils) … … 28 29 from waeup.kofa.applicants.browser import ( 29 30 ApplicantCheckStatusPage, ApplicantBaseDisplayFormPage) 31 from waeup.kofa.applicants.workflow import STARTED, PAID 30 32 from waeup.kofa.applicants.viewlets import PDFActionButton 31 33 from waeup.kofa.browser.layout import UtilityView … … 300 302 grok.template('applicanteditpage') 301 303 304 def unremovable(self, ticket): 305 return True 306 307 # AAUE applicants never see the 'Remove Selected Tickets' button. 308 @property 309 def display_actions(self): 310 state = IWorkflowState(self.context).getState() 311 # If the form is unlocked, applicants are allowed to save the form 312 actions = [[_('Save')],] 313 # Only in state started they can also add tickets. 314 if state == STARTED: 315 actions = [[_('Save')], [_('Add online payment ticket'),]] 316 # In state paid, they can submit the data and further add tickets 317 # if the application is special. 318 elif self.context.special and state == PAID: 319 actions = [[_('Save'), _('Finally Submit')], 320 [_('Add online payment ticket'),]] 321 elif state == PAID: 322 actions = [[_('Save'), _('Finally Submit')],] 323 return actions 324 302 325 @property 303 326 def form_fields(self): -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py
r13999 r14027 51 51 return 52 52 53 def test_payment _slip_download_warning(self):53 def test_payment(self): 54 54 configuration = SessionConfiguration() 55 55 configuration.academic_session = session_1 … … 70 70 self.assertEqual(self.browser.headers['Content-Type'], 71 71 'application/pdf') 72 # AAUE applicants never see the 'Remove Selected Tickets' button. 73 self.browser.open(self.edit_path) 74 self.assertFalse('Remove' in self.browser.contents) 72 75 return 73 76
Note: See TracChangeset for help on using the changeset viewer.