Changeset 16276 for main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Timestamp:
- 9 Oct 2020, 09:00:55 (4 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser.py
r16220 r16276 55 55 ICustomPGApplicantEdit, ICustomUGApplicantEdit, 56 56 ICustomApplicantOnlinePayment, ICustomApplicantRefereeReport, 57 ITranscriptApplicant 57 ITranscriptApplicant, ICustomApplicantRegisterUpdate 58 58 ) 59 59 from kofacustom.iuokada.interfaces import MessageFactory as _ … … 369 369 return form_fields 370 370 371 class CustomApplicantRegistrationPage(ApplicantRegistrationPage): 372 """Captcha'd registration page for applicants. 373 """ 374 @property 375 def form_fields(self): 376 form_fields = None 377 if self.context.mode == 'update': 378 form_fields = grok.AutoFields(ICustomApplicantRegisterUpdate).select( 379 'lastname','reg_number','email') 380 else: #if self.context.mode == 'create': 381 form_fields = grok.AutoFields(ICustomUGApplicant).select( 382 'firstname', 'middlename', 'lastname', 'email', 'phone') 383 return form_fields 384 371 385 class RefereeReportAddFormPage(RefereeReportAddFormPage): 372 386 """Add-form to add an referee report. This form -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/interfaces.py
r16165 r16276 36 36 nats_vocab, GenderSource, StudyLevelSource) 37 37 from waeup.kofa.applicants.interfaces import ( 38 contextual_reg_num_source, IApplicantBaseData, IApplicantRefereeReport) 38 contextual_reg_num_source, IApplicantBaseData, IApplicantRefereeReport, 39 contextual_email_source, IApplicantRegisterUpdate) 39 40 from waeup.kofa.refereeentries import RefereeEntryField 40 41 from kofacustom.nigeria.applicants.interfaces import ( … … 144 145 """ 145 146 147 email = TextLineChoice( 148 title = _(u'Email Address Test'), 149 required = False, 150 constraint=validate_email, 151 source = contextual_email_source, 152 ) 153 146 154 subtype = schema.Choice( 147 155 title = _(u'Application Subtype'), … … 379 387 adding them to the PG_OMIT* tuples. 380 388 """ 389 390 email = TextLineChoice( 391 title = _(u'Email Address Test'), 392 required = False, 393 constraint=validate_email, 394 source = contextual_email_source, 395 ) 381 396 382 397 sponsor = schema.Choice( … … 603 618 required = True, 604 619 ) 605 email = schema.ASCIILine(606 title = _(u'Email Address '),607 required = True,620 email = TextLineChoice( 621 title = _(u'Email Address Test'), 622 required = False, 608 623 constraint=validate_email, 624 source = contextual_email_source, 609 625 ) 610 626 date_of_birth = FormattedDate( … … 638 654 required = True, 639 655 ) 640 email = schema.ASCIILine(641 title = _(u'Email Address '),642 required = True,656 email = TextLineChoice( 657 title = _(u'Email Address Test'), 658 required = False, 643 659 constraint=validate_email, 660 source = contextual_email_source, 644 661 ) 645 662 date_of_birth = FormattedDate( … … 656 673 'phone'].order = ICustomPGApplicantEdit['email'].order 657 674 675 class ICustomApplicantRegisterUpdate(IApplicantRegisterUpdate): 676 """This is a representation of an applicant for first-time registration. 677 This interface is used when applicants use the registration page to 678 update their records. 679 """ 680 681 email = TextLineChoice( 682 title = _(u'Email Address Test'), 683 required = False, 684 constraint=validate_email, 685 source = contextual_email_source, 686 ) 687 658 688 class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment): 659 689 """An applicant payment via payment gateways.
Note: See TracChangeset for help on using the changeset viewer.