Ignore:
Timestamp:
8 Jul 2022, 11:14:06 (2 years ago)
Author:
Henrik Bettermann
Message:

Add ICustomApplicantEdit interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.lpng/trunk/src/kofacustom/lpng/applicants/interfaces.py

    r17011 r17013  
    6969        )
    7070       
    71     vin = schema.TextLine(
    72         title = _(u'Voter Identification No (VIN)'),
    73         required = True,
    74         )
    75 
    7671    reg_number = TextLineChoice(
    7772        title = _(u'Registration Number'),
     
    7974        required = False,
    8075        source = contextual_reg_num_source,
     76        )
     77
     78    vin = schema.TextLine(
     79        title = _(u'Voter Identification No (VIN)'),
     80        required = True,
    8181        )
    8282
     
    195195        """
    196196
     197class ICustomApplicantEdit(ICustomApplicant):
     198    """This is an applicant interface for editing.
     199
     200    Here we can repeat the fields from base data and set the
     201    `required` and `readonly` attributes to True to further restrict
     202    the data access. Or we can allow only certain certificates to be
     203    selected by choosing the appropriate source.
     204
     205    We cannot omit fields here. This has to be done in the
     206    respective form page.
     207    """
     208
     209    reg_number = TextLineChoice(
     210        title = _(u'Registration Number'),
     211        readonly = True,
     212        required = False,
     213        source = contextual_reg_num_source,
     214        )
     215
     216ICustomApplicantEdit['reg_number'].order = ICustomApplicant['reg_number'].order
     217
    197218class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment):
    198219    """An applicant payment via payment gateways.
Note: See TracChangeset for help on using the changeset viewer.