Ignore:
Timestamp:
29 Nov 2016, 08:15:06 (8 years ago)
Author:
Henrik Bettermann
Message:

Define and use ICustomUGStudentClearanceEdit.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r14296 r14298  
    7575    ICustomStudentPersonalEdit,
    7676    ICustomUGStudentClearance,
     77    ICustomUGStudentClearanceEdit,
    7778    ICustomPGStudentClearance,
    7879    ICustomCourseTicket,
     
    165166            'physical_clearance_date')
    166167        else:
    167             form_fields = grok.AutoFields(ICustomUGStudentClearance).omit(
     168            form_fields = grok.AutoFields(ICustomUGStudentClearanceEdit).omit(
    168169            'clearance_locked', 'clr_code', 'officer_comment',
    169170            'physical_clearance_date', 'date_of_birth', 'nationality', 'lga')
  • main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py

    r14297 r14298  
    431431            raise Invalid(_('Nationalty and LGA are contradictory.'))
    432432
     433class ICustomUGStudentClearanceEdit(ICustomUGStudentClearance):
     434    """Representation of ug student clearance data.
     435
     436    """
     437
     438    fst_sit_fname = schema.TextLine(
     439        title = _(u'Full Name'),
     440        required = True,
     441        readonly = False,
     442        )
     443    fst_sit_no = schema.TextLine(
     444        title = _(u'Exam Number'),
     445        required = True,
     446        readonly = False,
     447        )
     448
     449    fst_sit_sc_pin = schema.TextLine(
     450        title = _(u'Scratch Card Pin'),
     451        required = True,
     452        readonly = False,
     453        )
     454
     455    fst_sit_sc_serial_number = schema.TextLine(
     456        title = _(u'Scratch Card Serial Number'),
     457        required = True,
     458        readonly = False,
     459        )
     460
     461    fst_sit_date = FormattedDate(
     462        title = _(u'Exam Date'),
     463        required = True,
     464        readonly = False,
     465        show_year = True,
     466        )
     467
     468    fst_sit_type = schema.Choice(
     469        title = _(u'Exam Type'),
     470        required = True,
     471        readonly = False,
     472        vocabulary = exam_types,
     473        )
     474
     475    fst_sit_results = schema.List(
     476        title = _(u'Exam Results'),
     477        value_type = ResultEntryField(),
     478        required = True,
     479        readonly = False,
     480        defaultFactory=list,
     481        )
     482
     483
     484ICustomUGStudentClearanceEdit['fst_sit_fname'].order = ICustomUGStudentClearance[
     485    'fst_sit_fname'].order
     486ICustomUGStudentClearanceEdit['fst_sit_no'].order = ICustomUGStudentClearance[
     487    'fst_sit_no'].order
     488ICustomUGStudentClearanceEdit['fst_sit_sc_pin'].order = ICustomUGStudentClearance[
     489    'fst_sit_sc_pin'].order
     490ICustomUGStudentClearanceEdit['fst_sit_sc_serial_number'].order = ICustomUGStudentClearance[
     491    'fst_sit_sc_serial_number'].order
     492ICustomUGStudentClearanceEdit['fst_sit_date'].order = ICustomUGStudentClearance[
     493    'fst_sit_date'].order
     494ICustomUGStudentClearanceEdit['fst_sit_type'].order = ICustomUGStudentClearance[
     495    'fst_sit_type'].order
     496ICustomUGStudentClearanceEdit['fst_sit_results'].order = ICustomUGStudentClearance[
     497    'fst_sit_results'].order
    433498
    434499class ICustomPGStudentClearance(INigeriaPGStudentClearance):
  • main/waeup.aaue/trunk/src/waeup/aaue/students/student.py

    r13351 r14298  
    2626from kofacustom.nigeria.students.student import NigeriaStudent
    2727from waeup.aaue.students.interfaces import (
    28     ICustomStudent, ICustomStudentPersonalEdit)
     28    ICustomStudent, ICustomStudentPersonalEdit,
     29    ICustomUGStudentClearanceEdit)
    2930
    3031
     
    3435    """
    3536    grok.implements(ICustomStudent, IStudentNavigation,
    36                     ICustomStudentPersonalEdit)
     37                    ICustomStudentPersonalEdit,
     38                    ICustomUGStudentClearanceEdit)
    3739    grok.provides(ICustomStudent)
    3840
Note: See TracChangeset for help on using the changeset viewer.