Ignore:
Timestamp:
7 Mar 2024, 12:57:10 (7 months ago)
Author:
Henrik Bettermann
Message:

Simplify application

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.udss/trunk/src/kofacustom/udss/applicants/interfaces.py

    r17689 r17711  
    2828from waeup.kofa.schema import FormattedDate, TextLineChoice
    2929from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source
     30from waeup.kofa.applicants.interfaces import (
     31    contextual_reg_num_source, IApplicantBaseData, IApplicantOnlinePayment,
     32    IApplicantUpdateByRegNo)
    3133from kofacustom.nigeria.applicants.interfaces import (
    3234    LGASource, high_qual, high_grade, exam_types,
    33     INigeriaUGApplicant, INigeriaPGApplicant,
    34     INigeriaApplicantOnlinePayment,
    35     INigeriaUGApplicantEdit, INigeriaPGApplicantEdit,
    36     INigeriaApplicantUpdateByRegNo,
    37     IPUTMEApplicantEdit,
    38     )
     35    INigeriaApplicantOnlinePayment)
    3936from kofacustom.udss.interfaces import MessageFactory as _
    4037from kofacustom.udss.payments.interfaces import ICustomOnlinePayment
    4138
    42 class ICustomUGApplicant(INigeriaUGApplicant):
     39class ICustomUGApplicant(IApplicantBaseData):
    4340    """An undergraduate applicant.
    4441
     
    4845    """
    4946
    50 class ICustomPGApplicant(INigeriaPGApplicant):
    51     """A postgraduate applicant.
    5247
    53     This interface defines the least common multiple of all fields
    54     in pg application forms. In customized forms, fields can be excluded by
    55     adding them to the PG_OMIT* tuples.
    56     """
    57 
    58 
    59 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant):
     48class ICustomApplicant(ICustomUGApplicant):
    6049    """An interface for both types of applicants.
    6150
     
    7665        """
    7766
    78 class ICustomUGApplicantEdit(INigeriaUGApplicantEdit):
     67class ICustomUGApplicantEdit(ICustomUGApplicant):
    7968    """An undergraduate applicant interface for edit forms.
    8069
     
    8877    """
    8978
    90 class ICustomPGApplicantEdit(INigeriaPGApplicantEdit):
    91     """A postgraduate applicant interface for editing.
    92 
    93     Here we can repeat the fields from base data and set the
    94     `required` and `readonly` attributes to True to further restrict
    95     the data access. Or we can allow only certain certificates to be
    96     selected by choosing the appropriate source.
    97 
    98     We cannot omit fields here. This has to be done in the
    99     respective form page.
    100     """
     79    email = schema.ASCIILine(
     80        title = _(u'Email Address'),
     81        required = True,
     82        constraint=validate_email,
     83        )
     84    date_of_birth = FormattedDate(
     85        title = _(u'Date of Birth'),
     86        required = True,
     87        show_year = True,
     88        )
    10189
    10290class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment):
     
    10593    """
    10694
    107 class IPUTMEApplicantEdit(IPUTMEApplicantEdit):
    108     """An undergraduate applicant interface for editing.
    109 
    110     Here we can repeat the fields from base data and set the
    111     `required` and `readonly` attributes to True to further restrict
    112     the data access. Or we can allow only certain certificates to be
    113     selected by choosing the appropriate source.
    114 
    115     We cannot omit fields here. This has to be done in the
    116     respective form page.
    117     """
    118 
    119 class ICustomApplicantUpdateByRegNo(INigeriaApplicantUpdateByRegNo):
     95class ICustomApplicantUpdateByRegNo(IApplicantUpdateByRegNo):
    12096    """Representation of an applicant.
    12197
Note: See TracChangeset for help on using the changeset viewer.