Changeset 15531 for main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Timestamp:
- 31 Jul 2019, 11:55:46 (5 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r15530 r15531 52 52 ICertificateRequest, 53 53 ICustomApplicant, 54 IVerificationRequest 54 IVerificationRequest, 55 ISendByEmailRequest 55 56 ) 56 57 … … 280 281 form_fields['body_address'].custom_widget = BytesDisplayWidget 281 282 return form_fields 283 if self.target is not None and self.target == 'send': 284 form_fields = grok.AutoFields(ISendByEmailRequest).omit( 285 'locked', 'suspended') 286 form_fields['body_address'].custom_widget = BytesDisplayWidget 287 return form_fields 282 288 if self.target is not None and self.target == 'cert': 283 289 form_fields = grok.AutoFields(ICertificateRequest).omit( … … 419 425 if self.target is not None and self.target == 'ver': 420 426 form_fields = grok.AutoFields(IVerificationRequest) 427 form_fields['applicant_id'].for_display = True 428 return form_fields 429 if self.target is not None and self.target == 'send': 430 form_fields = grok.AutoFields(ISendByEmailRequest) 421 431 form_fields['applicant_id'].for_display = True 422 432 return form_fields … … 482 492 not store.getFileByContext(self.context, attr=u'stateresult.pdf'): 483 493 return _('No statement of result pdf file uploaded.') 494 if self.target in ('ver',) and \ 495 not store.getFileByContext(self.context, attr=u'verificationdoc.pdf'): 496 return _('No pdf file uploaded.') 484 497 485 498 return False … … 544 557 if self.target is not None and self.target == 'ver': 545 558 form_fields = grok.AutoFields(IVerificationRequest).omit( 559 'locked', 'suspended') 560 form_fields['applicant_id'].for_display = True 561 return form_fields 562 if self.target is not None and self.target == 'send': 563 form_fields = grok.AutoFields(ISendByEmailRequest).omit( 546 564 'locked', 'suspended') 547 565 form_fields['applicant_id'].for_display = True -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r15530 r15531 867 867 ) 868 868 869 class ISendByEmailRequest(IKofaObject): 870 """A applicant asking for sending an email. 871 """ 872 873 suspended = schema.Bool( 874 title = _(u'Account suspended'), 875 default = False, 876 required = False, 877 ) 878 879 locked = schema.Bool( 880 title = _(u'Form locked'), 881 default = False, 882 required = False, 883 ) 884 885 applicant_id = schema.TextLine( 886 title = _(u'Applicant Id'), 887 required = False, 888 readonly = False, 889 ) 890 891 firstname = schema.TextLine( 892 title = _(u'First Name'), 893 required = True, 894 ) 895 896 middlename = schema.TextLine( 897 title = _(u'Middle Name'), 898 required = False, 899 ) 900 901 lastname = schema.TextLine( 902 title = _(u'Last Name (Surname)'), 903 required = True, 904 ) 905 906 email = schema.ASCIILine( 907 title = _(u"Applicant's Email Address"), 908 required = True, 909 constraint=validate_email, 910 ) 911 912 body_address = schema.Text( 913 title = _(u'Address of Requesting Organization'), 914 required = True, 915 ) 916 917 body_email = schema.ASCIILine( 918 title = _(u"Email Address of Requesting Organization"), 919 required = True, 920 constraint=validate_email, 921 ) 869 922 870 923 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant, 871 924 ITranscriptApplicant, ICertificateRequest, 872 IVerificationRequest ):925 IVerificationRequest, ISendByEmailRequest): 873 926 """An interface for all types of applicants. 874 927 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py
r15530 r15531 43 43 'dsh': ['Science and Humanities Programme', 'DSH'], 44 44 'ver': ['Verification Request', 'VR'], 45 'send': ['Send-By-Email Request', 'SE'], 45 46 } 46 47
Note: See TracChangeset for help on using the changeset viewer.