Changeset 17744 for main/waeup.fceokene


Ignore:
Timestamp:
23 Apr 2024, 16:13:48 (7 months ago)
Author:
Henrik Bettermann
Message:

Email addresses of applicants must be unique.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/interfaces.py

    r17359 r17744  
    3131from waeup.kofa.schoolgrades import ResultEntryField
    3232from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    33 from waeup.kofa.applicants.interfaces import contextual_reg_num_source
     33from waeup.kofa.applicants.interfaces import (
     34    contextual_reg_num_source,
     35    contextual_email_source,
     36    IApplicantRegisterUpdate)
    3437from kofacustom.nigeria.applicants.interfaces import (
    3538    LGASource, high_qual, high_grade, exam_types,
     
    158161        )
    159162
    160     email = schema.ASCIILine(
     163    email = TextLineChoice(
    161164        title = _(u'Email Address'),
    162165        required = True,
    163166        constraint=validate_email,
     167        source = contextual_email_source,
    164168        )
    165169
     
    243247        )
    244248
    245     email = schema.ASCIILine(
     249    email = TextLineChoice(
    246250        title = _(u'Email Address'),
    247251        required = True,
    248252        constraint=validate_email,
     253        source = contextual_email_source,
    249254        )
    250255
     
    286291    adding them to the OMIT* tuples.
    287292    """
     293
     294    email = TextLineChoice(
     295        title = _(u'Email Address'),
     296        required = True,
     297        constraint=validate_email,
     298        source = contextual_email_source,
     299        )
    288300
    289301    nationality = schema.Choice(
     
    456468        )
    457469
     470ICustomUGApplicant[
     471    'email'].order =  INigeriaUGApplicant['email'].order
    458472
    459473class ICustomPGApplicant(INigeriaPGApplicant):
     
    464478    adding them to the PG_OMIT* tuples.
    465479    """
     480
     481    email = TextLineChoice(
     482        title = _(u'Email Address'),
     483        required = True,
     484        constraint=validate_email,
     485        source = contextual_email_source,
     486        )
     487
     488ICustomPGApplicant[
     489    'email'].order =  INigeriaPGApplicant['email'].order
    466490
    467491class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant,
     
    497521    """
    498522
    499 
    500     email = schema.ASCIILine(
     523    email = TextLineChoice(
    501524        title = _(u'Email Address'),
    502525        required = True,
    503526        constraint=validate_email,
     527        source = contextual_email_source,
    504528        )
    505529    date_of_birth = FormattedDate(
     
    539563    """
    540564
    541     email = schema.ASCIILine(
     565    email = TextLineChoice(
    542566        title = _(u'Email Address'),
    543567        required = True,
    544568        constraint=validate_email,
     569        source = contextual_email_source,
    545570        )
    546571    date_of_birth = FormattedDate(
     
    580605    """
    581606
     607class ICustomApplicantRegisterUpdate(IApplicantRegisterUpdate):
     608    """This is a representation of an applicant for first-time registration.
     609    This interface is used when applicants use the registration page to
     610    update their records.
     611    """
     612
     613    email = TextLineChoice(
     614        title = _(u'Email Address'),
     615        required = False,
     616        constraint=validate_email,
     617        source = contextual_email_source,
     618        )
     619
Note: See TracChangeset for help on using the changeset viewer.