Ignore:
Timestamp:
22 Apr 2013, 05:20:58 (12 years ago)
Author:
Henrik Bettermann
Message:

Customize pg application forms.

Location:
main/waeup.futminna/trunk/src/waeup/futminna/applicants
Files:
2 added
2 edited

Legend:

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

    r9058 r10088  
    2323    IApplicantBaseData,
    2424    AppCatCertificateSource, CertificateSource)
    25 from waeup.kofa.schoolgrades import ResultEntryField
    26 from waeup.kofa.interfaces import (
    27     SimpleKofaVocabulary, academic_sessions_vocab, validate_email)
    28 from waeup.kofa.schema import FormattedDate, TextLineChoice
    29 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source
     25from waeup.kofa.students.vocabularies import nats_vocab
    3126from kofacustom.nigeria.applicants.interfaces import (
    32     LGASource, high_qual, high_grade, exam_types,
    33     INigeriaUGApplicant, INigeriaPGApplicant,
     27    LGASource,
     28    INigeriaUGApplicant,
    3429    INigeriaApplicantOnlinePayment,
    3530    INigeriaUGApplicantEdit, INigeriaPGApplicantEdit,
    3631    INigeriaApplicantUpdateByRegNo,
    3732    IPUTMEApplicantEdit,
     33    OMIT_DISPLAY_FIELDS,
     34    UG_OMIT_DISPLAY_FIELDS,
     35    UG_OMIT_PDF_FIELDS,
     36    UG_OMIT_MANAGE_FIELDS,
     37    UG_OMIT_EDIT_FIELDS,
    3838    )
     39
     40
     41PG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ('course2',)
     42PG_OMIT_PDF_FIELDS = PG_OMIT_DISPLAY_FIELDS + ('phone',)
     43PG_OMIT_MANAGE_FIELDS = ('course2',)
     44PG_OMIT_EDIT_FIELDS = PG_OMIT_MANAGE_FIELDS + PG_OMIT_DISPLAY_FIELDS + (
     45    'student_id', 'notice',
     46    'screening_score', 'screening_venue',
     47    'screening_date',)
     48
    3949from waeup.futminna.interfaces import MessageFactory as _
    40 from waeup.futminna.payments.interfaces import ICustomOnlinePayment
    4150
    4251class ICustomUGApplicant(INigeriaUGApplicant):
     
    4857    """
    4958
    50 class ICustomPGApplicant(INigeriaPGApplicant):
     59class ICustomPGApplicant(IApplicantBaseData):
    5160    """A postgraduate applicant.
    5261
     
    5564    adding them to the PG_OMIT* tuples.
    5665    """
     66
     67    nationality = schema.Choice(
     68        source = nats_vocab,
     69        title = _(u'Nationality'),
     70        required = True,
     71        )
     72    lga = schema.Choice(
     73        source = LGASource(),
     74        title = _(u'State/LGA (Nigerians only)'),
     75        required = False,
     76        )
     77    perm_address = schema.Text(
     78        title = _(u'Permanent Address'),
     79        required = False,
     80        )
     81    course1 = schema.Choice(
     82        title = _(u'Programme desired'),
     83        source = AppCatCertificateSource(),
     84        required = True,
     85        )
     86    notice = schema.Text(
     87        title = _(u'Notice'),
     88        required = False,
     89        readonly = False,
     90        )
     91    #screening_venue = schema.TextLine(
     92    #    title = _(u'Screening Venue'),
     93    #    required = False,
     94    #    )
     95    #screening_date = schema.TextLine(
     96    #    title = _(u'Screening Date'),
     97    #    required = False,
     98    #    )
     99    #screening_score = schema.Int(
     100    #    title = _(u'Screening Score (%)'),
     101    #    required = False,
     102    #    )
     103    student_id = schema.TextLine(
     104        title = _(u'Student Id'),
     105        required = False,
     106        readonly = False,
     107        )
     108    course_admitted = schema.Choice(
     109        title = _(u'Admitted Course of Study'),
     110        source = CertificateSource(),
     111        required = False,
     112        readonly = False,
     113        )
     114    locked = schema.Bool(
     115        title = _(u'Form locked'),
     116        default = False,
     117        )
    57118
    58119class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant):
  • main/waeup.futminna/trunk/src/waeup/futminna/applicants/utils.py

    r8833 r10088  
    2323import grok
    2424from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils
    25 
     25from waeup.futminna.interfaces import MessageFactory as _
    2626
    2727
     
    2929    """A collection of parameters and methods subject to customization.
    3030    """
     31
     32    SEPARATORS_DICT = {
     33      'form.student_id': _(u'Process Data'),
     34      }
Note: See TracChangeset for help on using the changeset viewer.