Changeset 9535 for main


Ignore:
Timestamp:
5 Nov 2012, 12:13:10 (12 years ago)
Author:
Henrik Bettermann
Message:

Show officers's comment in the same way as shown in the base package.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py

    r9458 r9535  
    100100            form_fields = grok.AutoFields(
    101101                INigeriaUGStudentClearance).omit('clearance_locked')
     102        if not getattr(self.context, 'officer_comment'):
     103            form_fields = form_fields.omit('officer_comment')
     104        else:
     105            form_fields['officer_comment'].custom_widget = BytesDisplayWidget
    102106        return form_fields
    103107
     
    115119            form_fields = grok.AutoFields(
    116120                INigeriaUGStudentClearance).omit('clearance_locked')
     121        if not getattr(self.context, 'officer_comment'):
     122            form_fields = form_fields.omit('officer_comment')
    117123        return form_fields
    118124
     
    139145        if self.context.is_postgrad:
    140146            form_fields = grok.AutoFields(INigeriaPGStudentClearance).omit(
    141             'clearance_locked', 'nysc_location', 'clr_code')
     147            'clearance_locked', 'nysc_location', 'clr_code', 'officer_comment')
    142148        else:
    143149            form_fields = grok.AutoFields(INigeriaUGStudentClearance).omit(
    144             'clearance_locked', 'clr_code')
     150            'clearance_locked', 'clr_code', 'officer_comment')
    145151        return form_fields
    146152
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/interfaces.py

    r9471 r9535  
    114114
    115115    """
     116    officer_comment = schema.Text(
     117        title = _(u"Officer's Comment"),
     118        required = False,
     119        )
     120
     121    clearance_locked = schema.Bool(
     122        title = _(u'Clearance form locked'),
     123        default = False,
     124        required = False,
     125        )
     126
     127    clr_code = schema.TextLine(
     128        title = _(u'CLR Activation Code'),
     129        required = False,
     130        readonly = False,
     131        )
     132
    116133    date_of_birth = FormattedDate(
    117134        title = _(u'Date of Birth'),
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_export.py

    r9254 r9535  
    5656            'matric_number,middlename,nationality,next_kin_address,'
    5757            'next_kin_name,next_kin_relation,nysc_lga,nysc_location,'
    58             'nysc_year,perm_address,phone,reg_number,religion,scd_sit_date,'
     58            'nysc_year,officer_comment,'
     59            'perm_address,phone,reg_number,religion,scd_sit_date,'
    5960            'scd_sit_fname,scd_sit_no,scd_sit_results,scd_sit_type,sex,'
    6061            'student_id,suspended,password,state,history,certcode,'
     
    6465            '1981-02-04#,,,anna@sample.com,,,,,,,,,,,Anna,,,,,'
    6566            '"[(\'visual_art\', \'A1\')]",,,,,,,,,,,,,,,Tester,,,234,M.,NG'
    66             ',,,,,,,"Studentroad 21\nLagos 123456\n",+234-123-12345#,123'
     67            ',,,,,,,,"Studentroad 21\nLagos 123456\n",+234-123-12345#,123'
    6768            ',,,,,"[(\'visual_art\', \'A1\')]",,f,A111111,0,,created,'
    6869            in result
Note: See TracChangeset for help on using the changeset viewer.