Changeset 16164 for main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Timestamp:
- 13 Jul 2020, 07:17:03 (4 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r16151 r16164 33 33 ExportPDFPageApplicationSlip, 34 34 ApplicantBaseDisplayFormPage, 35 CheckTranscriptStatus) 35 CheckTranscriptStatus, 36 AdditionalFile) 36 37 from waeup.kofa.students.interfaces import IStudentsUtils 37 38 from waeup.kofa.applicants.interfaces import ( … … 223 224 @property 224 225 def form_fields(self): 225 if self.target is not None and self.target == 't ransfull':226 if self.target is not None and self.target == 'tscf': 226 227 form_fields = grok.AutoFields(ITranscriptApplicant) 227 228 for field in TRANS_OMIT_FIELDS: … … 230 231 #form_fields['perm_address'].custom_widget = BytesDisplayWidget 231 232 return form_fields 232 if self.target is not None and self.target == 't ransshort':233 if self.target is not None and self.target == 'tscs': 233 234 form_fields = grok.AutoFields(ITranscriptApplicant) 234 235 for field in TRANS_SHORT_OMIT_FIELDS: … … 402 403 @property 403 404 def form_fields(self): 404 if self.target is not None and self.target == 't ransfull':405 if self.target is not None and self.target == 'tscf': 405 406 form_fields = grok.AutoFields(ITranscriptApplicant) 406 407 for field in TRANS_OMIT_FIELDS: 407 408 form_fields = form_fields.omit(field) 408 409 return form_fields 409 if self.target is not None and self.target == 't ransshort':410 if self.target is not None and self.target == 'tscs': 410 411 form_fields = grok.AutoFields(ITranscriptApplicant) 411 412 for field in TRANS_SHORT_OMIT_FIELDS: … … 472 473 @property 473 474 def form_fields(self): 474 if self.target is not None and self.target == 't ransfull':475 if self.target is not None and self.target == 'tscf': 475 476 form_fields = grok.AutoFields(ITranscriptApplicant) 476 477 for field in TRANS_OMIT_FIELDS: 477 478 form_fields = form_fields.omit(field) 478 479 return form_fields 479 if self.target is not None and self.target == 't ransshort':480 if self.target is not None and self.target == 'tscs': 480 481 form_fields = grok.AutoFields(ITranscriptApplicant) 481 482 for field in TRANS_SHORT_OMIT_FIELDS: … … 533 534 'a':container_title, 'b':self.context.application_number}) 534 535 return super(CustomApplicantEditFormPage, self).label 536 537 def display_fileupload(self, filename): 538 if filename[1] == 'res_stat.pdf' \ 539 and self.target is not None \ 540 and not self.target.startswith('tscf'): 541 return False 542 if filename[1] == 'eligibility.pdf' \ 543 and self.target is not None \ 544 and not self.target.startswith('tsc'): 545 return False 546 return True 547 548 def dataNotComplete(self, data): 549 store = getUtility(IExtFileStore) 550 if self.context.__parent__.with_picture: 551 store = getUtility(IExtFileStore) 552 if not store.getFileByContext(self.context, attr=u'passport.jpg'): 553 return _('No passport picture uploaded.') 554 if self.target is not None \ 555 and self.target.startswith('tscf') \ 556 and not store.getFileByContext(self.context, attr=u'res_stat.pdf'): 557 return _('No statement of result pdf file uploaded.') 558 if self.target is not None \ 559 and self.target.startswith('tsc') \ 560 and not store.getFileByContext(self.context, attr=u'eligibility.pdf'): 561 return _('No eligibility form pdf file uploaded.') 562 return False 535 563 536 564 class CustomOnlinePaymentApprovePage(OnlinePaymentApprovePage): … … 722 750 websites = (('Uniben Alumni Portal', 'https://uniben-alumni.waeup.org/'), 723 751 ('Uniben Student Portal', 'https://uniben.waeup.org/'),) 724 appl_url1 = 'https://uniben-alumni.waeup.org/applicants/transfull1/register' 725 appl_url2 = 'https://uniben-alumni.waeup.org/applicants/transshort1/register' 752 appl_url1 = 'https://uniben-alumni.waeup.org/applicants/tscf1/register' 753 appl_url2 = 'https://uniben-alumni.waeup.org/applicants/tscs1/register' 754 755 class ResultStatement(AdditionalFile): 756 grok.name('res_stat.pdf') 757 758 class EligibilityForm(AdditionalFile): 759 grok.name('eligibility.pdf') -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py
r16151 r16164 303 303 applicantscontainer.application_fee = 1.0 # Must be set but is not used. 304 304 applicantscontainer.code = u'trans1234' 305 applicantscontainer.prefix = 't ransfull'305 applicantscontainer.prefix = 'tscf' 306 306 applicantscontainer.title = u'This is a trans container' 307 307 applicantscontainer.application_category = 'no' -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r16144 r16164 31 31 """ 32 32 33 ADDITIONAL_FILES = ( 34 ('Eligibility Form','eligibility.pdf'), 35 ('Statement of Result','res_stat.pdf'), 36 ) 37 33 38 APP_TYPES_DICT = { 34 39 'pude': ['Post-UDE Screening', 'PUDE'], … … 60 65 '(2nd supplementary advert)', 'ASE'], 61 66 'spft': ['Special Full-Time Programmes', 'SP'], 62 't ransfull': ['Transcript Application (without student record)', 'TRF'],63 't ransshort': ['Transcript Application (with student record)', 'TRS'],67 'tscf': ['Transcript Application (without student record)', 'TRF'], 68 'tscs': ['Transcript Application (with student record)', 'TRS'], 64 69 } 65 70
Note: See TracChangeset for help on using the changeset viewer.