- Timestamp:
- 27 May 2012, 16:46:26 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r8519 r8530 24 24 AppCatCertificateSource, CertificateSource) 25 25 from waeup.kofa.schoolgrades import ResultEntryField 26 from waeup.kofa.interfaces import SimpleKofaVocabulary, academic_sessions_vocab 27 from waeup.kofa.schema import FormattedDate 28 from waeup.kofa.students.vocabularies import nats_vocab 26 from waeup.kofa.interfaces import ( 27 SimpleKofaVocabulary, academic_sessions_vocab, validate_email) 28 from waeup.kofa.schema import FormattedDate, TextLineChoice 29 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource 30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source 29 31 from waeup.uniben.interfaces import ( 30 32 LGASource, high_qual, high_grade, exam_types) … … 36 38 UG_OMIT_EDIT_FIELDS = UG_OMIT_MANAGE_FIELDS + ('locked', 'course_admitted', 37 39 'student_id', 'screening_score', 'screening_venue') 40 PUTME_OMIT_EDIT_FIELDS = UG_OMIT_EDIT_FIELDS + ( 41 'firstname', 'middlename', 'lastname', 'sex', 42 'course1', 'lga', 'jambscore') 38 43 39 44 PG_OMIT_DISPLAY_FIELDS = ('locked', 'course_admitted', 'password') 40 45 PG_OMIT_MANAGE_FIELDS = () 41 PG_OMIT_EDIT_FIELDS = PG_OMIT_MANAGE_FIELDS + ('locked', 'course_admitted', 46 PG_OMIT_EDIT_FIELDS = PG_OMIT_MANAGE_FIELDS + ( 47 'locked', 'course_admitted', 42 48 'student_id', 'screening_score', 'screening_venue') 43 49 … … 60 66 required = False, 61 67 ) 62 63 # This ordering doesn't work properly. 64 IUGApplicant[ 65 'nationality'].order = IApplicantBaseData['sex'].order 66 IUGApplicant[ 67 'lga'].order = IUGApplicant['nationality'].order 68 68 perm_address = schema.Text( 69 title = _(u'Permanent Address'), 70 required = False, 71 ) 72 course1 = schema.Choice( 73 title = _(u'1st Choice Course of Study'), 74 source = AppCatCertificateSource(), 75 required = True, 76 ) 77 course2 = schema.Choice( 78 title = _(u'2nd Choice Course of Study'), 79 source = AppCatCertificateSource(), 80 required = False, 81 ) 82 jambscore = schema.Int( 83 title = _(u'JAMB Score'), 84 required = False, 85 ) 86 87 88 # More fields 89 90 91 notice = schema.Text( 92 title = _(u'Notice'), 93 required = False, 94 ) 95 screening_venue = schema.TextLine( 96 title = _(u'Screening Venue'), 97 required = False, 98 ) 99 screening_score = schema.Int( 100 title = _(u'Screening Score'), 101 required = False, 102 ) 103 student_id = schema.TextLine( 104 title = _(u'Student Id'), 105 required = False, 106 readonly = False, 107 ) 108 course_admitted = schema.Choice( 109 title = _(u'Admitted Course of Study'), 110 source = CertificateSource(), 111 required = False, 112 ) 113 locked = schema.Bool( 114 title = _(u'Form locked'), 115 default = False, 116 ) 69 117 70 118 class IPGApplicant(IApplicantBaseData): … … 227 275 readonly = False, 228 276 ) 277 student_id = schema.TextLine( 278 title = _(u'Student Id'), 279 required = False, 280 readonly = False, 281 ) 229 282 course_admitted = schema.Choice( 230 283 title = _(u'Admitted Course of Study'), … … 233 286 readonly = False, 234 287 ) 235 236 237 # This ordering doesn't work properly. 238 IPGApplicant[ 239 'nationality'].order = IApplicantBaseData['sex'].order 240 IPGApplicant[ 241 'lga'].order = IPGApplicant['nationality'].order 242 IPGApplicant[ 243 'student_id'].order = IPGApplicant['notice'].order 244 288 locked = schema.Bool( 289 title = _(u'Form locked'), 290 default = False, 291 ) 245 292 246 293 class ICustomApplicant(IUGApplicant,IPGApplicant): … … 286 333 287 334 """ 335 336 class IPUTMEApplicantEdit(IUGApplicant): 337 """An undergraduate applicant interface for editing. 338 339 Here we can repeat the fields from base data and set the 340 `required` and `readonly` attributes to True to further restrict 341 the data access. Or we can allow only certain certificates to be 342 selected by choosing the appropriate source. 343 344 We cannot omit fields here. This has to be done in the 345 respective form page. 346 """ 347 email = schema.ASCIILine( 348 title = _(u'Email Address'), 349 required = True, 350 constraint=validate_email, 351 ) 352 353 IPUTMEApplicantEdit[ 354 'email'].order = IUGApplicant['email'].order
Note: See TracChangeset for help on using the changeset viewer.