Changeset 17748 for main/waeup.fceokene


Ignore:
Timestamp:
25 Apr 2024, 13:12:05 (5 months ago)
Author:
Henrik Bettermann
Message:

Also ApplicantRegistrationPage? must be customized.

File:
1 edited

Legend:

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

    r17723 r17748  
    3333from kofacustom.nigeria.applicants.browser import (
    3434    NigeriaExportPDFPaymentSlipPage, NigeriaApplicantManageFormPage,
    35     NigeriaApplicantDisplayFormPage, NigeriaApplicantEditFormPage)
     35    NigeriaApplicantDisplayFormPage, NigeriaApplicantEditFormPage,
     36    NigeriaApplicantRegistrationPage)
    3637
    3738from waeup.fceokene.interfaces import MessageFactory as _
     
    4445    )
    4546from waeup.fceokene.applicants.interfaces import (
    46     ICustomUGApplicant, ICustomUGApplicantEdit,
     47    ICustomUGApplicant,
     48    ICustomUGApplicantEdit,
     49    ICustomApplicantRegisterUpdate,
    4750    BEC_OMIT_DISPLAY_FIELDS,
    4851    BEC_OMIT_PDF_FIELDS,
     
    250253        super(CustomApplicantEditFormPage, self).dataNotComplete(data)
    251254        return
     255
     256class CustomApplicantRegistrationPage(NigeriaApplicantRegistrationPage):
     257
     258    @property
     259    def form_fields(self):
     260        form_fields = None
     261        if self.context.mode == 'update':
     262            form_fields = grok.AutoFields(ICustomApplicantRegisterUpdate).select(
     263                'lastname','reg_number','email')
     264        else: #if self.context.mode == 'create':
     265            form_fields = grok.AutoFields(ICustomUGApplicantEdit).select(
     266                'firstname', 'middlename', 'lastname', 'email', 'phone')
     267        return form_fields
Note: See TracChangeset for help on using the changeset viewer.