Changeset 16763 for main/waeup.aaue/trunk
- Timestamp:
- 31 Jan 2022, 09:14:15 (3 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r16548 r16763 51 51 from waeup.aaue.applicants.interfaces import ( 52 52 ICustomUGApplicant, 53 ICustomPGApplicant, 53 54 ICustomUGApplicantEdit, 55 ICustomPGApplicantEdit, 54 56 ITranscriptApplicant, 55 57 ICertificateRequest, … … 155 157 156 158 PG_OMIT_FIELDS = ( 157 'fst_sit_fname', 158 'fst_sit_no', 159 'fst_sit_date', 160 'fst_sit_type', 161 'fst_sit_results', 162 'scd_sit_fname', 163 'scd_sit_no', 164 'scd_sit_date', 165 'scd_sit_type', 166 'scd_sit_results', 167 #'programme_type', 168 'jamb_age', 169 'jamb_subjects', 170 'jamb_score', 171 'jamb_reg_number', 172 'aggregate' 159 173 160 ) 174 161 PG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ( 175 'jamb_subjects_list',) + PG_OMIT_FIELDS162 ) + PG_OMIT_FIELDS 176 163 PG_OMIT_PDF_FIELDS = PG_OMIT_DISPLAY_FIELDS + PG_OMIT_FIELDS + ( 177 'reg_number','alr_fname', 'alr_no', 'alr_date',178 'alr_results', 'notice',179 'nysc_year',180 'nysc_location',181 'nysc_lga',182 'former_matric',183 164 ) 184 165 PG_OMIT_MANAGE_FIELDS = ( 185 'special_application','jamb_subjects_list',) + PG_OMIT_FIELDS166 ) + PG_OMIT_FIELDS 186 167 PG_OMIT_EDIT_FIELDS = PG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + ( 187 'student_id',188 'notice',189 168 ) 190 169 … … 269 248 form_fields = grok.AutoFields(ICertificateRequest).omit( 270 249 'locked', 'suspended') 271 #form_fields['dispatch_address'].custom_widget = BytesDisplayWidget 272 #form_fields['perm_address'].custom_widget = BytesDisplayWidget 273 return form_fields 274 # AAUE is using the same interface for all regular applications. 275 form_fields = grok.AutoFields(ICustomUGApplicant) 276 if self.target is not None and self.target.startswith('pg'): 250 return form_fields 251 if self.target is not None and self.target in ('ptee','dsh',): 252 form_fields = grok.AutoFields(ICustomUGApplicant) 253 for field in PTEE_OMIT_DISPLAY_FIELDS: 254 form_fields = form_fields.omit(field) 255 elif self.target is not None and self.target in ('bridge', 'ude',): 256 form_fields = grok.AutoFields(ICustomUGApplicant) 257 for field in UDE_OMIT_DISPLAY_FIELDS: 258 form_fields = form_fields.omit(field) 259 elif self.target is not None and self.target.startswith('pg'): 260 form_fields = grok.AutoFields(ICustomPGApplicant) 277 261 for field in PG_OMIT_DISPLAY_FIELDS: 278 262 form_fields = form_fields.omit(field) 279 elif self.target is not None and self.target in ('ptee','dsh',):280 for field in PTEE_OMIT_DISPLAY_FIELDS:281 form_fields = form_fields.omit(field)282 elif self.target is not None and self.target in ('bridge', 'ude',):283 for field in UDE_OMIT_DISPLAY_FIELDS:284 form_fields = form_fields.omit(field)285 263 else: 264 form_fields = grok.AutoFields(ICustomUGApplicant) 286 265 for field in UG_OMIT_DISPLAY_FIELDS: 287 266 form_fields = form_fields.omit(field) 288 form_fields['perm_address'].custom_widget = BytesDisplayWidget289 form_fields['notice'].custom_widget = BytesDisplayWidget290 267 if not getattr(self.context, 'student_id'): 291 268 form_fields = form_fields.omit('student_id') … … 367 344 if self.target is not None and self.target.startswith('pg'): 368 345 for field in PG_OMIT_PDF_FIELDS: 346 form_fields = grok.AutoFields(ICustomPGApplicant) 369 347 form_fields = form_fields.omit(field) 370 348 elif self.target is not None and self.target in ('ptee', 'dsh',): … … 400 378 if not getattr(self.context, 'screening_date'): 401 379 form_fields = form_fields.omit('screening_date') 380 hqfields = ('hq_type', 'hq_fname', 'hq_matric_no', 381 'hq_degree', 'hq_school', 'hq_session', 'hq_disc') 382 if not getattr(self.context, 'hq_type'): 383 for hq in hqfields: 384 form_fields = form_fields.omit(hq) 385 if not getattr(self.context, 'hq_type2'): 386 for hq in hqfields: 387 form_fields = form_fields.omit(hq + '2') 388 if not getattr(self.context, 'hq_type3'): 389 for hq in hqfields: 390 form_fields = form_fields.omit(hq + '3') 391 if not getattr(self.context, 'hq_type4'): 392 for hq in hqfields: 393 form_fields = form_fields.omit(hq + '4') 402 394 return form_fields 403 395 … … 444 436 form_fields = grok.AutoFields(ICustomUGApplicant) 445 437 if self.target is not None and self.target.startswith('pg'): 438 form_fields = grok.AutoFields(ICustomPGApplicant) 446 439 for field in PG_OMIT_MANAGE_FIELDS: 447 440 form_fields = form_fields.omit(field) … … 579 572 form_fields = grok.AutoFields(ICustomUGApplicantEdit) 580 573 if self.target is not None and self.target.startswith('pg'): 574 form_fields = grok.AutoFields(ICustomPGApplicantEdit) 581 575 for field in PG_OMIT_EDIT_FIELDS: 582 576 form_fields = form_fields.omit(field) -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py
r16756 r16763 34 34 contextual_reg_num_source, 35 35 IApplicantBaseData) 36 from waeup.kofa.refereeentries import RefereeEntryField 36 37 from waeup.kofa.university.vocabularies import StudyModeSource 37 38 from kofacustom.nigeria.applicants.interfaces import ( … … 614 615 readonly = False, 615 616 ) 616 fst_sit_fname = schema.TextLine( 617 hq_type2 = schema.Choice( 618 title = _(u'Qualification Obtained'), 619 required = False, 620 readonly = False, 621 vocabulary = high_qual, 622 ) 623 624 hq_fname2 = schema.TextLine( 617 625 title = _(u'Full Name'), 618 626 required = False, 619 627 readonly = False, 620 628 ) 621 fst_sit_no = schema.TextLine( 622 title = _(u'Exam Number'), 623 required = False, 624 readonly = False, 625 ) 626 fst_sit_date = FormattedDate( 627 title = _(u'Exam Date'), 628 required = False, 629 readonly = False, 630 show_year = True, 631 ) 632 fst_sit_type = schema.Choice( 633 title = _(u'Exam Type'), 634 required = False, 635 readonly = False, 636 vocabulary = exam_types, 637 ) 638 fst_sit_results = schema.List( 639 title = _(u'Exam Results'), 640 value_type = ResultEntryField(), 641 required = False, 642 readonly = False, 643 defaultFactory=list, 644 ) 645 scd_sit_fname = schema.TextLine( 629 630 hq_matric_no2 = schema.TextLine( 631 title = _(u'Former Matric Number'), 632 required = False, 633 readonly = False, 634 ) 635 636 hq_degree2 = schema.Choice( 637 title = _(u'Class of Degree'), 638 required = False, 639 readonly = False, 640 vocabulary = high_grade, 641 ) 642 643 hq_school2 = schema.TextLine( 644 title = _(u'Institution Attended'), 645 required = False, 646 readonly = False, 647 ) 648 649 hq_session2 = schema.TextLine( 650 title = _(u'Years Attended'), 651 required = False, 652 readonly = False, 653 ) 654 655 hq_disc2 = schema.TextLine( 656 title = _(u'Discipline'), 657 required = False, 658 readonly = False, 659 ) 660 661 hq_type3 = schema.Choice( 662 title = _(u'Qualification Obtained'), 663 required = False, 664 readonly = False, 665 vocabulary = high_qual, 666 ) 667 668 hq_fname3 = schema.TextLine( 646 669 title = _(u'Full Name'), 647 670 required = False, 648 671 readonly = False, 649 672 ) 650 scd_sit_no = schema.TextLine( 651 title = _(u'Exam Number'), 652 required = False, 653 readonly = False, 654 ) 655 scd_sit_date = FormattedDate( 656 title = _(u'Exam Date'), 657 required = False, 658 readonly = False, 659 show_year = True, 660 ) 661 scd_sit_type = schema.Choice( 662 title = _(u'Exam Type'), 663 required = False, 664 readonly = False, 665 vocabulary = exam_types, 666 ) 667 scd_sit_results = schema.List( 668 title = _(u'Exam Results'), 669 value_type = ResultEntryField(), 670 required = False, 671 readonly = False, 672 defaultFactory=list, 673 ) 674 # Replaced by first and second sitting 675 #pp_school = schema.Choice( 676 # title = _(u'Qualification Obtained'), 677 # required = False, 678 # readonly = False, 679 # vocabulary = exam_types, 680 # ) 673 674 hq_matric_no3 = schema.TextLine( 675 title = _(u'Former Matric Number'), 676 required = False, 677 readonly = False, 678 ) 679 680 hq_degree3 = schema.Choice( 681 title = _(u'Class of Degree'), 682 required = False, 683 readonly = False, 684 vocabulary = high_grade, 685 ) 686 687 hq_school3 = schema.TextLine( 688 title = _(u'Institution Attended'), 689 required = False, 690 readonly = False, 691 ) 692 693 hq_session3 = schema.TextLine( 694 title = _(u'Years Attended'), 695 required = False, 696 readonly = False, 697 ) 698 699 hq_disc3 = schema.TextLine( 700 title = _(u'Discipline'), 701 required = False, 702 readonly = False, 703 ) 704 705 hq_type4 = schema.Choice( 706 title = _(u'Qualification Obtained'), 707 required = False, 708 readonly = False, 709 vocabulary = high_qual, 710 ) 711 712 hq_fname4 = schema.TextLine( 713 title = _(u'Full Name'), 714 required = False, 715 readonly = False, 716 ) 717 718 hq_matric_no4 = schema.TextLine( 719 title = _(u'Former Matric Number'), 720 required = False, 721 readonly = False, 722 ) 723 724 hq_degree4 = schema.Choice( 725 title = _(u'Class of Degree'), 726 required = False, 727 readonly = False, 728 vocabulary = high_grade, 729 ) 730 731 hq_school4 = schema.TextLine( 732 title = _(u'Institution Attended'), 733 required = False, 734 readonly = False, 735 ) 736 737 hq_session4 = schema.TextLine( 738 title = _(u'Years Attended'), 739 required = False, 740 readonly = False, 741 ) 742 743 hq_disc4 = schema.TextLine( 744 title = _(u'Discipline'), 745 required = False, 746 readonly = False, 747 ) 681 748 presently_inst = schema.TextLine( 682 749 title = _(u'If yes, name of institution'), … … 749 816 readonly = False, 750 817 ) 818 former_matric = schema.TextLine( 819 title = _(u'If yes, matric number'), 820 required = False, 821 readonly = False, 822 ) 751 823 notice = schema.Text( 752 824 title = _(u'Notice'), … … 781 853 default = False, 782 854 required = False, 855 ) 856 857 referees = schema.List( 858 title = _(u'Referees'), 859 value_type = RefereeEntryField(), 860 required = False, 861 defaultFactory=list, 783 862 ) 784 863 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py
r16675 r16763 60 60 'form.hq_type2': _(u'2nd Higher Education Record'), 61 61 'form.hq_type3': _(u'3rd Higher Education Record'), 62 'form.hq_type4': _(u'4th Higher Education Record'), 63 'form.hq_type5': _(u'5th Higher Education Record'), 64 'form.hq_type6': _(u'6th Higher Education Record'), 62 65 'form.presently': _(u'Course or Programme Presently Attending'), 63 66 'form.nysc_year': _(u'NYSC Information'), 64 'form.employer': _(u'Employment History '),67 'form.employer': _(u'Employment History (where applicable)'), 65 68 #'form.jamb_reg_number': _(u'JAMB Data'), 66 69 'form.notice': _(u'Application Process Information'), … … 68 71 'form.presently_inst': _(u'Presently attending a course or programme'), 69 72 'form.olevel_type': _(u"'O' Level Records"), 70 'form.former_matric': _(u'Former Student'), 73 'form.former_matric': _(u'Graduate of AAU, Ekpoma'), 74 'form.referees': _(u'Referees'), 71 75 } 72 76 -
main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/kofacustom.nigeria.po
r14838 r16763 15 15 msgid "Awaiting Results" 16 16 msgstr "." 17 18 msgid "Employment History" 19 msgstr "Employment History (where applicable)"
Note: See TracChangeset for help on using the changeset viewer.