Changeset 14865


Ignore:
Timestamp:
6 Oct 2017, 14:05:18 (7 years ago)
Author:
Henrik Bettermann
Message:

Customize ISpecialApplicant.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/applicant.py

    r14721 r14865  
    2323from kofacustom.nigeria.applicants.applicant import NigeriaApplicant
    2424from kofacustom.dspg.applicants.interfaces import(
    25     ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, IPUTMEApplicantEdit)
     25    ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit,
     26    IPUTMEApplicantEdit, ICustomSpecialApplicant)
    2627
    2728class CustomApplicant(NigeriaApplicant):
    2829
    2930    grok.implements(ICustomApplicant, ICustomUGApplicantEdit,
    30         ICustomPGApplicantEdit, IPUTMEApplicantEdit)
     31        ICustomPGApplicantEdit, IPUTMEApplicantEdit, ICustomSpecialApplicant)
    3132    grok.provides(ICustomApplicant)
    3233
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/browser.py

    r14807 r14865  
    2626from waeup.kofa.interfaces import IExtFileStore, IKofaUtils
    2727from waeup.kofa.applicants.interfaces import (
    28     IApplicant, IApplicantEdit, ISpecialApplicant)
     28    IApplicant, IApplicantEdit)
    2929from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage,
    3030    ApplicantManageFormPage, ApplicantEditFormPage,
     
    4242from kofacustom.dspg.applicants.interfaces import (
    4343    ICustomUGApplicant, ICustomUGApplicantEdit,
     44    ICustomSpecialApplicant,
    4445    ND_OMIT_DISPLAY_FIELDS,
    4546    ND_OMIT_PDF_FIELDS,
     
    8081    def form_fields(self):
    8182        if self.context.special:
    82             return grok.AutoFields(ISpecialApplicant)
     83            return grok.AutoFields(ICustomSpecialApplicant)
    8384        form_fields = grok.AutoFields(ICustomUGApplicant)
    8485        if self.context.is_nd:
     
    162163    def form_fields(self):
    163164        if self.context.special:
    164             form_fields = grok.AutoFields(ISpecialApplicant)
     165            form_fields = grok.AutoFields(ICustomSpecialApplicant)
    165166            form_fields['applicant_id'].for_display = True
    166167            return form_fields
     
    176177        return form_fields
    177178
     179    def setUpWidgets(self, ignore_request=False):
     180        super(CustomApplicantManageFormPage,self).setUpWidgets(ignore_request)
     181        if self.context.special:
     182            self.widgets['carryover_courses'].height = 3
     183        return
     184
    178185class CustomApplicantEditFormPage(ApplicantEditFormPage):
    179186    """An applicant-centered edit view for applicant data.
     
    186193    def form_fields(self):
    187194        if self.context.special:
    188             form_fields = grok.AutoFields(ISpecialApplicant).omit(
     195            form_fields = grok.AutoFields(ICustomSpecialApplicant).omit(
    189196                'locked', 'suspended')
    190197            form_fields['applicant_id'].for_display = True
     
    203210        form_fields['reg_number'].for_display = True
    204211        return form_fields
     212
     213    def setUpWidgets(self, ignore_request=False):
     214        super(CustomApplicantEditFormPage,self).setUpWidgets(ignore_request)
     215        if self.context.special:
     216            self.widgets['carryover_courses'].height = 3
     217        return
    205218
    206219    @property
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/interfaces.py

    r14831 r14865  
    2828from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber
    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, ISpecialApplicant)
    3132from kofacustom.nigeria.applicants.interfaces import (
    3233    LGASource, high_qual, high_grade, exam_types,
     
    281282    """
    282283
    283 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant):
     284class ICustomSpecialApplicant(ISpecialApplicant):
     285
     286    carryover_courses = schema.Text(
     287        title = _(u'Carry-Over Courses'),
     288        required = False,
     289        description = _(
     290            u'Enter course titles if carry-over remedial payment.'),
     291        )
     292
     293class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant,
     294                       ICustomSpecialApplicant):
    284295    """An interface for both types of applicants.
    285296
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/locales/en/LC_MESSAGES/waeup.kofa.po

    r10765 r14865  
    99"Content-Type: text/plain; charset=iso-8859-1\n"
    1010"Content-Transfer-Encoding: 8bit\n"
     11"Language: en\n"
     12"X-Generator: Poedit 1.6.5\n"
    1113
    1214msgid "Academics"
    1315msgstr "Institutions"
    1416
     17msgid "Special Application"
     18msgstr "Remedial Payment"
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/utils/utils.py

    r14864 r14865  
    159159        'hnd_transcript_foreign': 'HND Transcript (foreign)',
    160160        'pgd_transcript_foreign': 'PGD Transcript (foreign)',
    161         'ver_result': 'Verification of Result Payment',
    162         'change_course': 'Change of Course Payment',
    163         'change_inst': 'Change of Institute Payment',
    164         'jamb_reject': 'JAMB Rejection Form Payment',
    165         'cert_of_cert': 'Certification of Certificate Payment',
    166         'ref_let': 'Recommendation/Reference Letter Payment',
    167         'proc_cert': 'Processing of Certificate by Proxy Payment',
     161        'ver_result': 'Verification of Result',
     162        'change_course': 'Change of Course',
     163        'change_inst': 'Change of Institute',
     164        'jamb_reject': 'JAMB Rejection Form',
     165        'cert_of_cert': 'Certification of Certificate',
     166        'ref_let': 'Recommendation/Reference Letter',
     167        'proc_cert': 'Processing of Certificate by Proxy',
    168168        'loss_idcard': 'Loss of ID Card (student)',
    169169        'staff_loss_idcard': 'Loss of ID Card (staff)',
    170         'loss_examcard': 'Loss of Exam Card Payment',
    171         'loss_result': 'Loss of Result Payment',
    172         'loss_receipt': 'Loss of Receipt Payment',
    173         'loss_clearance': 'Loss of Clearance Payment',
     170        'loss_examcard': 'Loss of Exam Card',
     171        'loss_result': 'Loss of Result',
     172        'loss_receipt': 'Loss of Receipt',
     173        'loss_clearance': 'Loss of Clearance',
    174174        'conv_brochure': 'ND Convocation Brochure',
    175175        'hnd_conv_brochure': 'HND Convocation Brochure',
     
    181181        'nysc_id_card': 'NYSC ID Card',
    182182        'ijmb_result':'IJMB Result',
    183         'carryover1': '1, 2 or 3 Carry-Over Courses',
    184         'carryover4': '4 Carry-Over Courses',
    185         'carryover5': '5 Carry-Over Courses',
    186         'carryover6': '6 Carry-Over Courses',
    187         'carryover7': '7 Carry-Over Courses',
    188         'carryover8': '8 Carry-Over Courses',
    189         'carryover9': '9 Carry-Over Courses',
     183        'carryover1': '01, 02 or 03 Carry-Over Courses',
     184        'carryover4': '04 Carry-Over Courses',
     185        'carryover5': '05 Carry-Over Courses',
     186        'carryover6': '06 Carry-Over Courses',
     187        'carryover7': '07 Carry-Over Courses',
     188        'carryover8': '08 Carry-Over Courses',
     189        'carryover9': '09 Carry-Over Courses',
    190190        'carryover10': '10 Carry-Over Courses',
    191191        }
Note: See TracChangeset for help on using the changeset viewer.