Changeset 8684 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 12 Jun 2012, 05:22:54 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8666 r8684 334 334 form_fields = grok.AutoFields(IApplicantsContainer).omit('title') 335 335 taboneactions = [_('Save'),_('Cancel')] 336 tabtwoactions = [_(' Add applicant'), _('Remove selected'),_('Cancel'),336 tabtwoactions = [_('Remove selected'),_('Cancel'), 337 337 _('Create students from selected')] 338 338 tabthreeactions1 = [_('Remove selected local roles')] … … 422 422 mapping = {'a':', '.join(deleted)})) 423 423 self.redirect(self.url(self.context, u'@@manage')+'?tab2') 424 return425 426 @action(_('Add applicant'), validator=NullValidator)427 def addApplicant(self, **data):428 self.redirect(self.url(self.context, 'addapplicant'))429 424 return 430 425 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r8666 r8684 399 399 self.container_manage_path = self.container_path + '/@@manage' 400 400 self.browser.open(self.container_manage_path) 401 self.browser.get Control("Add applicant").click()401 self.browser.getLink("Add applicant").click() 402 402 self.assertEqual(self.browser.headers['Status'], '200 Ok') 403 403 self.assertEqual(self.browser.url, self.add_applicant_path) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/viewlets.py
r8666 r8684 19 19 from waeup.kofa.interfaces import IKofaObject 20 20 from waeup.kofa.students.viewlets import PrimaryStudentNavTab 21 from waeup.kofa.browser.viewlets import ManageActionButton, PrimaryNavTab 21 from waeup.kofa.browser.viewlets import ( 22 ManageActionButton, PrimaryNavTab, AddActionButton) 22 23 from waeup.kofa.applicants.interfaces import ( 23 24 IApplicant, IApplicantsRoot, IApplicantsContainer, … … 107 108 target = 'register' 108 109 110 class ApplicantsContainerAddActionButton(AddActionButton): 111 grok.order(1) 112 grok.context(IApplicantsContainer) 113 grok.view(ApplicantsContainerManageFormPage) 114 grok.require('waeup.manageApplication') 115 text = _('Add applicant') 116 target = 'addapplicant' 117 109 118 class ApplicantsContainerStatisticsActionButton(ManageActionButton): 110 grok.order( 1)119 grok.order(2) 111 120 grok.context(IApplicantsContainer) 112 121 grok.view(ApplicantsContainerManageFormPage)
Note: See TracChangeset for help on using the changeset viewer.