- Timestamp:
- 6 Oct 2017, 14:05:18 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/applicant.py
r14721 r14865 23 23 from kofacustom.nigeria.applicants.applicant import NigeriaApplicant 24 24 from kofacustom.dspg.applicants.interfaces import( 25 ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, IPUTMEApplicantEdit) 25 ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, 26 IPUTMEApplicantEdit, ICustomSpecialApplicant) 26 27 27 28 class CustomApplicant(NigeriaApplicant): 28 29 29 30 grok.implements(ICustomApplicant, ICustomUGApplicantEdit, 30 ICustomPGApplicantEdit, IPUTMEApplicantEdit )31 ICustomPGApplicantEdit, IPUTMEApplicantEdit, ICustomSpecialApplicant) 31 32 grok.provides(ICustomApplicant) 32 33 -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/browser.py
r14807 r14865 26 26 from waeup.kofa.interfaces import IExtFileStore, IKofaUtils 27 27 from waeup.kofa.applicants.interfaces import ( 28 IApplicant, IApplicantEdit , ISpecialApplicant)28 IApplicant, IApplicantEdit) 29 29 from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage, 30 30 ApplicantManageFormPage, ApplicantEditFormPage, … … 42 42 from kofacustom.dspg.applicants.interfaces import ( 43 43 ICustomUGApplicant, ICustomUGApplicantEdit, 44 ICustomSpecialApplicant, 44 45 ND_OMIT_DISPLAY_FIELDS, 45 46 ND_OMIT_PDF_FIELDS, … … 80 81 def form_fields(self): 81 82 if self.context.special: 82 return grok.AutoFields(I SpecialApplicant)83 return grok.AutoFields(ICustomSpecialApplicant) 83 84 form_fields = grok.AutoFields(ICustomUGApplicant) 84 85 if self.context.is_nd: … … 162 163 def form_fields(self): 163 164 if self.context.special: 164 form_fields = grok.AutoFields(I SpecialApplicant)165 form_fields = grok.AutoFields(ICustomSpecialApplicant) 165 166 form_fields['applicant_id'].for_display = True 166 167 return form_fields … … 176 177 return form_fields 177 178 179 def setUpWidgets(self, ignore_request=False): 180 super(CustomApplicantManageFormPage,self).setUpWidgets(ignore_request) 181 if self.context.special: 182 self.widgets['carryover_courses'].height = 3 183 return 184 178 185 class CustomApplicantEditFormPage(ApplicantEditFormPage): 179 186 """An applicant-centered edit view for applicant data. … … 186 193 def form_fields(self): 187 194 if self.context.special: 188 form_fields = grok.AutoFields(I SpecialApplicant).omit(195 form_fields = grok.AutoFields(ICustomSpecialApplicant).omit( 189 196 'locked', 'suspended') 190 197 form_fields['applicant_id'].for_display = True … … 203 210 form_fields['reg_number'].for_display = True 204 211 return form_fields 212 213 def setUpWidgets(self, ignore_request=False): 214 super(CustomApplicantEditFormPage,self).setUpWidgets(ignore_request) 215 if self.context.special: 216 self.widgets['carryover_courses'].height = 3 217 return 205 218 206 219 @property -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/interfaces.py
r14831 r14865 28 28 from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber 29 29 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource 30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source 30 from waeup.kofa.applicants.interfaces import ( 31 contextual_reg_num_source, ISpecialApplicant) 31 32 from kofacustom.nigeria.applicants.interfaces import ( 32 33 LGASource, high_qual, high_grade, exam_types, … … 281 282 """ 282 283 283 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant): 284 class ICustomSpecialApplicant(ISpecialApplicant): 285 286 carryover_courses = schema.Text( 287 title = _(u'Carry-Over Courses'), 288 required = False, 289 description = _( 290 u'Enter course titles if carry-over remedial payment.'), 291 ) 292 293 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant, 294 ICustomSpecialApplicant): 284 295 """An interface for both types of applicants. 285 296
Note: See TracChangeset for help on using the changeset viewer.