Ignore:
Timestamp:
28 Mar 2014, 09:45:41 (10 years ago)
Author:
Henrik Bettermann
Message:

Emergency repair: Disable editing date_of_birth, nationality and lga for UG students (untested).

File:
1 edited

Legend:

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

    r11537 r11552  
    4444from waeup.uniben.students.interfaces import (
    4545    ICustomStudentOnlinePayment, ICustomStudentStudyCourse,
    46     ICustomStudentStudyLevel)
     46    ICustomStudentStudyLevel,
     47    ICustomUGStudentClearance,
     48    ICustomPGStudentClearance)
    4749from waeup.uniben.interfaces import MessageFactory as _
    4850
     
    6163    """ View to edit student clearance data by student
    6264    """
     65
     66    @property
     67    def form_fields(self):
     68        if self.context.is_postgrad:
     69            form_fields = grok.AutoFields(ICustomPGStudentClearance).omit(
     70            'clearance_locked', 'nysc_location', 'clr_code', 'officer_comment')
     71        else:
     72            form_fields = grok.AutoFields(ICustomUGStudentClearance).omit(
     73            'clearance_locked', 'clr_code', 'officer_comment')
     74            form_fields['date_of_birth'].for_display = True
     75            form_fields['nationality'].for_display = True
     76            form_fields['lga'].for_display = True
     77        return form_fields
    6378
    6479    def dataNotComplete(self):
Note: See TracChangeset for help on using the changeset viewer.