Changeset 7200 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 25 Nov 2011, 14:10:21 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 2 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7199 r7200 292 292 text = 'Manage applicants container' 293 293 294 class LoginApplicantActionButton(ManageActionButton):294 class ApplicantLoginActionButton(ManageActionButton): 295 295 grok.order(2) 296 296 grok.context(IApplicantsContainer) … … 394 394 return del_local_roles(self,3,**data) 395 395 396 class LoginApplicant(WAeUPPage):396 class ApplicantLoginPage(WAeUPPage): 397 397 grok.context(IApplicantsContainer) 398 398 grok.name('login') … … 509 509 applicant.access_code = pin 510 510 self.context[pin] = applicant 511 self.redirect(self.url(self.context[pin], ' edit_full'))511 self.redirect(self.url(self.context[pin], 'manage')) 512 512 return 513 513 … … 555 555 target = '/application_slip.pdf' 556 556 557 class DisplayApplicant(WAeUPDisplayFormPage):557 class ApplicantDisplayFormPage(WAeUPDisplayFormPage): 558 558 grok.context(IApplicant) 559 559 grok.name('index') 560 560 grok.require('waeup.viewApplication') 561 grok.template('applicantdisplaypage') 561 562 form_fields = grok.AutoFields(IApplicant).omit( 562 563 'locked').omit('course_admitted') 563 564 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le') 564 565 label = 'Applicant' 565 grok.template('form_display')566 566 pnav = 3 567 567 … … 705 705 class ApplicantManageActionButton(ManageActionButton): 706 706 grok.context(IApplicant) 707 grok.view( DisplayApplicant)707 grok.view(ApplicantDisplayFormPage) 708 708 grok.require('waeup.manageApplication') 709 709 text = 'Manage application record' 710 target = ' edit_full'710 target = 'manage' 711 711 712 712 … … 729 729 return True 730 730 731 class EditApplicantFull(WAeUPEditFormPage):731 class ApplicantManageFormPage(WAeUPEditFormPage): 732 732 """A full edit view for applicant data. 733 733 """ 734 734 grok.context(IApplicant) 735 grok.name(' edit_full')735 grok.name('manage') 736 736 grok.require('waeup.manageApplication') 737 737 form_fields = grok.AutoFields(IApplicant) 738 738 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 739 grok.template(' form_edit')739 grok.template('applicanteditpage') 740 740 manage_applications = True 741 741 pnav = 3 … … 743 743 def update(self): 744 744 datepicker.need() # Enable jQuery datepicker in date fields. 745 super( EditApplicantFull, self).update()745 super(ApplicantManageFormPage, self).update() 746 746 self.wf_info = IWorkflowInfo(self.context) 747 747 self.max_upload_size = string_from_bytes(MAX_UPLOAD_SIZE) … … 796 796 return 797 797 798 class EditApplicantStudent(EditApplicantFull):798 class ApplicantEditFormPage(ApplicantManageFormPage): 799 799 """An applicant-centered edit view for applicant data. 800 800 """ … … 807 807 ) 808 808 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 809 grok.template(' form_edit')809 grok.template('applicanteditpage') 810 810 manage_applications = False 811 811 title = u'Your Application Form' … … 821 821 return 822 822 datepicker.need() # Enable jQuery datepicker in date fields. 823 super( EditApplicantStudent, self).update()823 super(ApplicantEditFormPage, self).update() 824 824 return 825 825 … … 862 862 class ApplicantViewActionButton(ManageActionButton): 863 863 grok.context(IApplicant) 864 grok.view( EditApplicantFull)864 grok.view(ApplicantManageFormPage) 865 865 grok.require('waeup.manageApplication') 866 866 icon = 'actionicon_view.png' -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r7193 r7200 290 290 self.applicant_path = 'http://localhost/app/applicants/app2009/%s' % self.pin_applicant 291 291 self.applicant_view_path = self.applicant_path + '/index' 292 self.applicant_manage_path = self.applicant_path + '/ edit_full'292 self.applicant_manage_path = self.applicant_path + '/manage' 293 293 self.applicant_slip_path = self.applicant_path + '/application_slip.pdf' 294 294 self.browser.open(self.applicant_manage_path) … … 603 603 self.edit_path = 'http://localhost/app/applicants/app2009/%s/edit' % ( 604 604 self.pin) 605 self. edit_full_path = 'http://localhost/app/applicants/%s/%s/%s' % (606 'app2009', self.pin, ' edit_full')605 self.manage_path = 'http://localhost/app/applicants/%s/%s/%s' % ( 606 'app2009', self.pin, 'manage') 607 607 608 608 def tearDown(self): … … 773 773 # Now go on as an officer 774 774 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 775 self.browser.open(self. edit_full_path)775 self.browser.open(self.manage_path) 776 776 777 777 # Create a pseudo image file and select it to be uploaded in form … … 848 848 # Login as manager and lock the form 849 849 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 850 self.browser.open(self. edit_full_path)850 self.browser.open(self.manage_path) 851 851 self.browser.getControl(name="form.locked").value = True 852 852 self.browser.getControl("Save").click()
Note: See TracChangeset for help on using the changeset viewer.