Changeset 15991 for main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Timestamp:
- 6 Feb 2020, 09:23:11 (5 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/applicant.py
r15951 r15991 27 27 ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, 28 28 IPUTMEApplicantEdit, ITranscriptApplicant, ICertificateRequest, 29 IFedexRequest )29 IFedexRequest, IRecruitment) 30 30 31 31 class CustomApplicant(NigeriaApplicant): … … 34 34 ICustomPGApplicantEdit, IPUTMEApplicantEdit, 35 35 ITranscriptApplicant, ICertificateRequest, 36 IFedexRequest )36 IFedexRequest, IRecruitment) 37 37 grok.provides(ICustomApplicant) 38 38 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r15954 r15991 56 56 IVerificationRequest, 57 57 ISendByEmailRequest, 58 IFedexRequest 58 IFedexRequest, 59 IRecruitment, 59 60 ) 60 61 … … 251 252 form_fields = grok.AutoFields(IFedexRequest).omit( 252 253 'locked', 'suspended') 253 form_fields['dispatch_address'].custom_widget = BytesDisplayWidget 254 if self.target is not None and self.target == 'rec': 255 form_fields = grok.AutoFields(IRecruitment).omit( 256 'locked', 'suspended') 257 form_fields['address'].custom_widget = BytesDisplayWidget 254 258 return form_fields 255 259 if self.target is not None and self.target == 'send': … … 426 430 form_fields['applicant_id'].for_display = True 427 431 return form_fields 432 if self.target is not None and self.target == 'rec': 433 form_fields = grok.AutoFields(IRecruitment) 434 form_fields['applicant_id'].for_display = True 435 return form_fields 428 436 # AAUE is using the same interface for all regular applications. 429 437 form_fields = grok.AutoFields(ICustomUGApplicant) … … 467 475 if not store.getFileByContext(self.context, attr=u'passport.jpg'): 468 476 return _('No passport picture uploaded.') 469 if not self.target [:4] in ('cert', 'tran') and \477 if not self.target in ('cert', 'trans') and \ 470 478 not self.request.form.get('confirm_passport', False): 471 479 return _('Passport picture confirmation box not ticked.') … … 553 561 if self.target is not None and self.target == 'fedex': 554 562 form_fields = grok.AutoFields(IFedexRequest).omit( 563 'locked', 'suspended') 564 form_fields['applicant_id'].for_display = True 565 return form_fields 566 if self.target is not None and self.target == 'rec': 567 form_fields = grok.AutoFields(IRecruitment).omit( 555 568 'locked', 'suspended') 556 569 form_fields['applicant_id'].for_display = True -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser_templates/applicanteditpage.pt
r15948 r15991 101 101 102 102 <div tal:condition="python: not view.manage_applications 103 and not view.target in ('trans', 'cert' )103 and not view.target in ('trans', 'cert', 'rec') 104 104 and context.__parent__.with_picture"> 105 105 <input id="confirm_passport" name="confirm_passport" … … 116 116 </div> 117 117 <div tal:condition="python: not view.manage_applications 118 and view.target not in ('trans', 'cert')118 and view.target in ('rec',) 119 119 and context.__parent__.with_picture"> 120 120 <input id="confirm_passport" name="confirm_passport" -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r15954 r15991 67 67 ) 68 68 69 application_types_vocab = SimpleKofaVocabulary( 70 (_('Academic Staff Positions'), 'academic'), 71 (_('Senior Non-Teaching Staff'), 'senior'), 72 (_('Junior Staff (Non-Teaching)'), 'junior'), 73 ) 74 69 75 request_types_vocab = SimpleKofaVocabulary( 70 76 (_('Scanned Result'), 'result'), … … 978 984 ) 979 985 986 class IRecruitment(IKofaObject): 987 """A recruitment application. 988 """ 989 990 suspended = schema.Bool( 991 title = _(u'Account suspended'), 992 default = False, 993 required = False, 994 ) 995 996 locked = schema.Bool( 997 title = _(u'Form locked'), 998 default = False, 999 required = False, 1000 ) 1001 1002 applicant_id = schema.TextLine( 1003 title = _(u'Application Id'), 1004 required = False, 1005 readonly = False, 1006 ) 1007 1008 #reg_number = TextLineChoice( 1009 # title = _(u'Kofa Registration Number'), 1010 # readonly = False, 1011 # required = True, 1012 # source = contextual_reg_num_source, 1013 # ) 1014 1015 application_types = schema.Choice( 1016 title = _(u'Application Category'), 1017 vocabulary = application_types_vocab, 1018 required = True, 1019 ) 1020 1021 firstname = schema.TextLine( 1022 title = _(u'First Name'), 1023 required = True, 1024 ) 1025 1026 middlename = schema.TextLine( 1027 title = _(u'Middle Name'), 1028 required = False, 1029 ) 1030 1031 lastname = schema.TextLine( 1032 title = _(u'Last Name (Surname)'), 1033 required = True, 1034 ) 1035 1036 sex = schema.Choice( 1037 title = _(u'Gender'), 1038 source = GenderSource(), 1039 required = True, 1040 ) 1041 1042 email = schema.ASCIILine( 1043 title = _(u'Email Address'), 1044 required = True, 1045 constraint=validate_email, 1046 ) 1047 1048 phone = PhoneNumber( 1049 title = _(u'Phone'), 1050 description = u'', 1051 required = False, 1052 ) 1053 1054 address = schema.Text( 1055 title = _(u'Address'), 1056 required = True, 1057 ) 1058 980 1059 class ISendByEmailRequest(IKofaObject): 981 1060 """A applicant asking for sending an email. … … 1059 1138 ITranscriptApplicant, ICertificateRequest, 1060 1139 IVerificationRequest, ISendByEmailRequest, 1061 IFedexRequest ):1140 IFedexRequest, IRecruitment): 1062 1141 """An interface for all types of applicants. 1063 1142 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py
r15950 r15991 48 48 'send': ['Send-By-Email Request', 'SE'], 49 49 'fedex': ['Payment for Courier (Fedex)', 'FED'], 50 'rec': ['AAU Recruitment', 'REC'], 50 51 } 51 52
Note: See TracChangeset for help on using the changeset viewer.