Changeset 9248


Ignore:
Timestamp:
27 Sep 2012, 21:34:37 (12 years ago)
Author:
Henrik Bettermann
Message:

Use is_postgrad property.

File:
1 edited

Legend:

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

    r9144 r9248  
    9696    @property
    9797    def form_fields(self):
    98         cm = getattr(self.context,'current_mode', None)
    99         if cm is not None and cm.startswith('pg'):
     98        if self.context.is_postgrad:
    10099            form_fields = grok.AutoFields(
    101100                INigeriaPGStudentClearance).omit('clearance_locked')
     
    111110    @property
    112111    def form_fields(self):
    113         cm = getattr(self.context,'current_mode', None)
    114         if cm is not None and cm.startswith('pg'):
     112        if self.context.is_postgrad:
    115113            form_fields = grok.AutoFields(
    116114                INigeriaPGStudentClearance).omit('clearance_locked')
     
    126124    @property
    127125    def form_fields(self):
    128         cm = getattr(self.context,'current_mode', None)
    129         if cm is not None and cm.startswith('pg'):
     126        if self.context.is_postgrad:
    130127            form_fields = grok.AutoFields(INigeriaPGStudentClearance)
    131128        else:
     
    139136    @property
    140137    def form_fields(self):
    141         cm = getattr(self.context,'current_mode', None)
    142         if cm is not None and cm.startswith('pg'):
     138        if self.context.is_postgrad:
    143139            form_fields = grok.AutoFields(INigeriaPGStudentClearance).omit(
    144140            'clearance_locked', 'nysc_location')
Note: See TracChangeset for help on using the changeset viewer.