- Timestamp:
- 15 Nov 2019, 07:28:55 (5 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/browser.py
r15807 r15809 22 22 from waeup.kofa.applicants.browser import ( 23 23 ApplicantRegistrationPage, ApplicantsContainerPage) 24 from waeup.kofa.applicants.interfaces import ISpecialApplicant 24 from waeup.kofa.applicants.interfaces import ( 25 ISpecialApplicant, IApplicantsContainer) 25 26 from kofacustom.nigeria.applicants.browser import ( 26 27 NigeriaApplicantDisplayFormPage, … … 28 29 NigeriaApplicantEditFormPage, 29 30 NigeriaPDFApplicationSlip) 31 from waeup.kofa.widgets.datewidget import ( 32 FriendlyDateDisplayWidget, 33 FriendlyDatetimeDisplayWidget) 30 34 from kofacustom.nigeria.applicants.interfaces import ( 31 35 UG_OMIT_DISPLAY_FIELDS, … … 44 48 ) 45 49 from kofacustom.iuokada.interfaces import MessageFactory as _ 50 51 class CustomApplicantsContainerPage(ApplicantsContainerPage): 52 """The standard view for regular applicant containers. 53 """ 54 55 @property 56 def form_fields(self): 57 form_fields = grok.AutoFields(IApplicantsContainer).omit( 58 'title', 'description') 59 form_fields[ 60 'startdate'].custom_widget = FriendlyDatetimeDisplayWidget('le') 61 form_fields[ 62 'enddate'].custom_widget = FriendlyDatetimeDisplayWidget('le') 63 if self.request.principal.id == 'zope.anybody': 64 form_fields = form_fields.omit( 65 'code', 'prefix', 'year', 'mode', 'hidden', 66 'strict_deadline', 'application_category', 67 'application_slip_notice', 'application_fee', 'with_picture') 68 return form_fields 46 69 47 70 class CustomApplicantDisplayFormPage(NigeriaApplicantDisplayFormPage): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/interfaces.py
r15807 r15809 98 98 """ 99 99 100 sponsor = schema.Choice( 101 title = _(u'Sponsor'), 102 vocabulary = sponsors_vocab, 103 required = False, 104 ) 105 106 heard_about = schema.Choice( 107 title = _(u'How did you hear about IU?'), 108 vocabulary = heard_about_types_vocab, 109 required = False, 110 ) 111 112 ICustomPGApplicant[ 113 'sponsor'].order = ICustomPGApplicant['lga'].order 114 ICustomPGApplicant[ 115 'heard_about'].order = ICustomPGApplicant['lga'].order 116 ICustomPGApplicant[ 117 'sponsor'].order = ICustomPGApplicant['lga'].order 118 ICustomPGApplicant[ 119 'lga'].order = ICustomPGApplicant['nationality'].order 100 120 101 121 class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py
r15789 r15809 149 149 'pg': 'Postgraduate', 150 150 'pre': 'Pre-Degree Studies', 151 'pt': 'Part-Time Degree Programmes', 151 152 }
Note: See TracChangeset for help on using the changeset viewer.