Ignore:
Timestamp:
30 Jul 2012, 04:50:09 (12 years ago)
Author:
Henrik Bettermann
Message:

Show start and end dates and application fee on ApplicantsContainerPage? also to anonymous.

File:
1 edited

Legend:

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

    r9051 r9078  
    307307    pnav = 3
    308308
    309     form_fields = grok.AutoFields(IApplicantsContainer).omit('title')
    310     form_fields['description'].custom_widget = HTMLDisplayWidget
    311     form_fields[
    312         'startdate'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    313     form_fields[
    314         'enddate'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     309    @property
     310    def form_fields(self):
     311        form_fields = grok.AutoFields(IApplicantsContainer).omit('title')
     312        form_fields['description'].custom_widget = HTMLDisplayWidget
     313        form_fields[
     314            'startdate'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     315        form_fields[
     316            'enddate'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     317        if self.request.principal.id == 'zope.anybody':
     318            form_fields = form_fields.omit(
     319                'code', 'prefix', 'year', 'mode',
     320                'strict_deadline', 'application_category')
     321        return form_fields
    315322
    316323    @property
Note: See TracChangeset for help on using the changeset viewer.