Changeset 15576 for main/kofacustom.dspg/trunk/src
- Timestamp:
- 3 Sep 2019, 08:08:55 (5 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/browser.py
r15536 r15576 164 164 if self.context.special: 165 165 return grok.AutoFields(ICustomSpecialApplicant) 166 if self.target == 'conv': 167 form_fields = grok.AutoFields(ICustomSpecialApplicant) 168 form_fields = form_fields.omit( 169 'special_application', 'carryover_courses', 170 'locked', 'suspended') 171 return form_fields 166 172 form_fields = grok.AutoFields(ICustomUGApplicant) 167 173 if self.context.is_nd: … … 220 226 @property 221 227 def form_fields(self): 228 if self.target == 'conv': 229 form_fields = grok.AutoFields(ICustomSpecialApplicant) 230 form_fields = form_fields.omit( 231 'special_application', 'carryover_courses', 232 'locked', 'suspended') 233 return form_fields 222 234 form_fields = grok.AutoFields(ICustomUGApplicant) 223 235 if self.context.is_nd: … … 248 260 form_fields['applicant_id'].for_display = True 249 261 return form_fields 262 if self.target == 'conv': 263 form_fields = grok.AutoFields(ICustomSpecialApplicant) 264 form_fields = form_fields.omit( 265 'special_application', 'carryover_courses', 266 'locked', 'suspended') 267 return form_fields 250 268 form_fields = grok.AutoFields(ICustomUGApplicant) 251 269 if self.context.is_nd: … … 278 296 'locked', 'suspended') 279 297 form_fields['applicant_id'].for_display = True 298 return form_fields 299 if self.target == 'conv': 300 form_fields = grok.AutoFields(ICustomSpecialApplicant) 301 form_fields = form_fields.omit( 302 'special_application', 'carryover_courses', 303 'locked', 'suspended') 280 304 return form_fields 281 305 form_fields = grok.AutoFields(ICustomUGApplicantEdit) … … 325 349 def custom_requirements(self): 326 350 store = getUtility(IExtFileStore) 327 if not store.getFileByContext(self.context, attr=u'passport.jpg'): 351 if not store.getFileByContext(self.context, attr=u'passport.jpg') \ 352 and self.context.__parent__.with_picture: 328 353 return _('Upload your passport photo before making payment.') 329 354 return '' -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/interfaces.py
r15189 r15576 19 19 """ 20 20 21 from datetime import datetime 21 22 from zope import schema 22 23 from waeup.kofa.applicants.interfaces import ( … … 282 283 """ 283 284 285 def grad_year_range(): 286 curr_year = datetime.now().year 287 return range(curr_year - 10, curr_year + 0) 288 284 289 class ICustomSpecialApplicant(ISpecialApplicant): 285 290 … … 294 299 title = _(u'Department'), 295 300 required = True, 301 readonly = False, 302 ) 303 304 grad_year = schema.Choice( 305 title = _(u'Year of Graduation'), 306 required = True, 307 values = grad_year_range(), 296 308 readonly = False, 297 309 ) -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/utils.py
r14721 r15576 53 53 'prejambites': ['Pre-Admission Security Screening and Results Verification: JAMBITES', 'JMB'], 54 54 'special': ['Supplementary Payment', 'SP'], 55 'conv': ['Convocation Pack Payment', 'CPP'], 55 56 } 56 57
Note: See TracChangeset for help on using the changeset viewer.