Changeset 17013 for main/kofacustom.lpng/trunk/src/kofacustom/lpng
- Timestamp:
- 8 Jul 2022, 11:14:06 (2 years ago)
- Location:
- main/kofacustom.lpng/trunk/src/kofacustom/lpng
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.lpng/trunk/src/kofacustom/lpng/applicants/applicant.py
r16997 r17013 23 23 from kofacustom.nigeria.applicants.applicant import NigeriaApplicant 24 24 from kofacustom.lpng.applicants.interfaces import( 25 ICustomApplicant, )25 ICustomApplicant, ICustomApplicantEdit) 26 26 27 27 class CustomApplicant(NigeriaApplicant): 28 28 29 grok.implements(ICustomApplicant )29 grok.implements(ICustomApplicant, ICustomApplicantEdit) 30 30 grok.provides(ICustomApplicant) 31 31 -
main/kofacustom.lpng/trunk/src/kofacustom/lpng/applicants/browser.py
r16997 r17013 30 30 ICustomApplicant, 31 31 ICustomApplicantOnlinePayment, 32 ICustomApplicantEdit, 32 33 ) 33 34 … … 78 79 @property 79 80 def form_fields(self): 80 form_fields = grok.AutoFields(ICustomApplicant )81 form_fields = grok.AutoFields(ICustomApplicantEdit) 81 82 form_fields = form_fields.omit('notice') 82 83 if not getattr(self.context, 'student_id'): -
main/kofacustom.lpng/trunk/src/kofacustom/lpng/applicants/interfaces.py
r17011 r17013 69 69 ) 70 70 71 vin = schema.TextLine(72 title = _(u'Voter Identification No (VIN)'),73 required = True,74 )75 76 71 reg_number = TextLineChoice( 77 72 title = _(u'Registration Number'), … … 79 74 required = False, 80 75 source = contextual_reg_num_source, 76 ) 77 78 vin = schema.TextLine( 79 title = _(u'Voter Identification No (VIN)'), 80 required = True, 81 81 ) 82 82 … … 195 195 """ 196 196 197 class 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 216 ICustomApplicantEdit['reg_number'].order = ICustomApplicant['reg_number'].order 217 197 218 class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment): 198 219 """An applicant payment via payment gateways. -
main/kofacustom.lpng/trunk/src/kofacustom/lpng/interswitch/tests.py
r17011 r17013 221 221 self.browser.getControl(name="transition").value = ['start'] 222 222 self.browser.getControl("Save").click() 223 self.browser.getControl(" Add online").click()223 self.browser.getControl("Pay membership").click() 224 224 self.assertMatches('...ticket created...', 225 225 self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.