- Timestamp:
- 15 Aug 2023, 09:47:00 (17 months ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r17537 r17538 58 58 from kofacustom.nigeria.applicants.interfaces import ( 59 59 OMIT_DISPLAY_FIELDS, 60 #UG_OMIT_DISPLAY_FIELDS,61 #UG_OMIT_PDF_FIELDS,62 #UG_OMIT_MANAGE_FIELDS,63 #UG_OMIT_EDIT_FIELDS,60 UG_OMIT_DISPLAY_FIELDS, 61 UG_OMIT_PDF_FIELDS, 62 UG_OMIT_MANAGE_FIELDS, 63 UG_OMIT_EDIT_FIELDS, 64 64 CBT_OMIT_DISPLAY_FIELDS, 65 65 CBT_OMIT_PDF_FIELDS, … … 75 75 PG_OMIT_EDIT_FIELDS, 76 76 PUTME_OMIT_DISPLAY_FIELDS, 77 #PUTME_OMIT_PDF_FIELDS,78 #PUTME_OMIT_MANAGE_FIELDS,79 #PUTME_OMIT_EDIT_FIELDS,80 #PUTME_OMIT_RESULT_SLIP_FIELDS,77 PUTME_OMIT_PDF_FIELDS, 78 PUTME_OMIT_MANAGE_FIELDS, 79 PUTME_OMIT_EDIT_FIELDS, 80 PUTME_OMIT_RESULT_SLIP_FIELDS, 81 81 PUDE_OMIT_DISPLAY_FIELDS, 82 82 PUDE_OMIT_PDF_FIELDS, … … 109 109 'ACT','ENT','HRM','INS','MKT'] + PASTQ_ALL 110 110 111 # UG students are all undergraduate students. Meanwhile 112 # Uniben uses a customized version. 113 114 UG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ( 115 'jamb_subjects_list', 'programme_type') 116 UG_OMIT_PDF_FIELDS = UG_OMIT_DISPLAY_FIELDS + ('phone',) 117 UG_OMIT_MANAGE_FIELDS = ( 118 'special_application', 119 'jamb_subjects_list', 120 'programme_type') 121 UG_OMIT_EDIT_FIELDS = UG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + ( 111 PT_OMIT_FIELDS = ( 122 112 'student_id', 123 113 'notice', … … 128 118 'jamb_subjects', 129 119 'jamb_score', 130 # 'jamb_reg_number', 131 'aggregate') 132 133 # PUTME is a subgroup of UG with the same interface. Meanwhile 134 # Uniben uses a customized version. 135 136 PUTME_OMIT_FIELDS = ( 120 #'jamb_reg_number', 121 'aggregate', 137 122 'hq_type', 'hq_matric_no', 138 123 'hq_degree', 'hq_school', … … 140 125 'jamb_subjects_list', 'programme_type') 141 126 142 P UTME_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + PUTME_OMIT_FIELDS143 144 P UTME_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + PUTME_OMIT_FIELDS145 146 P UTME_OMIT_EDIT_FIELDS = UG_OMIT_EDIT_FIELDS + PUTME_OMIT_FIELDS147 148 P UTME_OMIT_PDF_FIELDS = PUTME_OMIT_DISPLAY_FIELDS + ('phone',)149 P UTME_OMIT_RESULT_SLIP_FIELDS = PUTME_OMIT_DISPLAY_FIELDS + (127 PT_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + PT_OMIT_FIELDS 128 129 PT_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + PT_OMIT_FIELDS 130 131 PT_OMIT_EDIT_FIELDS = UG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + PT_OMIT_FIELDS 132 133 PT_OMIT_PDF_FIELDS = PT_OMIT_DISPLAY_FIELDS + ('phone',) 134 PT_OMIT_RESULT_SLIP_FIELDS = PT_OMIT_DISPLAY_FIELDS + ( 150 135 'phone', 151 136 'date_of_birth', 'sex', … … 342 327 for field in PUTME_OMIT_DISPLAY_FIELDS: 343 328 form_fields = form_fields.omit(field) 329 elif self.target is not None and self.target.startswith('pt'): 330 form_fields = grok.AutoFields(ICustomUGApplicant) 331 for field in PT_OMIT_DISPLAY_FIELDS: 332 form_fields = form_fields.omit(field) 344 333 elif self.target is not None and self.target.startswith('pude'): 345 334 form_fields = grok.AutoFields(ICustomUGApplicant) … … 351 340 form_fields = form_fields.omit(field) 352 341 #form_fields['perm_address'].custom_widget = BytesDisplayWidget 353 form_fields['notice'].custom_widget = BytesDisplayWidget 342 try: 343 form_fields['notice'].custom_widget = BytesDisplayWidget 344 except: 345 pass 354 346 if not getattr(self.context, 'student_id'): 355 347 form_fields = form_fields.omit('student_id') … … 537 529 for field in PUTME_OMIT_MANAGE_FIELDS: 538 530 form_fields = form_fields.omit(field) 531 elif self.target is not None and self.target.startswith('pt'): 532 form_fields = grok.AutoFields(ICustomUGApplicant) 533 for field in PT_OMIT_MANAGE_FIELDS: 534 form_fields = form_fields.omit(field) 539 535 elif self.target is not None and self.target.startswith('pude'): 540 536 form_fields = grok.AutoFields(ICustomUGApplicant) … … 545 541 for field in UG_OMIT_MANAGE_FIELDS: 546 542 form_fields = form_fields.omit(field) 547 form_fields['student_id'].for_display = True 548 form_fields['applicant_id'].for_display = True 543 try: 544 form_fields['student_id'].for_display = True 545 except: 546 pass 547 try: 548 form_fields['applicant_id'].for_display = True 549 except: 550 pass 549 551 return form_fields 550 552 … … 621 623 form_fields = grok.AutoFields(IPUTMEApplicantEdit) 622 624 for field in PUTME_OMIT_EDIT_FIELDS: 625 form_fields = form_fields.omit(field) 626 elif self.target is not None and self.target.startswith('pt'): 627 form_fields = grok.AutoFields(IPUTMEApplicantEdit) 628 for field in PT_OMIT_EDIT_FIELDS: 623 629 form_fields = form_fields.omit(field) 624 630 elif self.target is not None and self.target.startswith('pude'): … … 766 772 else: 767 773 for field in PUTME_OMIT_PDF_FIELDS: 774 form_fields = form_fields.omit(field) 775 elif self.target is not None and self.target.startswith('pt'): 776 form_fields = grok.AutoFields(ICustomUGApplicant) 777 if self._reduced_slip(): 778 for field in PT_OMIT_RESULT_SLIP_FIELDS: 779 form_fields = form_fields.omit(field) 780 else: 781 for field in PT_OMIT_PDF_FIELDS: 768 782 form_fields = form_fields.omit(field) 769 783 elif self.target is not None and self.target.startswith('pude'): -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r17084 r17538 722 722 defaultFactory=list, 723 723 ) 724 jamb_reg_number = schema.TextLine( 725 title = _(u'JAMB Registration Number'), 726 required = False, 727 ) 724 728 jamb_subjects = schema.Text( 725 729 title = _(u'Subjects and Scores'), … … 743 747 # required = False, 744 748 # ) 745 jamb_reg_number = schema.TextLine( 746 title = _(u'JAMB Registration Number'), 749 course_admitted = schema.Choice( 750 title = _(u'Admitted Course of Study'), 751 source = CertificateSource(), 747 752 required = False, 748 753 ) … … 777 782 required = False, 778 783 readonly = False, 779 )780 course_admitted = schema.Choice(781 title = _(u'Admitted Course of Study'),782 source = CertificateSource(),783 required = False,784 784 ) 785 785 locked = schema.Bool( -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r17366 r17538 77 77 'form.nysc_year': _(u'NYSC Information'), 78 78 'form.employer': _(u'Employment History'), 79 'form.jamb_subjects': _(u'JAMB Data'), 80 'form.jamb_subjects_list': _(u'JAMB Data'), 81 'form.notice': _(u'Application Process Information'), 79 'form.jamb_reg_number': _(u'JAMB Data'), 80 'form.course_admitted': _(u'Application Process Information'), 82 81 'form.pp_school': _(u'Post Primary School Qualification'), 83 82 'form.presently_inst': _(u'Presently attending a course or programme'),
Note: See TracChangeset for help on using the changeset viewer.