Ignore:
Timestamp:
20 May 2012, 09:57:09 (12 years ago)
Author:
Henrik Bettermann
Message:

Add property is_postgrad.

Add invariant constraint to ICertificate.

File:
1 edited

Legend:

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

    r8471 r8472  
    412412    @property
    413413    def form_fields(self):
    414         cm = getattr(self.context,'current_mode', None)
    415         if cm is not None and cm.startswith('pg'):
     414        if self.context.is_postgrad:
    416415            form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked')
    417416        else:
     
    434433    @property
    435434    def form_fields(self):
    436         cm = getattr(self.context,'current_mode', None)
    437         if cm is not None and cm.startswith('pg'):
     435        if self.context.is_postgrad:
    438436            form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked')
    439437        else:
     
    478476    @property
    479477    def form_fields(self):
    480         cm = getattr(self.context,'current_mode', None)
    481         if cm is not None and cm.startswith('pg'):
     478        if self.context.is_postgrad:
    482479            form_fields = grok.AutoFields(IPGStudentClearance)
    483480        else:
     
    16211618    @property
    16221619    def form_fields(self):
    1623         cm = getattr(self.context,'current_mode', None)
    1624         if cm is not None and cm.startswith('pg'):
     1620        if self.context.is_postgrad:
    16251621            form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked')
    16261622        else:
Note: See TracChangeset for help on using the changeset viewer.