Changeset 17683 for main/kofacustom.edocons/trunk/src
- Timestamp:
- 29 Jan 2024, 11:38:51 (11 months ago)
- Location:
- main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/browser.py
r17465 r17683 73 73 # UG students are all undergraduate students. 74 74 UG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ( 75 'jamb_subjects _list', 'programme_type')75 'jamb_subjects', 'programme_type') 76 76 UG_OMIT_PDF_FIELDS = UG_OMIT_DISPLAY_FIELDS + ('phone',) 77 77 UG_OMIT_MANAGE_FIELDS = ( 78 78 'special_application', 79 'jamb_subjects _list',79 'jamb_subjects', 80 80 'programme_type', 81 81 #'course1', 'course2', # these 2 have been added and later removed again … … 91 91 'cbt_date', 92 92 'jamb_age', 93 #'jamb_subjects',94 #'jamb_score',95 #'jamb_reg_number',96 93 'aggregate') 97 94 … … 131 128 form_fields['notice'].custom_widget = BytesDisplayWidget 132 129 if self.context.__parent__.application_category == 'rnnurse': 133 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects ', 'jamb_score', 'course2')130 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects_list', 'jamb_score', 'course2') 134 131 #form_fields['perm_address'].custom_widget = BytesDisplayWidget 135 132 if not getattr(self.context, 'student_id'): … … 168 165 form_fields = form_fields.omit(field) 169 166 if self.context.__parent__.application_category == 'rnnurse': 170 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects ', 'jamb_score', 'course2')167 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects_list', 'jamb_score', 'course2') 171 168 if self.context.__parent__.application_category == 'ndnurse': 172 169 form_fields = form_fields.omit('course2') … … 212 209 form_fields = form_fields.omit(field) 213 210 if self.context.__parent__.application_category == 'rnnurse': 214 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects ', 'jamb_score', 'course2')211 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects_list', 'jamb_score', 'course2') 215 212 if self.context.__parent__.application_category == 'ndnurse': 216 213 form_fields = form_fields.omit('course2') … … 247 244 form_fields = form_fields.omit(field) 248 245 if self.context.__parent__.application_category == 'rnnurse': 249 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects ', 'jamb_score', 'course2')246 form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects_list', 'jamb_score', 'course2') 250 247 if self.context.__parent__.application_category == 'ndnurse': 251 248 form_fields = form_fields.omit('course2') -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/interfaces.py
r17681 r17683 42 42 from kofacustom.nigeria.applicants.interfaces import ( 43 43 LGASource, high_qual, high_grade, exam_types, 44 jambsubjects,44 #jambsubjects, 45 45 INigeriaUGApplicant, INigeriaPGApplicant, 46 46 INigeriaApplicantOnlinePayment, … … 59 59 curr_year = datetime.now().year 60 60 return range(curr_year - 50, curr_year) 61 62 jambsubjects = SimpleKofaVocabulary( 63 (_('English'),'english_language'), 64 #(_('Agricultural Science'),'agricultural_science'), 65 #(_('Arabic'),'arabic'), 66 (_('Biology'),'biology'), 67 #(_('Book Keeping'),'book_keeping'), 68 (_('Chemistry'),'chemistry'), 69 #(_('Christian Religious Studies'),'christian_religious_studies'), 70 #(_('Commerce'),'commerce'), 71 #(_('Economics'),'economics'), 72 #(_('Financial Accounting'),'financial_accounting'), 73 #(_('Fine Art'),'fine_art'), 74 #(_('Food and Nutrition'),'food_and_nutrition'), 75 #(_('French'),'french'), 76 #(_('Geography'),'geography'), 77 #(_('German'),'german'), 78 #(_('Government'),'government'), 79 #(_('Hausa'),'hausa'), 80 #(_('Home Economics'),'home_economics'), 81 #(_('History'),'history'), 82 #(_('Igbo'),'igbo'), 83 #(_('Literature in English'),'literature_in_english'), 84 #(_('Literature in Nigerian Languages'),'literature_in_nigerian_languages'), 85 #(_('Mathematics'),'mathematics'), 86 #(_('Music'),'music'), 87 (_('Physics'),'physics'), 88 #(_('Yoruba'),'yoruba'), 89 ) 61 90 62 91 programme_types_vocab = SimpleKofaVocabulary( … … 386 415 ) 387 416 417 @invariant 418 def date_of_birth(applicant): 419 today = datetime.today() 420 age = today.year - applicant.date_of_birth.year - ((today.month, today.day) < (applicant.date_of_birth.month, applicant.date_of_birth.day)) 421 if age < 17: 422 raise Invalid(_("Upon application, the candidate must be seventeen years old (17).")) 423 388 424 class ICustomPGApplicant(INigeriaPGApplicant): 389 425 """A postgraduate applicant.
Note: See TracChangeset for help on using the changeset viewer.