Ignore:
Timestamp:
11 Apr 2016, 05:59:02 (9 years ago)
Author:
Henrik Bettermann
Message:

Changing registration_cats is only allowed before having made payment.

File:
1 edited

Legend:

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

    r13814 r13825  
    4141from waeup.uniben.applicants.interfaces import (
    4242    ICustomApplicant, IUnibenRegistration)
    43 from waeup.kofa.applicants.workflow import ADMITTED, PAID
     43from waeup.kofa.applicants.workflow import ADMITTED, PAID, STARTED
    4444
    4545from waeup.uniben.interfaces import MessageFactory as _
     
    276276            for field in REGISTRATION_OMIT_MANAGE_FIELDS:
    277277                form_fields = form_fields.omit(field)
     278            state = IWorkflowState(self.context).getState()
     279            if state != STARTED:
     280                form_fields['registration_cats'].for_display = True
    278281            return form_fields
    279282        form_fields = super(CustomApplicantManageFormPage, self).form_fields
     
    291294            for field in REGISTRATION_OMIT_EDIT_FIELDS:
    292295                form_fields = form_fields.omit(field)
     296            state = IWorkflowState(self.context).getState()
     297            if state != STARTED:
     298                form_fields['registration_cats'].for_display = True
    293299            return form_fields
    294300        form_fields = super(CustomApplicantEditFormPage, self).form_fields
Note: See TracChangeset for help on using the changeset viewer.