Changeset 15950
- Timestamp:
- 24 Jan 2020, 08:36:46 (5 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/applicant.py
r15530 r15950 26 26 from waeup.aaue.applicants.interfaces import( 27 27 ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, 28 IPUTMEApplicantEdit, ITranscriptApplicant, ICertificateRequest) 28 IPUTMEApplicantEdit, ITranscriptApplicant, ICertificateRequest, 29 IFedexRequest) 29 30 30 31 @grok.subscribe(ICustomApplicant, grok.IObjectRemovedEvent) … … 41 42 grok.implements(ICustomApplicant, ICustomUGApplicantEdit, 42 43 ICustomPGApplicantEdit, IPUTMEApplicantEdit, 43 ITranscriptApplicant, ICertificateRequest) 44 ITranscriptApplicant, ICertificateRequest, 45 IFedexRequest) 44 46 grok.provides(ICustomApplicant) 45 47 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r15948 r15950 54 54 ICustomApplicant, 55 55 IVerificationRequest, 56 ISendByEmailRequest 56 ISendByEmailRequest, 57 IFedexRequest 57 58 ) 58 59 … … 246 247 form_fields['body_address'].custom_widget = BytesDisplayWidget 247 248 return form_fields 249 if self.target is not None and self.target == 'fedex': 250 form_fields = grok.AutoFields(IFedexRequest).omit( 251 'locked', 'suspended') 252 form_fields['dispatch_address'].custom_widget = BytesDisplayWidget 253 return form_fields 248 254 if self.target is not None and self.target == 'send': 249 255 form_fields = grok.AutoFields(ISendByEmailRequest).omit( … … 415 421 form_fields['applicant_id'].for_display = True 416 422 return form_fields 423 if self.target is not None and self.target == 'fedex': 424 form_fields = grok.AutoFields(IFedexRequest) 425 form_fields['applicant_id'].for_display = True 426 return form_fields 417 427 # AAUE is using the same interface for all regular applications. 418 428 form_fields = grok.AutoFields(ICustomUGApplicant) … … 532 542 if self.target is not None and self.target == 'send': 533 543 form_fields = grok.AutoFields(ISendByEmailRequest).omit( 544 'locked', 'suspended') 545 form_fields['applicant_id'].for_display = True 546 return form_fields 547 if self.target is not None and self.target == 'fedex': 548 form_fields = grok.AutoFields(IFedexRequest).omit( 534 549 'locked', 'suspended') 535 550 form_fields['applicant_id'].for_display = True -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r15861 r15950 899 899 ) 900 900 901 class IFedexRequest(IKofaObject): 902 """A applicant requests payment for courier. 903 """ 904 905 suspended = schema.Bool( 906 title = _(u'Account suspended'), 907 default = False, 908 required = False, 909 ) 910 911 locked = schema.Bool( 912 title = _(u'Form locked'), 913 default = False, 914 required = False, 915 ) 916 917 applicant_id = schema.TextLine( 918 title = _(u'Applicant Id'), 919 required = False, 920 readonly = False, 921 ) 922 923 #reg_number = TextLineChoice( 924 # title = _(u'Kofa Registration Number'), 925 # readonly = False, 926 # required = True, 927 # source = contextual_reg_num_source, 928 # ) 929 930 firstname = schema.TextLine( 931 title = _(u'First Name'), 932 required = True, 933 ) 934 935 middlename = schema.TextLine( 936 title = _(u'Middle Name'), 937 required = False, 938 ) 939 940 lastname = schema.TextLine( 941 title = _(u'Last Name (Surname)'), 942 required = True, 943 ) 944 945 sex = schema.Choice( 946 title = _(u'Gender'), 947 source = GenderSource(), 948 required = True, 949 ) 950 951 email = schema.ASCIILine( 952 title = _(u'Email Address'), 953 required = True, 954 constraint=validate_email, 955 ) 956 957 phone = PhoneNumber( 958 title = _(u'Phone'), 959 description = u'', 960 required = False, 961 ) 962 963 matric_number = schema.TextLine( 964 title = _(u'WES Reference Number (where applicable)'), 965 readonly = False, 966 required = False, 967 ) 968 969 dispatch_address = schema.Text( 970 title = _(u'Dispatch Address'), 971 required = True, 972 ) 973 901 974 class ISendByEmailRequest(IKofaObject): 902 975 """A applicant asking for sending an email. -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py
r15948 r15950 47 47 'ver': ['Verification Request', 'VR'], 48 48 'send': ['Send-By-Email Request', 'SE'], 49 'fedex': ['Payment for Courier (Fedex)', 'FED'], 49 50 } 50 51
Note: See TracChangeset for help on using the changeset viewer.