Ignore:
Timestamp:
27 Nov 2024, 00:30:20 (4 weeks ago)
Author:
Henrik Bettermann
Message:

Implement African Institute of management and Leadership application.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/applicants
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r17597 r17964  
    5454    IPUTMEApplicantEdit,
    5555    ITranscriptApplicant,
    56     IFrenchApplicant)
     56    IFrenchApplicant,
     57    IAfrimalApplicant)
    5758from waeup.kofa.applicants.workflow import ADMITTED, PAID, STARTED
    5859from kofacustom.nigeria.applicants.interfaces import (
     
    298299                form_fields = form_fields.omit(field)
    299300            return form_fields
     301        if self.target is not None and self.target == 'afrimal':
     302            form_fields = grok.AutoFields(IAfrimalApplicant)
     303            for field in REGISTRATION_OMIT_DISPLAY_FIELDS:
     304                form_fields = form_fields.omit(field)
     305            return form_fields
    300306        if self.target == 'ictwk':
    301307            form_fields = grok.AutoFields(IUnibenRegistration)
     
    505511                form_fields = form_fields.omit(field)
    506512            return form_fields
     513        if self.target is not None and self.target == 'afrimal':
     514            form_fields = grok.AutoFields(IAfrimalApplicant)
     515            for field in REGISTRATION_OMIT_MANAGE_FIELDS:
     516                form_fields = form_fields.omit(field)
     517            return form_fields
    507518        if self.target is not None and self.target.startswith('pg'):
    508519            form_fields = grok.AutoFields(ICustomPGApplicant)
     
    627638        if self.target is not None and self.target == 'flc':
    628639            form_fields = grok.AutoFields(IFrenchApplicant)
     640            for field in REGISTRATION_OMIT_EDIT_FIELDS:
     641                form_fields = form_fields.omit(field)
     642            return form_fields
     643        if self.target is not None and self.target == 'afrimal':
     644            form_fields = grok.AutoFields(IAfrimalApplicant)
    629645            for field in REGISTRATION_OMIT_EDIT_FIELDS:
    630646                form_fields = form_fields.omit(field)
     
    821837        elif self.target is not None and self.target == 'flc':
    822838            form_fields = grok.AutoFields(IFrenchApplicant)
     839            for field in REGISTRATION_OMIT_PDF_FIELDS:
     840                form_fields = form_fields.omit(field)
     841        elif self.target is not None and self.target == 'afrimal':
     842            form_fields = grok.AutoFields(IAfrimalApplicant)
    823843            for field in REGISTRATION_OMIT_PDF_FIELDS:
    824844                form_fields = form_fields.omit(field)
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py

    r17659 r17964  
    614614        )
    615615
     616class IAfrimalApplicant(IKofaObject):
     617    """An AFRIMAL applicant.
     618    """
     619
     620    suspended = schema.Bool(
     621        title = _(u'Account suspended'),
     622        default = False,
     623        required = False,
     624        )
     625
     626    locked = schema.Bool(
     627        title = _(u'Form locked'),
     628        default = False,
     629        required = False,
     630        )
     631
     632    applicant_id = schema.TextLine(
     633        title = _(u'Applicant Id'),
     634        required = False,
     635        readonly = False,
     636        )
     637
     638    firstname = schema.TextLine(
     639        title = _(u'First Name'),
     640        required = True,
     641        )
     642
     643    middlename = schema.TextLine(
     644        title = _(u'Middle Name'),
     645        required = False,
     646        )
     647
     648    lastname = schema.TextLine(
     649        title = _(u'Surname'),
     650        required = True,
     651        )
     652
     653    date_of_birth = FormattedDate(
     654        title = _(u'Date of Birth'),
     655        required = False,
     656        #date_format = u'%d/%m/%Y', # Use grok-instance-wide default
     657        show_year = True,
     658        )
     659
     660    sex = schema.Choice(
     661        title = _(u'Gender'),
     662        source = GenderSource(),
     663        required = True,
     664        )
     665
     666    nationality = schema.Choice(
     667        vocabulary = nats_vocab,
     668        title = _(u'Nationality'),
     669        required = False,
     670        )
     671
     672    email = schema.ASCIILine(
     673        title = _(u'Email Address'),
     674        required = True,
     675        constraint=validate_email,
     676        )
     677
     678    phone = PhoneNumber(
     679        title = _(u'Phone'),
     680        description = u'',
     681        required = False,
     682        )
     683
     684    hq_obtained = schema.Choice(
     685        title = _(u'Highest Qualification Obtained'),
     686        required = False,
     687        readonly = False,
     688        vocabulary = high_qual,
     689        )
     690
     691    current_employer = schema.TextLine(
     692        title = _(u'Current Employer'),
     693        required = False,
     694        )
     695
     696    course1 = schema.Choice(
     697        title = _(u'Course of Study'),
     698        source = AppCatCertificateSource(),
     699        required = True,
     700        )
     701
     702    course_admitted = schema.Choice(
     703        title = _(u'Admitted Course of Study'),
     704        source = CertificateSource(),
     705        required = False,
     706        )
     707
    616708class ICustomUGApplicant(IApplicantBaseData, IBankAccount):
    617709    """An undergraduate applicant.
     
    839931
    840932class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant,
    841     IUnibenRegistration, ITranscriptApplicant, IFrenchApplicant):
     933    IUnibenRegistration, ITranscriptApplicant, IFrenchApplicant,
     934    IAfrimalApplicant):
    842935    """An interface for both types of applicants.
    843936
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py

    r17826 r17964  
    6868        'flc': ['French Language Centre', 'FR'],
    6969        'cdl': ['Centre For Distance Learning Programmes', 'CDL'],
     70        'afrimal': ['African Institute of Management and Leadership Programmes', 'AFR'],
    7071        }
    7172
Note: See TracChangeset for help on using the changeset viewer.