[7853] | 1 | ## $Id: interfaces.py 16763 2022-01-31 09:14:15Z henrik $ |
---|
| 2 | ## |
---|
| 3 | ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
| 18 | """Customized interfaces of the university application package. |
---|
| 19 | """ |
---|
| 20 | |
---|
[8012] | 21 | from zope import schema |
---|
[10298] | 22 | from zope.interface import Attribute, invariant, Invalid |
---|
[8051] | 23 | from waeup.kofa.applicants.interfaces import ( |
---|
[8053] | 24 | IApplicantBaseData, |
---|
[8051] | 25 | AppCatCertificateSource, CertificateSource) |
---|
| 26 | from waeup.kofa.schoolgrades import ResultEntryField |
---|
[8532] | 27 | from waeup.kofa.interfaces import ( |
---|
| 28 | SimpleKofaVocabulary, academic_sessions_vocab, validate_email) |
---|
[13544] | 29 | from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber |
---|
| 30 | from waeup.kofa.interfaces import IKofaObject |
---|
| 31 | from waeup.kofa.students.vocabularies import ( |
---|
| 32 | nats_vocab, GenderSource, StudyLevelSource) |
---|
[10298] | 33 | from waeup.kofa.applicants.interfaces import ( |
---|
| 34 | contextual_reg_num_source, |
---|
| 35 | IApplicantBaseData) |
---|
[16763] | 36 | from waeup.kofa.refereeentries import RefereeEntryField |
---|
[13544] | 37 | from waeup.kofa.university.vocabularies import StudyModeSource |
---|
[8931] | 38 | from kofacustom.nigeria.applicants.interfaces import ( |
---|
| 39 | LGASource, high_qual, high_grade, exam_types, |
---|
| 40 | INigeriaUGApplicant, INigeriaPGApplicant, |
---|
| 41 | INigeriaApplicantOnlinePayment, |
---|
[8980] | 42 | INigeriaUGApplicantEdit, INigeriaPGApplicantEdit, |
---|
| 43 | INigeriaApplicantUpdateByRegNo, |
---|
| 44 | IPUTMEApplicantEdit, |
---|
[8931] | 45 | ) |
---|
[8444] | 46 | from waeup.aaue.interfaces import MessageFactory as _ |
---|
| 47 | from waeup.aaue.payments.interfaces import ICustomOnlinePayment |
---|
[7853] | 48 | |
---|
[10924] | 49 | programme_types_vocab = SimpleKofaVocabulary( |
---|
[11542] | 50 | (_('Undergraduate Programme (100 level)'), 'regular'), |
---|
| 51 | (_('Direct Entry (200 level)'), 'direct'), |
---|
[10924] | 52 | (_('not applicable'), 'na'), |
---|
| 53 | ) |
---|
| 54 | |
---|
[15118] | 55 | certificate_types_vocab = SimpleKofaVocabulary( |
---|
| 56 | (_('Full-time Degree'), 'ft'), |
---|
| 57 | (_('Part-time Degree'), 'pt'), |
---|
| 58 | (_('Diploma'), 'dp'), |
---|
| 59 | (_('Masters Degree'), 'ma'), |
---|
| 60 | (_('Doctorate Degree'), 'phd'), |
---|
| 61 | ) |
---|
| 62 | |
---|
[15530] | 63 | document_types_vocab = SimpleKofaVocabulary( |
---|
| 64 | (_('Certificate'), 'certificate'), |
---|
| 65 | (_('Result'), 'result'), |
---|
| 66 | (_('Transcript'), 'transcript'), |
---|
| 67 | (_('Studentship'), 'studship'), |
---|
| 68 | ) |
---|
| 69 | |
---|
[15991] | 70 | application_types_vocab = SimpleKofaVocabulary( |
---|
| 71 | (_('Academic Staff Positions'), 'academic'), |
---|
| 72 | (_('Senior Non-Teaching Staff'), 'senior'), |
---|
| 73 | (_('Junior Staff (Non-Teaching)'), 'junior'), |
---|
| 74 | ) |
---|
| 75 | |
---|
[15740] | 76 | request_types_vocab = SimpleKofaVocabulary( |
---|
| 77 | (_('Scanned Result'), 'result'), |
---|
| 78 | (_('Scanned Certificate'), 'certificate'), |
---|
| 79 | (_('Scanned Transcript'), 'transcript'), |
---|
| 80 | (_('Attestation'), 'attest'), |
---|
| 81 | (_('Proficiency in English Language'), 'english'), |
---|
| 82 | ) |
---|
| 83 | |
---|
[10298] | 84 | class ICustomUGApplicant(IApplicantBaseData): |
---|
[8012] | 85 | """An undergraduate applicant. |
---|
| 86 | |
---|
[8521] | 87 | This interface defines the least common multiple of all fields |
---|
| 88 | in ug application forms. In customized forms, fields can be excluded by |
---|
| 89 | adding them to the UG_OMIT* tuples. |
---|
[8012] | 90 | """ |
---|
| 91 | |
---|
[13977] | 92 | #programme_type = schema.Choice( |
---|
| 93 | # title = _(u'Programme Type'), |
---|
| 94 | # vocabulary = programme_types_vocab, |
---|
| 95 | # required = False, |
---|
| 96 | # ) |
---|
[10924] | 97 | |
---|
[10298] | 98 | nationality = schema.Choice( |
---|
| 99 | source = nats_vocab, |
---|
| 100 | title = _(u'Nationality'), |
---|
| 101 | required = True, |
---|
| 102 | ) |
---|
[14829] | 103 | |
---|
[10298] | 104 | lga = schema.Choice( |
---|
| 105 | source = LGASource(), |
---|
| 106 | title = _(u'State/LGA (Nigerians only)'), |
---|
| 107 | required = False, |
---|
| 108 | ) |
---|
[14829] | 109 | |
---|
[10298] | 110 | perm_address = schema.Text( |
---|
| 111 | title = _(u'Permanent Address'), |
---|
| 112 | required = False, |
---|
| 113 | ) |
---|
[14829] | 114 | |
---|
[10308] | 115 | home_town = schema.TextLine( |
---|
[10306] | 116 | title = _(u'Home Town'), |
---|
| 117 | required = False, |
---|
| 118 | ) |
---|
[14829] | 119 | |
---|
[13977] | 120 | #jamb_reg_number = schema.TextLine( |
---|
| 121 | # title = _(u'JAMB Registration Number'), |
---|
| 122 | # required = False, |
---|
| 123 | # ) |
---|
[14829] | 124 | |
---|
[10311] | 125 | jamb_score = schema.Int( |
---|
| 126 | title = _(u'Total JAMB Score'), |
---|
| 127 | required = False, |
---|
| 128 | ) |
---|
[14829] | 129 | |
---|
[13977] | 130 | jamb_subjects = schema.Text( |
---|
| 131 | title = _(u'JAMB Subjects and Scores'), |
---|
| 132 | required = False, |
---|
| 133 | ) |
---|
[14829] | 134 | |
---|
[10298] | 135 | course1 = schema.Choice( |
---|
| 136 | title = _(u'1st Choice Course of Study'), |
---|
| 137 | source = AppCatCertificateSource(), |
---|
[14468] | 138 | required = False, |
---|
[10298] | 139 | ) |
---|
[14829] | 140 | |
---|
[10298] | 141 | course2 = schema.Choice( |
---|
| 142 | title = _(u'2nd Choice Course of Study'), |
---|
| 143 | source = AppCatCertificateSource(), |
---|
| 144 | required = False, |
---|
| 145 | ) |
---|
[14829] | 146 | |
---|
[15455] | 147 | course3 = schema.Choice( |
---|
| 148 | title = _(u'3rd Choice Course of Study'), |
---|
| 149 | source = AppCatCertificateSource(), |
---|
| 150 | required = False, |
---|
| 151 | ) |
---|
| 152 | |
---|
[10298] | 153 | fst_sit_fname = schema.TextLine( |
---|
| 154 | title = _(u'Full Name'), |
---|
| 155 | required = False, |
---|
| 156 | readonly = False, |
---|
| 157 | ) |
---|
[14829] | 158 | |
---|
[10298] | 159 | fst_sit_no = schema.TextLine( |
---|
| 160 | title = _(u'Exam Number'), |
---|
| 161 | required = False, |
---|
| 162 | readonly = False, |
---|
| 163 | ) |
---|
[14829] | 164 | |
---|
| 165 | fst_sit_sc_pin = schema.TextLine( |
---|
| 166 | title = _(u'Scratch Card Pin'), |
---|
| 167 | required = False, |
---|
| 168 | readonly = False, |
---|
| 169 | ) |
---|
| 170 | |
---|
| 171 | fst_sit_sc_serial_number = schema.TextLine( |
---|
| 172 | title = _(u'Scratch Card Serial Number'), |
---|
| 173 | required = False, |
---|
| 174 | readonly = False, |
---|
| 175 | ) |
---|
| 176 | |
---|
[10298] | 177 | fst_sit_date = FormattedDate( |
---|
| 178 | title = _(u'Exam Date'), |
---|
| 179 | required = False, |
---|
| 180 | readonly = False, |
---|
| 181 | show_year = True, |
---|
| 182 | ) |
---|
[14829] | 183 | |
---|
[10298] | 184 | fst_sit_type = schema.Choice( |
---|
| 185 | title = _(u'Exam Type'), |
---|
| 186 | required = False, |
---|
| 187 | readonly = False, |
---|
| 188 | vocabulary = exam_types, |
---|
| 189 | ) |
---|
[14829] | 190 | |
---|
[10298] | 191 | fst_sit_results = schema.List( |
---|
| 192 | title = _(u'Exam Results'), |
---|
| 193 | value_type = ResultEntryField(), |
---|
| 194 | required = False, |
---|
| 195 | readonly = False, |
---|
[14017] | 196 | defaultFactory=list, |
---|
[10298] | 197 | ) |
---|
[14829] | 198 | |
---|
[10298] | 199 | scd_sit_fname = schema.TextLine( |
---|
| 200 | title = _(u'Full Name'), |
---|
| 201 | required = False, |
---|
| 202 | readonly = False, |
---|
| 203 | ) |
---|
[14829] | 204 | |
---|
[10298] | 205 | scd_sit_no = schema.TextLine( |
---|
| 206 | title = _(u'Exam Number'), |
---|
| 207 | required = False, |
---|
| 208 | readonly = False, |
---|
| 209 | ) |
---|
[14829] | 210 | |
---|
| 211 | scd_sit_sc_pin = schema.TextLine( |
---|
| 212 | title = _(u'Scratch Card Pin'), |
---|
| 213 | required = False, |
---|
| 214 | readonly = False, |
---|
| 215 | ) |
---|
| 216 | |
---|
| 217 | scd_sit_sc_serial_number = schema.TextLine( |
---|
| 218 | title = _(u'Scratch Card Serial Number'), |
---|
| 219 | required = False, |
---|
| 220 | readonly = False, |
---|
| 221 | ) |
---|
| 222 | |
---|
[10298] | 223 | scd_sit_date = FormattedDate( |
---|
| 224 | title = _(u'Exam Date'), |
---|
| 225 | required = False, |
---|
| 226 | readonly = False, |
---|
| 227 | show_year = True, |
---|
| 228 | ) |
---|
[14829] | 229 | |
---|
[10298] | 230 | scd_sit_type = schema.Choice( |
---|
| 231 | title = _(u'Exam Type'), |
---|
| 232 | required = False, |
---|
| 233 | readonly = False, |
---|
| 234 | vocabulary = exam_types, |
---|
| 235 | ) |
---|
[14829] | 236 | |
---|
[10298] | 237 | scd_sit_results = schema.List( |
---|
| 238 | title = _(u'Exam Results'), |
---|
| 239 | value_type = ResultEntryField(), |
---|
| 240 | required = False, |
---|
| 241 | readonly = False, |
---|
[14017] | 242 | defaultFactory=list, |
---|
[10298] | 243 | ) |
---|
[14829] | 244 | |
---|
[10298] | 245 | alr_fname = schema.TextLine( |
---|
| 246 | title = _(u'Full Name'), |
---|
| 247 | required = False, |
---|
| 248 | readonly = False, |
---|
| 249 | ) |
---|
[14829] | 250 | |
---|
[10298] | 251 | alr_no = schema.TextLine( |
---|
| 252 | title = _(u'Exam Number'), |
---|
| 253 | required = False, |
---|
| 254 | readonly = False, |
---|
| 255 | ) |
---|
[14829] | 256 | |
---|
[10298] | 257 | alr_date = FormattedDate( |
---|
| 258 | title = _(u'Exam Date'), |
---|
| 259 | required = False, |
---|
| 260 | readonly = False, |
---|
| 261 | show_year = True, |
---|
| 262 | ) |
---|
[14829] | 263 | |
---|
[10298] | 264 | alr_results = schema.List( |
---|
| 265 | title = _(u'Exam Results'), |
---|
| 266 | value_type = ResultEntryField(), |
---|
| 267 | required = False, |
---|
| 268 | readonly = False, |
---|
[14017] | 269 | defaultFactory=list, |
---|
[10298] | 270 | ) |
---|
[14829] | 271 | |
---|
[10998] | 272 | hq_type = schema.Choice( |
---|
| 273 | title = _(u'Qualification Obtained'), |
---|
| 274 | required = False, |
---|
| 275 | readonly = False, |
---|
| 276 | vocabulary = high_qual, |
---|
| 277 | ) |
---|
| 278 | |
---|
| 279 | hq_fname = schema.TextLine( |
---|
| 280 | title = _(u'Full Name'), |
---|
| 281 | required = False, |
---|
| 282 | readonly = False, |
---|
| 283 | ) |
---|
| 284 | |
---|
| 285 | hq_matric_no = schema.TextLine( |
---|
| 286 | title = _(u'Former Matric Number'), |
---|
| 287 | required = False, |
---|
| 288 | readonly = False, |
---|
| 289 | ) |
---|
| 290 | |
---|
| 291 | hq_degree = schema.Choice( |
---|
| 292 | title = _(u'Class of Degree'), |
---|
| 293 | required = False, |
---|
| 294 | readonly = False, |
---|
| 295 | vocabulary = high_grade, |
---|
| 296 | ) |
---|
| 297 | |
---|
| 298 | hq_school = schema.TextLine( |
---|
| 299 | title = _(u'Institution Attended'), |
---|
| 300 | required = False, |
---|
| 301 | readonly = False, |
---|
| 302 | ) |
---|
| 303 | |
---|
| 304 | hq_session = schema.TextLine( |
---|
| 305 | title = _(u'Years Attended'), |
---|
| 306 | required = False, |
---|
| 307 | readonly = False, |
---|
| 308 | ) |
---|
| 309 | |
---|
| 310 | hq_disc = schema.TextLine( |
---|
| 311 | title = _(u'Discipline'), |
---|
| 312 | required = False, |
---|
| 313 | readonly = False, |
---|
| 314 | ) |
---|
[13545] | 315 | |
---|
| 316 | hq_type2 = schema.Choice( |
---|
| 317 | title = _(u'Qualification Obtained'), |
---|
| 318 | required = False, |
---|
| 319 | readonly = False, |
---|
| 320 | vocabulary = high_qual, |
---|
| 321 | ) |
---|
| 322 | |
---|
| 323 | hq_fname2 = schema.TextLine( |
---|
| 324 | title = _(u'Full Name'), |
---|
| 325 | required = False, |
---|
| 326 | readonly = False, |
---|
| 327 | ) |
---|
| 328 | |
---|
| 329 | hq_matric_no2 = schema.TextLine( |
---|
| 330 | title = _(u'Former Matric Number'), |
---|
| 331 | required = False, |
---|
| 332 | readonly = False, |
---|
| 333 | ) |
---|
| 334 | |
---|
| 335 | hq_degree2 = schema.Choice( |
---|
| 336 | title = _(u'Class of Degree'), |
---|
| 337 | required = False, |
---|
| 338 | readonly = False, |
---|
| 339 | vocabulary = high_grade, |
---|
| 340 | ) |
---|
| 341 | |
---|
| 342 | hq_school2 = schema.TextLine( |
---|
| 343 | title = _(u'Institution Attended'), |
---|
| 344 | required = False, |
---|
| 345 | readonly = False, |
---|
| 346 | ) |
---|
| 347 | |
---|
| 348 | hq_session2 = schema.TextLine( |
---|
| 349 | title = _(u'Years Attended'), |
---|
| 350 | required = False, |
---|
| 351 | readonly = False, |
---|
| 352 | ) |
---|
| 353 | |
---|
| 354 | hq_disc2 = schema.TextLine( |
---|
| 355 | title = _(u'Discipline'), |
---|
| 356 | required = False, |
---|
| 357 | readonly = False, |
---|
| 358 | ) |
---|
| 359 | |
---|
| 360 | hq_type3 = schema.Choice( |
---|
| 361 | title = _(u'Qualification Obtained'), |
---|
| 362 | required = False, |
---|
| 363 | readonly = False, |
---|
| 364 | vocabulary = high_qual, |
---|
| 365 | ) |
---|
| 366 | |
---|
| 367 | hq_fname3 = schema.TextLine( |
---|
| 368 | title = _(u'Full Name'), |
---|
| 369 | required = False, |
---|
| 370 | readonly = False, |
---|
| 371 | ) |
---|
| 372 | |
---|
| 373 | hq_matric_no3 = schema.TextLine( |
---|
| 374 | title = _(u'Former Matric Number'), |
---|
| 375 | required = False, |
---|
| 376 | readonly = False, |
---|
| 377 | ) |
---|
| 378 | |
---|
| 379 | hq_degree3 = schema.Choice( |
---|
| 380 | title = _(u'Class of Degree'), |
---|
| 381 | required = False, |
---|
| 382 | readonly = False, |
---|
| 383 | vocabulary = high_grade, |
---|
| 384 | ) |
---|
| 385 | |
---|
| 386 | hq_school3 = schema.TextLine( |
---|
| 387 | title = _(u'Institution Attended'), |
---|
| 388 | required = False, |
---|
| 389 | readonly = False, |
---|
| 390 | ) |
---|
| 391 | |
---|
| 392 | hq_session3 = schema.TextLine( |
---|
| 393 | title = _(u'Years Attended'), |
---|
| 394 | required = False, |
---|
| 395 | readonly = False, |
---|
| 396 | ) |
---|
| 397 | |
---|
| 398 | hq_disc3 = schema.TextLine( |
---|
| 399 | title = _(u'Discipline'), |
---|
| 400 | required = False, |
---|
| 401 | readonly = False, |
---|
| 402 | ) |
---|
[13679] | 403 | |
---|
| 404 | nysc_year = schema.Int( |
---|
| 405 | title = _(u'Nysc Year'), |
---|
| 406 | required = False, |
---|
| 407 | readonly = False, |
---|
| 408 | ) |
---|
| 409 | |
---|
| 410 | nysc_location = schema.TextLine( |
---|
| 411 | title = _(u'Nysc Location'), |
---|
| 412 | required = False, |
---|
| 413 | ) |
---|
| 414 | |
---|
| 415 | nysc_lga = schema.Choice( |
---|
| 416 | source = LGASource(), |
---|
| 417 | title = _(u'Nysc LGA'), |
---|
| 418 | required = False, |
---|
| 419 | ) |
---|
| 420 | |
---|
| 421 | employer = schema.TextLine( |
---|
| 422 | title = _(u'Employer'), |
---|
| 423 | required = False, |
---|
| 424 | readonly = False, |
---|
| 425 | ) |
---|
| 426 | |
---|
| 427 | emp_position = schema.TextLine( |
---|
| 428 | title = _(u'Employer Position'), |
---|
| 429 | required = False, |
---|
| 430 | readonly = False, |
---|
| 431 | ) |
---|
| 432 | |
---|
| 433 | emp_start = FormattedDate( |
---|
| 434 | title = _(u'Start Date'), |
---|
| 435 | required = False, |
---|
| 436 | readonly = False, |
---|
| 437 | show_year = True, |
---|
| 438 | ) |
---|
| 439 | |
---|
| 440 | emp_end = FormattedDate( |
---|
| 441 | title = _(u'End Date'), |
---|
| 442 | required = False, |
---|
| 443 | readonly = False, |
---|
| 444 | show_year = True, |
---|
| 445 | ) |
---|
| 446 | |
---|
| 447 | emp_reason = schema.TextLine( |
---|
| 448 | title = _(u'Reason for Leaving'), |
---|
| 449 | required = False, |
---|
| 450 | readonly = False, |
---|
| 451 | ) |
---|
| 452 | |
---|
| 453 | employer2 = schema.TextLine( |
---|
| 454 | title = _(u'2nd Employer'), |
---|
| 455 | required = False, |
---|
| 456 | readonly = False, |
---|
| 457 | ) |
---|
| 458 | |
---|
| 459 | emp2_position = schema.TextLine( |
---|
| 460 | title = _(u'2nd Employer Position'), |
---|
| 461 | required = False, |
---|
| 462 | readonly = False, |
---|
| 463 | ) |
---|
| 464 | |
---|
| 465 | emp2_start = FormattedDate( |
---|
| 466 | title = _(u'Start Date'), |
---|
| 467 | required = False, |
---|
| 468 | readonly = False, |
---|
| 469 | show_year = True, |
---|
| 470 | ) |
---|
| 471 | |
---|
| 472 | emp2_end = FormattedDate( |
---|
| 473 | title = _(u'End Date'), |
---|
| 474 | required = False, |
---|
| 475 | readonly = False, |
---|
| 476 | show_year = True, |
---|
| 477 | ) |
---|
| 478 | |
---|
| 479 | emp2_reason = schema.TextLine( |
---|
| 480 | title = _(u'Reason for Leaving'), |
---|
| 481 | required = False, |
---|
| 482 | readonly = False, |
---|
| 483 | ) |
---|
| 484 | |
---|
| 485 | former_matric = schema.TextLine( |
---|
| 486 | title = _(u'If yes, matric number'), |
---|
| 487 | required = False, |
---|
| 488 | readonly = False, |
---|
| 489 | ) |
---|
| 490 | |
---|
[10298] | 491 | notice = schema.Text( |
---|
| 492 | title = _(u'Notice'), |
---|
| 493 | required = False, |
---|
| 494 | ) |
---|
[13977] | 495 | |
---|
| 496 | |
---|
| 497 | master_sheet_number = schema.TextLine( |
---|
| 498 | title = _(u'Master Sheet Number'), |
---|
| 499 | required = False, |
---|
| 500 | readonly = False, |
---|
| 501 | ) |
---|
| 502 | |
---|
[13996] | 503 | screening_venue = schema.TextLine( |
---|
| 504 | title = _(u'Screening Venue'), |
---|
| 505 | required = False, |
---|
| 506 | ) |
---|
[14666] | 507 | |
---|
[13996] | 508 | screening_date = schema.TextLine( |
---|
| 509 | title = _(u'Screening Date'), |
---|
| 510 | required = False, |
---|
| 511 | ) |
---|
[14666] | 512 | |
---|
[13996] | 513 | screening_score = schema.Int( |
---|
[14028] | 514 | title = _(u'Screening Points'), |
---|
[13996] | 515 | required = False, |
---|
| 516 | ) |
---|
[14666] | 517 | |
---|
[10298] | 518 | student_id = schema.TextLine( |
---|
| 519 | title = _(u'Student Id'), |
---|
| 520 | required = False, |
---|
| 521 | readonly = False, |
---|
| 522 | ) |
---|
[14666] | 523 | |
---|
[10298] | 524 | course_admitted = schema.Choice( |
---|
| 525 | title = _(u'Admitted Course of Study'), |
---|
| 526 | source = CertificateSource(), |
---|
| 527 | required = False, |
---|
| 528 | ) |
---|
[14666] | 529 | |
---|
[10298] | 530 | locked = schema.Bool( |
---|
| 531 | title = _(u'Form locked'), |
---|
| 532 | default = False, |
---|
| 533 | ) |
---|
| 534 | |
---|
| 535 | @invariant |
---|
[15455] | 536 | def course_choice(applicant): |
---|
[10298] | 537 | if applicant.course1 == applicant.course2: |
---|
| 538 | raise Invalid(_("2nd choice course must differ from 1st choice course.")) |
---|
[15455] | 539 | if applicant.course1 == applicant.course3: |
---|
| 540 | raise Invalid(_("3rd choice course must differ from 1st choice course.")) |
---|
| 541 | if applicant.course2 == applicant.course3: |
---|
| 542 | raise Invalid(_("3rd choice course must differ from 2nd choice course.")) |
---|
[10298] | 543 | |
---|
[13977] | 544 | #ICustomUGApplicant['programme_type'].order = IApplicantBaseData[ |
---|
| 545 | # 'reg_number'].order |
---|
[10924] | 546 | |
---|
[16756] | 547 | |
---|
| 548 | class ICustomPGApplicant(IApplicantBaseData): |
---|
[7853] | 549 | """A postgraduate applicant. |
---|
| 550 | |
---|
[8521] | 551 | This interface defines the least common multiple of all fields |
---|
| 552 | in pg application forms. In customized forms, fields can be excluded by |
---|
| 553 | adding them to the PG_OMIT* tuples. |
---|
[7866] | 554 | """ |
---|
| 555 | |
---|
[16756] | 556 | nationality = schema.Choice( |
---|
| 557 | source = nats_vocab, |
---|
| 558 | title = _(u'Nationality'), |
---|
| 559 | required = True, |
---|
| 560 | ) |
---|
| 561 | lga = schema.Choice( |
---|
| 562 | source = LGASource(), |
---|
| 563 | title = _(u'State/LGA (Nigerians only)'), |
---|
| 564 | required = False, |
---|
| 565 | ) |
---|
| 566 | #perm_address = schema.Text( |
---|
| 567 | # title = _(u'Permanent Address'), |
---|
| 568 | # required = False, |
---|
| 569 | # ) |
---|
| 570 | course1 = schema.Choice( |
---|
| 571 | title = _(u'1st Choice Course of Study'), |
---|
| 572 | source = AppCatCertificateSource(), |
---|
| 573 | required = True, |
---|
| 574 | ) |
---|
| 575 | course2 = schema.Choice( |
---|
| 576 | title = _(u'2nd Choice Course of Study'), |
---|
| 577 | source = AppCatCertificateSource(), |
---|
| 578 | required = False, |
---|
| 579 | ) |
---|
| 580 | hq_type = schema.Choice( |
---|
| 581 | title = _(u'Qualification Obtained'), |
---|
| 582 | required = False, |
---|
| 583 | readonly = False, |
---|
| 584 | vocabulary = high_qual, |
---|
| 585 | ) |
---|
| 586 | hq_fname = schema.TextLine( |
---|
| 587 | title = _(u'Full Name'), |
---|
| 588 | required = False, |
---|
| 589 | readonly = False, |
---|
| 590 | ) |
---|
| 591 | hq_matric_no = schema.TextLine( |
---|
| 592 | title = _(u'Former Matric Number'), |
---|
| 593 | required = False, |
---|
| 594 | readonly = False, |
---|
| 595 | ) |
---|
| 596 | hq_degree = schema.Choice( |
---|
| 597 | title = _(u'Class of Degree'), |
---|
| 598 | required = False, |
---|
| 599 | readonly = False, |
---|
| 600 | vocabulary = high_grade, |
---|
| 601 | ) |
---|
| 602 | hq_school = schema.TextLine( |
---|
| 603 | title = _(u'Institution Attended'), |
---|
| 604 | required = False, |
---|
| 605 | readonly = False, |
---|
| 606 | ) |
---|
| 607 | hq_session = schema.TextLine( |
---|
| 608 | title = _(u'Years Attended'), |
---|
| 609 | required = False, |
---|
| 610 | readonly = False, |
---|
| 611 | ) |
---|
| 612 | hq_disc = schema.TextLine( |
---|
| 613 | title = _(u'Discipline'), |
---|
| 614 | required = False, |
---|
| 615 | readonly = False, |
---|
| 616 | ) |
---|
[16763] | 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( |
---|
[16756] | 625 | title = _(u'Full Name'), |
---|
| 626 | required = False, |
---|
| 627 | readonly = False, |
---|
| 628 | ) |
---|
[16763] | 629 | |
---|
| 630 | hq_matric_no2 = schema.TextLine( |
---|
| 631 | title = _(u'Former Matric Number'), |
---|
[16756] | 632 | required = False, |
---|
| 633 | readonly = False, |
---|
| 634 | ) |
---|
[16763] | 635 | |
---|
| 636 | hq_degree2 = schema.Choice( |
---|
| 637 | title = _(u'Class of Degree'), |
---|
[16756] | 638 | required = False, |
---|
| 639 | readonly = False, |
---|
[16763] | 640 | vocabulary = high_grade, |
---|
[16756] | 641 | ) |
---|
[16763] | 642 | |
---|
| 643 | hq_school2 = schema.TextLine( |
---|
| 644 | title = _(u'Institution Attended'), |
---|
[16756] | 645 | required = False, |
---|
| 646 | readonly = False, |
---|
| 647 | ) |
---|
[16763] | 648 | |
---|
| 649 | hq_session2 = schema.TextLine( |
---|
| 650 | title = _(u'Years Attended'), |
---|
[16756] | 651 | required = False, |
---|
| 652 | readonly = False, |
---|
| 653 | ) |
---|
[16763] | 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( |
---|
[16756] | 669 | title = _(u'Full Name'), |
---|
| 670 | required = False, |
---|
| 671 | readonly = False, |
---|
| 672 | ) |
---|
[16763] | 673 | |
---|
| 674 | hq_matric_no3 = schema.TextLine( |
---|
| 675 | title = _(u'Former Matric Number'), |
---|
[16756] | 676 | required = False, |
---|
| 677 | readonly = False, |
---|
| 678 | ) |
---|
[16763] | 679 | |
---|
| 680 | hq_degree3 = schema.Choice( |
---|
| 681 | title = _(u'Class of Degree'), |
---|
[16756] | 682 | required = False, |
---|
| 683 | readonly = False, |
---|
[16763] | 684 | vocabulary = high_grade, |
---|
[16756] | 685 | ) |
---|
[16763] | 686 | |
---|
| 687 | hq_school3 = schema.TextLine( |
---|
| 688 | title = _(u'Institution Attended'), |
---|
[16756] | 689 | required = False, |
---|
| 690 | readonly = False, |
---|
| 691 | ) |
---|
[16763] | 692 | |
---|
| 693 | hq_session3 = schema.TextLine( |
---|
| 694 | title = _(u'Years Attended'), |
---|
[16756] | 695 | required = False, |
---|
| 696 | readonly = False, |
---|
| 697 | ) |
---|
[16763] | 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 | ) |
---|
[16756] | 748 | presently_inst = schema.TextLine( |
---|
| 749 | title = _(u'If yes, name of institution'), |
---|
| 750 | required = False, |
---|
| 751 | readonly = False, |
---|
| 752 | ) |
---|
| 753 | nysc_year = schema.Int( |
---|
| 754 | title = _(u'Nysc Year'), |
---|
| 755 | required = False, |
---|
| 756 | readonly = False, |
---|
| 757 | ) |
---|
| 758 | nysc_lga = schema.Choice( |
---|
| 759 | source = LGASource(), |
---|
| 760 | title = _(u'Nysc Location'), |
---|
| 761 | description = _(u'Leave blank for exception letters.'), |
---|
| 762 | required = False, |
---|
| 763 | ) |
---|
| 764 | employer = schema.TextLine( |
---|
| 765 | title = _(u'Employer'), |
---|
| 766 | required = False, |
---|
| 767 | readonly = False, |
---|
| 768 | ) |
---|
| 769 | emp_position = schema.TextLine( |
---|
| 770 | title = _(u'Employer Position'), |
---|
| 771 | required = False, |
---|
| 772 | readonly = False, |
---|
| 773 | ) |
---|
| 774 | emp_start = FormattedDate( |
---|
| 775 | title = _(u'Start Date'), |
---|
| 776 | required = False, |
---|
| 777 | readonly = False, |
---|
| 778 | show_year = True, |
---|
| 779 | ) |
---|
| 780 | emp_end = FormattedDate( |
---|
| 781 | title = _(u'End Date'), |
---|
| 782 | required = False, |
---|
| 783 | readonly = False, |
---|
| 784 | show_year = True, |
---|
| 785 | ) |
---|
| 786 | emp_reason = schema.TextLine( |
---|
| 787 | title = _(u'Reason for Leaving'), |
---|
| 788 | required = False, |
---|
| 789 | readonly = False, |
---|
| 790 | ) |
---|
| 791 | employer2 = schema.TextLine( |
---|
| 792 | title = _(u'2nd Employer'), |
---|
| 793 | required = False, |
---|
| 794 | readonly = False, |
---|
| 795 | ) |
---|
| 796 | emp2_position = schema.TextLine( |
---|
| 797 | title = _(u'2nd Employer Position'), |
---|
| 798 | required = False, |
---|
| 799 | readonly = False, |
---|
| 800 | ) |
---|
| 801 | emp2_start = FormattedDate( |
---|
| 802 | title = _(u'Start Date'), |
---|
| 803 | required = False, |
---|
| 804 | readonly = False, |
---|
| 805 | show_year = True, |
---|
| 806 | ) |
---|
| 807 | emp2_end = FormattedDate( |
---|
| 808 | title = _(u'End Date'), |
---|
| 809 | required = False, |
---|
| 810 | readonly = False, |
---|
| 811 | show_year = True, |
---|
| 812 | ) |
---|
| 813 | emp2_reason = schema.TextLine( |
---|
| 814 | title = _(u'Reason for Leaving'), |
---|
| 815 | required = False, |
---|
| 816 | readonly = False, |
---|
| 817 | ) |
---|
[16763] | 818 | former_matric = schema.TextLine( |
---|
| 819 | title = _(u'If yes, matric number'), |
---|
| 820 | required = False, |
---|
| 821 | readonly = False, |
---|
| 822 | ) |
---|
[16756] | 823 | notice = schema.Text( |
---|
| 824 | title = _(u'Notice'), |
---|
| 825 | required = False, |
---|
| 826 | readonly = False, |
---|
| 827 | ) |
---|
| 828 | screening_venue = schema.TextLine( |
---|
| 829 | title = _(u'Screening Venue'), |
---|
| 830 | required = False, |
---|
| 831 | ) |
---|
| 832 | screening_date = schema.TextLine( |
---|
| 833 | title = _(u'Screening Date'), |
---|
| 834 | required = False, |
---|
| 835 | ) |
---|
| 836 | screening_score = schema.Float( |
---|
| 837 | title = _(u'Screening Score (%)'), |
---|
| 838 | required = False, |
---|
| 839 | ) |
---|
| 840 | student_id = schema.TextLine( |
---|
| 841 | title = _(u'Student Id'), |
---|
| 842 | required = False, |
---|
| 843 | readonly = False, |
---|
| 844 | ) |
---|
| 845 | course_admitted = schema.Choice( |
---|
| 846 | title = _(u'Admitted Course of Study'), |
---|
| 847 | source = CertificateSource(), |
---|
| 848 | required = False, |
---|
| 849 | readonly = False, |
---|
| 850 | ) |
---|
| 851 | locked = schema.Bool( |
---|
| 852 | title = _(u'Form locked'), |
---|
| 853 | default = False, |
---|
| 854 | required = False, |
---|
| 855 | ) |
---|
| 856 | |
---|
[16763] | 857 | referees = schema.List( |
---|
| 858 | title = _(u'Referees'), |
---|
| 859 | value_type = RefereeEntryField(), |
---|
| 860 | required = False, |
---|
| 861 | defaultFactory=list, |
---|
| 862 | ) |
---|
| 863 | |
---|
[13544] | 864 | class ITranscriptApplicant(IKofaObject): |
---|
| 865 | """A transcript applicant. |
---|
| 866 | """ |
---|
[8012] | 867 | |
---|
[13544] | 868 | suspended = schema.Bool( |
---|
| 869 | title = _(u'Account suspended'), |
---|
| 870 | default = False, |
---|
| 871 | required = False, |
---|
| 872 | ) |
---|
| 873 | |
---|
| 874 | locked = schema.Bool( |
---|
| 875 | title = _(u'Form locked'), |
---|
| 876 | default = False, |
---|
| 877 | required = False, |
---|
| 878 | ) |
---|
| 879 | |
---|
| 880 | applicant_id = schema.TextLine( |
---|
[15951] | 881 | title = _(u'Application Id'), |
---|
[13544] | 882 | required = False, |
---|
| 883 | readonly = False, |
---|
| 884 | ) |
---|
| 885 | |
---|
[14472] | 886 | reg_number = TextLineChoice( |
---|
[14486] | 887 | title = _(u'Kofa Registration Number'), |
---|
[14472] | 888 | readonly = False, |
---|
| 889 | required = True, |
---|
| 890 | source = contextual_reg_num_source, |
---|
| 891 | ) |
---|
| 892 | |
---|
[13544] | 893 | firstname = schema.TextLine( |
---|
| 894 | title = _(u'First Name'), |
---|
| 895 | required = True, |
---|
| 896 | ) |
---|
| 897 | |
---|
| 898 | middlename = schema.TextLine( |
---|
| 899 | title = _(u'Middle Name'), |
---|
| 900 | required = False, |
---|
| 901 | ) |
---|
| 902 | |
---|
| 903 | lastname = schema.TextLine( |
---|
| 904 | title = _(u'Last Name (Surname)'), |
---|
| 905 | required = True, |
---|
| 906 | ) |
---|
| 907 | |
---|
[14472] | 908 | matric_number = schema.TextLine( |
---|
| 909 | title = _(u'Matriculation Number'), |
---|
[13544] | 910 | readonly = False, |
---|
[14486] | 911 | required = True, |
---|
[13544] | 912 | ) |
---|
| 913 | |
---|
| 914 | date_of_birth = FormattedDate( |
---|
| 915 | title = _(u'Date of Birth'), |
---|
[15275] | 916 | required = False, |
---|
[13544] | 917 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 918 | show_year = True, |
---|
| 919 | ) |
---|
| 920 | |
---|
[15791] | 921 | sex = schema.Choice( |
---|
| 922 | title = _(u'Gender'), |
---|
| 923 | source = GenderSource(), |
---|
| 924 | required = True, |
---|
| 925 | ) |
---|
| 926 | |
---|
[13544] | 927 | place_of_birth = schema.TextLine( |
---|
| 928 | title = _(u'Place of Birth'), |
---|
| 929 | readonly = False, |
---|
[15275] | 930 | required = False, |
---|
[13544] | 931 | ) |
---|
| 932 | |
---|
| 933 | nationality = schema.Choice( |
---|
| 934 | vocabulary = nats_vocab, |
---|
| 935 | title = _(u'Nationality'), |
---|
[15275] | 936 | required = False, |
---|
[13544] | 937 | ) |
---|
| 938 | |
---|
| 939 | email = schema.ASCIILine( |
---|
| 940 | title = _(u'Email Address'), |
---|
| 941 | required = True, |
---|
| 942 | constraint=validate_email, |
---|
| 943 | ) |
---|
| 944 | |
---|
| 945 | phone = PhoneNumber( |
---|
| 946 | title = _(u'Phone'), |
---|
| 947 | description = u'', |
---|
[15275] | 948 | required = False, |
---|
[13544] | 949 | ) |
---|
| 950 | |
---|
| 951 | perm_address = schema.Text( |
---|
| 952 | title = _(u'Current Local Address'), |
---|
[15275] | 953 | required = False, |
---|
[13544] | 954 | readonly = False, |
---|
| 955 | ) |
---|
| 956 | |
---|
| 957 | dispatch_address = schema.Text( |
---|
[14306] | 958 | title = _(u'Dispatch Addresses'), |
---|
| 959 | description = u'Addresses to which transcript should be posted.', |
---|
[15275] | 960 | required = False, |
---|
[13544] | 961 | readonly = False, |
---|
| 962 | ) |
---|
| 963 | |
---|
| 964 | entry_mode = schema.Choice( |
---|
| 965 | title = _(u'Entry Mode'), |
---|
| 966 | source = StudyModeSource(), |
---|
[15275] | 967 | required = False, |
---|
[13544] | 968 | readonly = False, |
---|
| 969 | ) |
---|
| 970 | |
---|
| 971 | entry_session = schema.Choice( |
---|
| 972 | title = _(u'Entry Session'), |
---|
| 973 | source = academic_sessions_vocab, |
---|
[15275] | 974 | required = False, |
---|
[13544] | 975 | readonly = False, |
---|
| 976 | ) |
---|
| 977 | |
---|
| 978 | end_session = schema.Choice( |
---|
| 979 | title = _(u'End Session'), |
---|
| 980 | source = academic_sessions_vocab, |
---|
[15275] | 981 | required = False, |
---|
[13544] | 982 | readonly = False, |
---|
| 983 | ) |
---|
| 984 | |
---|
| 985 | course_studied = schema.Choice( |
---|
| 986 | title = _(u'Course of Study / Degree'), |
---|
| 987 | source = CertificateSource(), |
---|
[15275] | 988 | required = False, |
---|
[13544] | 989 | readonly = False, |
---|
| 990 | ) |
---|
| 991 | |
---|
| 992 | purpose = schema.TextLine( |
---|
| 993 | title = _(u'Purpose of this Application'), |
---|
| 994 | readonly = False, |
---|
| 995 | required = False, |
---|
| 996 | ) |
---|
| 997 | |
---|
| 998 | course_changed = schema.Choice( |
---|
| 999 | title = _(u'Change of Study Course'), |
---|
| 1000 | description = u'If yes, select previous course of study.', |
---|
| 1001 | source = CertificateSource(), |
---|
| 1002 | readonly = False, |
---|
| 1003 | required = False, |
---|
| 1004 | ) |
---|
| 1005 | |
---|
| 1006 | change_level = schema.Choice( |
---|
| 1007 | title = _(u'Change Level'), |
---|
| 1008 | description = u'If yes, select level at which you changed course of study.', |
---|
| 1009 | source = StudyLevelSource(), |
---|
| 1010 | required = False, |
---|
| 1011 | readonly = False, |
---|
| 1012 | ) |
---|
| 1013 | |
---|
[14306] | 1014 | no_copies = schema.Choice( |
---|
| 1015 | title = _(u'Number of Copies'), |
---|
| 1016 | description = u'Must correspond with the number of dispatch addresses above.', |
---|
| 1017 | values=[1, 2, 3, 4], |
---|
| 1018 | required = False, |
---|
| 1019 | readonly = False, |
---|
| 1020 | default = 1, |
---|
| 1021 | ) |
---|
| 1022 | |
---|
[14304] | 1023 | class ICertificateRequest(IKofaObject): |
---|
| 1024 | """A transcript applicant. |
---|
| 1025 | """ |
---|
[13544] | 1026 | |
---|
[14304] | 1027 | suspended = schema.Bool( |
---|
| 1028 | title = _(u'Account suspended'), |
---|
| 1029 | default = False, |
---|
| 1030 | required = False, |
---|
| 1031 | ) |
---|
| 1032 | |
---|
| 1033 | locked = schema.Bool( |
---|
| 1034 | title = _(u'Form locked'), |
---|
| 1035 | default = False, |
---|
| 1036 | required = False, |
---|
| 1037 | ) |
---|
| 1038 | |
---|
| 1039 | applicant_id = schema.TextLine( |
---|
[15951] | 1040 | title = _(u'Application Id'), |
---|
[14304] | 1041 | required = False, |
---|
| 1042 | readonly = False, |
---|
| 1043 | ) |
---|
| 1044 | |
---|
[14472] | 1045 | reg_number = TextLineChoice( |
---|
[14486] | 1046 | title = _(u'Kofa Registration Number'), |
---|
[14472] | 1047 | readonly = False, |
---|
| 1048 | required = True, |
---|
| 1049 | source = contextual_reg_num_source, |
---|
| 1050 | ) |
---|
| 1051 | |
---|
[14304] | 1052 | firstname = schema.TextLine( |
---|
| 1053 | title = _(u'First Name'), |
---|
| 1054 | required = True, |
---|
| 1055 | ) |
---|
| 1056 | |
---|
| 1057 | middlename = schema.TextLine( |
---|
| 1058 | title = _(u'Middle Name'), |
---|
| 1059 | required = False, |
---|
| 1060 | ) |
---|
| 1061 | |
---|
| 1062 | lastname = schema.TextLine( |
---|
| 1063 | title = _(u'Last Name (Surname)'), |
---|
| 1064 | required = True, |
---|
| 1065 | ) |
---|
| 1066 | |
---|
[14472] | 1067 | matric_number = schema.TextLine( |
---|
| 1068 | title = _(u'Matriculation Number'), |
---|
[14304] | 1069 | readonly = False, |
---|
[14486] | 1070 | required = True, |
---|
[14304] | 1071 | ) |
---|
| 1072 | |
---|
| 1073 | date_of_birth = FormattedDate( |
---|
| 1074 | title = _(u'Date of Birth'), |
---|
[15275] | 1075 | required = False, |
---|
[14304] | 1076 | #date_format = u'%d/%m/%Y', # Use grok-instance-wide default |
---|
| 1077 | show_year = True, |
---|
| 1078 | ) |
---|
| 1079 | |
---|
[15791] | 1080 | sex = schema.Choice( |
---|
| 1081 | title = _(u'Gender'), |
---|
| 1082 | source = GenderSource(), |
---|
| 1083 | required = True, |
---|
| 1084 | ) |
---|
| 1085 | |
---|
[14304] | 1086 | place_of_birth = schema.TextLine( |
---|
| 1087 | title = _(u'Place of Birth'), |
---|
| 1088 | readonly = False, |
---|
[15275] | 1089 | required = False, |
---|
[14304] | 1090 | ) |
---|
| 1091 | |
---|
| 1092 | nationality = schema.Choice( |
---|
| 1093 | vocabulary = nats_vocab, |
---|
| 1094 | title = _(u'Nationality'), |
---|
[15275] | 1095 | required = False, |
---|
[14304] | 1096 | ) |
---|
| 1097 | |
---|
| 1098 | email = schema.ASCIILine( |
---|
| 1099 | title = _(u'Email Address'), |
---|
| 1100 | required = True, |
---|
| 1101 | constraint=validate_email, |
---|
| 1102 | ) |
---|
| 1103 | |
---|
| 1104 | phone = PhoneNumber( |
---|
| 1105 | title = _(u'Phone'), |
---|
| 1106 | description = u'', |
---|
[15275] | 1107 | required = False, |
---|
[14304] | 1108 | ) |
---|
| 1109 | |
---|
| 1110 | entry_session = schema.Choice( |
---|
| 1111 | title = _(u'Entry Session'), |
---|
| 1112 | source = academic_sessions_vocab, |
---|
[15275] | 1113 | required = False, |
---|
[14304] | 1114 | readonly = False, |
---|
| 1115 | ) |
---|
| 1116 | |
---|
| 1117 | end_session = schema.Choice( |
---|
| 1118 | title = _(u'End Session'), |
---|
| 1119 | source = academic_sessions_vocab, |
---|
[15275] | 1120 | required = False, |
---|
[14304] | 1121 | readonly = False, |
---|
| 1122 | ) |
---|
| 1123 | |
---|
| 1124 | course_studied = schema.Choice( |
---|
| 1125 | title = _(u'Course of Study / Degree'), |
---|
| 1126 | source = CertificateSource(), |
---|
[14486] | 1127 | required = True, |
---|
[14304] | 1128 | readonly = False, |
---|
| 1129 | ) |
---|
| 1130 | |
---|
[15118] | 1131 | certificate_type = schema.Choice( |
---|
| 1132 | title = _(u'Certificate Type'), |
---|
| 1133 | vocabulary = certificate_types_vocab, |
---|
[15275] | 1134 | required = False, |
---|
[15118] | 1135 | ) |
---|
[14306] | 1136 | |
---|
[15118] | 1137 | |
---|
[15530] | 1138 | class IVerificationRequest(IKofaObject): |
---|
| 1139 | """A applicant asking for verification. |
---|
| 1140 | """ |
---|
| 1141 | |
---|
| 1142 | suspended = schema.Bool( |
---|
| 1143 | title = _(u'Account suspended'), |
---|
| 1144 | default = False, |
---|
| 1145 | required = False, |
---|
| 1146 | ) |
---|
| 1147 | |
---|
| 1148 | locked = schema.Bool( |
---|
| 1149 | title = _(u'Form locked'), |
---|
| 1150 | default = False, |
---|
| 1151 | required = False, |
---|
| 1152 | ) |
---|
| 1153 | |
---|
| 1154 | applicant_id = schema.TextLine( |
---|
[15951] | 1155 | title = _(u'Application Id'), |
---|
[15530] | 1156 | required = False, |
---|
| 1157 | readonly = False, |
---|
| 1158 | ) |
---|
| 1159 | |
---|
| 1160 | #reg_number = TextLineChoice( |
---|
| 1161 | # title = _(u'Kofa Registration Number'), |
---|
| 1162 | # readonly = False, |
---|
| 1163 | # required = True, |
---|
| 1164 | # source = contextual_reg_num_source, |
---|
| 1165 | # ) |
---|
| 1166 | |
---|
| 1167 | firstname = schema.TextLine( |
---|
| 1168 | title = _(u'First Name'), |
---|
| 1169 | required = True, |
---|
| 1170 | ) |
---|
| 1171 | |
---|
| 1172 | middlename = schema.TextLine( |
---|
| 1173 | title = _(u'Middle Name'), |
---|
| 1174 | required = False, |
---|
| 1175 | ) |
---|
| 1176 | |
---|
| 1177 | lastname = schema.TextLine( |
---|
| 1178 | title = _(u'Last Name (Surname)'), |
---|
| 1179 | required = True, |
---|
| 1180 | ) |
---|
| 1181 | |
---|
[15791] | 1182 | sex = schema.Choice( |
---|
| 1183 | title = _(u'Gender'), |
---|
| 1184 | source = GenderSource(), |
---|
| 1185 | required = True, |
---|
| 1186 | ) |
---|
| 1187 | |
---|
[15530] | 1188 | email = schema.ASCIILine( |
---|
| 1189 | title = _(u'Email Address'), |
---|
| 1190 | required = True, |
---|
| 1191 | constraint=validate_email, |
---|
| 1192 | ) |
---|
| 1193 | |
---|
[15861] | 1194 | phone = PhoneNumber( |
---|
| 1195 | title = _(u'Phone'), |
---|
| 1196 | description = u'', |
---|
| 1197 | required = False, |
---|
| 1198 | ) |
---|
| 1199 | |
---|
[15530] | 1200 | matric_number = schema.TextLine( |
---|
| 1201 | title = _(u'Verification Body Reference Number'), |
---|
| 1202 | readonly = False, |
---|
| 1203 | required = True, |
---|
| 1204 | ) |
---|
| 1205 | |
---|
| 1206 | body_address = schema.Text( |
---|
| 1207 | title = _(u'Verification Body Address'), |
---|
| 1208 | required = True, |
---|
| 1209 | ) |
---|
| 1210 | |
---|
| 1211 | document_type = schema.Choice( |
---|
| 1212 | title = _(u'Document Type'), |
---|
| 1213 | vocabulary = document_types_vocab, |
---|
| 1214 | required = True, |
---|
| 1215 | ) |
---|
| 1216 | |
---|
[15950] | 1217 | class IFedexRequest(IKofaObject): |
---|
| 1218 | """A applicant requests payment for courier. |
---|
| 1219 | """ |
---|
| 1220 | |
---|
| 1221 | suspended = schema.Bool( |
---|
| 1222 | title = _(u'Account suspended'), |
---|
| 1223 | default = False, |
---|
| 1224 | required = False, |
---|
| 1225 | ) |
---|
| 1226 | |
---|
| 1227 | locked = schema.Bool( |
---|
| 1228 | title = _(u'Form locked'), |
---|
| 1229 | default = False, |
---|
| 1230 | required = False, |
---|
| 1231 | ) |
---|
| 1232 | |
---|
| 1233 | applicant_id = schema.TextLine( |
---|
[15951] | 1234 | title = _(u'Application Id'), |
---|
[15950] | 1235 | required = False, |
---|
| 1236 | readonly = False, |
---|
| 1237 | ) |
---|
| 1238 | |
---|
[15951] | 1239 | trans_id = schema.TextLine( |
---|
[15954] | 1240 | title = _(u'Transcript Application Id'), |
---|
[15951] | 1241 | required = True, |
---|
| 1242 | readonly = False, |
---|
[16005] | 1243 | #description = u'This serve as a unique identifier which ' |
---|
| 1244 | # 'allows the the officer to verify the transcript ' |
---|
| 1245 | # 'in order to avoid errors before dispatch.', |
---|
[15951] | 1246 | ) |
---|
| 1247 | |
---|
[15950] | 1248 | #reg_number = TextLineChoice( |
---|
| 1249 | # title = _(u'Kofa Registration Number'), |
---|
| 1250 | # readonly = False, |
---|
| 1251 | # required = True, |
---|
| 1252 | # source = contextual_reg_num_source, |
---|
| 1253 | # ) |
---|
| 1254 | |
---|
| 1255 | firstname = schema.TextLine( |
---|
| 1256 | title = _(u'First Name'), |
---|
| 1257 | required = True, |
---|
| 1258 | ) |
---|
| 1259 | |
---|
| 1260 | middlename = schema.TextLine( |
---|
| 1261 | title = _(u'Middle Name'), |
---|
| 1262 | required = False, |
---|
| 1263 | ) |
---|
| 1264 | |
---|
| 1265 | lastname = schema.TextLine( |
---|
| 1266 | title = _(u'Last Name (Surname)'), |
---|
| 1267 | required = True, |
---|
| 1268 | ) |
---|
| 1269 | |
---|
| 1270 | sex = schema.Choice( |
---|
| 1271 | title = _(u'Gender'), |
---|
| 1272 | source = GenderSource(), |
---|
| 1273 | required = True, |
---|
| 1274 | ) |
---|
| 1275 | |
---|
| 1276 | email = schema.ASCIILine( |
---|
| 1277 | title = _(u'Email Address'), |
---|
| 1278 | required = True, |
---|
| 1279 | constraint=validate_email, |
---|
| 1280 | ) |
---|
| 1281 | |
---|
| 1282 | phone = PhoneNumber( |
---|
| 1283 | title = _(u'Phone'), |
---|
| 1284 | description = u'', |
---|
| 1285 | required = False, |
---|
| 1286 | ) |
---|
| 1287 | |
---|
| 1288 | matric_number = schema.TextLine( |
---|
| 1289 | title = _(u'WES Reference Number (where applicable)'), |
---|
| 1290 | readonly = False, |
---|
| 1291 | required = False, |
---|
| 1292 | ) |
---|
| 1293 | |
---|
| 1294 | dispatch_address = schema.Text( |
---|
| 1295 | title = _(u'Dispatch Address'), |
---|
| 1296 | required = True, |
---|
| 1297 | ) |
---|
| 1298 | |
---|
[15991] | 1299 | class IRecruitment(IKofaObject): |
---|
| 1300 | """A recruitment application. |
---|
| 1301 | """ |
---|
| 1302 | |
---|
| 1303 | suspended = schema.Bool( |
---|
| 1304 | title = _(u'Account suspended'), |
---|
| 1305 | default = False, |
---|
| 1306 | required = False, |
---|
| 1307 | ) |
---|
| 1308 | |
---|
| 1309 | locked = schema.Bool( |
---|
| 1310 | title = _(u'Form locked'), |
---|
| 1311 | default = False, |
---|
| 1312 | required = False, |
---|
| 1313 | ) |
---|
| 1314 | |
---|
| 1315 | applicant_id = schema.TextLine( |
---|
| 1316 | title = _(u'Application Id'), |
---|
| 1317 | required = False, |
---|
| 1318 | readonly = False, |
---|
| 1319 | ) |
---|
| 1320 | |
---|
| 1321 | #reg_number = TextLineChoice( |
---|
| 1322 | # title = _(u'Kofa Registration Number'), |
---|
| 1323 | # readonly = False, |
---|
| 1324 | # required = True, |
---|
| 1325 | # source = contextual_reg_num_source, |
---|
| 1326 | # ) |
---|
| 1327 | |
---|
| 1328 | application_types = schema.Choice( |
---|
| 1329 | title = _(u'Application Category'), |
---|
| 1330 | vocabulary = application_types_vocab, |
---|
| 1331 | required = True, |
---|
| 1332 | ) |
---|
| 1333 | |
---|
[15994] | 1334 | position_comment = schema.Text( |
---|
| 1335 | title = _(u'Desired Position'), |
---|
| 1336 | required = True, |
---|
| 1337 | description = u'Copy and paste the vacant position ' |
---|
| 1338 | 'text from the <a target="_blank" ' |
---|
| 1339 | 'href="https://aauekpoma.edu.ng/">university website</a>.', |
---|
| 1340 | ) |
---|
| 1341 | |
---|
[15991] | 1342 | firstname = schema.TextLine( |
---|
| 1343 | title = _(u'First Name'), |
---|
| 1344 | required = True, |
---|
| 1345 | ) |
---|
| 1346 | |
---|
| 1347 | middlename = schema.TextLine( |
---|
| 1348 | title = _(u'Middle Name'), |
---|
| 1349 | required = False, |
---|
| 1350 | ) |
---|
| 1351 | |
---|
| 1352 | lastname = schema.TextLine( |
---|
| 1353 | title = _(u'Last Name (Surname)'), |
---|
| 1354 | required = True, |
---|
| 1355 | ) |
---|
| 1356 | |
---|
| 1357 | sex = schema.Choice( |
---|
| 1358 | title = _(u'Gender'), |
---|
| 1359 | source = GenderSource(), |
---|
| 1360 | required = True, |
---|
| 1361 | ) |
---|
| 1362 | |
---|
| 1363 | email = schema.ASCIILine( |
---|
| 1364 | title = _(u'Email Address'), |
---|
| 1365 | required = True, |
---|
| 1366 | constraint=validate_email, |
---|
| 1367 | ) |
---|
| 1368 | |
---|
| 1369 | phone = PhoneNumber( |
---|
| 1370 | title = _(u'Phone'), |
---|
| 1371 | description = u'', |
---|
| 1372 | required = False, |
---|
| 1373 | ) |
---|
| 1374 | |
---|
| 1375 | address = schema.Text( |
---|
| 1376 | title = _(u'Address'), |
---|
| 1377 | required = True, |
---|
| 1378 | ) |
---|
| 1379 | |
---|
[15531] | 1380 | class ISendByEmailRequest(IKofaObject): |
---|
| 1381 | """A applicant asking for sending an email. |
---|
| 1382 | """ |
---|
[15530] | 1383 | |
---|
[15531] | 1384 | suspended = schema.Bool( |
---|
| 1385 | title = _(u'Account suspended'), |
---|
| 1386 | default = False, |
---|
| 1387 | required = False, |
---|
| 1388 | ) |
---|
| 1389 | |
---|
| 1390 | locked = schema.Bool( |
---|
| 1391 | title = _(u'Form locked'), |
---|
| 1392 | default = False, |
---|
| 1393 | required = False, |
---|
| 1394 | ) |
---|
| 1395 | |
---|
| 1396 | applicant_id = schema.TextLine( |
---|
| 1397 | title = _(u'Applicant Id'), |
---|
| 1398 | required = False, |
---|
| 1399 | readonly = False, |
---|
| 1400 | ) |
---|
| 1401 | |
---|
| 1402 | firstname = schema.TextLine( |
---|
| 1403 | title = _(u'First Name'), |
---|
| 1404 | required = True, |
---|
| 1405 | ) |
---|
| 1406 | |
---|
| 1407 | middlename = schema.TextLine( |
---|
| 1408 | title = _(u'Middle Name'), |
---|
| 1409 | required = False, |
---|
| 1410 | ) |
---|
| 1411 | |
---|
| 1412 | lastname = schema.TextLine( |
---|
| 1413 | title = _(u'Last Name (Surname)'), |
---|
| 1414 | required = True, |
---|
| 1415 | ) |
---|
| 1416 | |
---|
[15791] | 1417 | sex = schema.Choice( |
---|
| 1418 | title = _(u'Gender'), |
---|
| 1419 | source = GenderSource(), |
---|
| 1420 | required = True, |
---|
| 1421 | ) |
---|
| 1422 | |
---|
[15531] | 1423 | email = schema.ASCIILine( |
---|
| 1424 | title = _(u"Applicant's Email Address"), |
---|
| 1425 | required = True, |
---|
| 1426 | constraint=validate_email, |
---|
| 1427 | ) |
---|
| 1428 | |
---|
[15861] | 1429 | phone = PhoneNumber( |
---|
| 1430 | title = _(u'Phone'), |
---|
| 1431 | description = u'', |
---|
| 1432 | required = False, |
---|
| 1433 | ) |
---|
| 1434 | |
---|
[15531] | 1435 | body_address = schema.Text( |
---|
| 1436 | title = _(u'Address of Requesting Organization'), |
---|
| 1437 | required = True, |
---|
| 1438 | ) |
---|
| 1439 | |
---|
| 1440 | body_email = schema.ASCIILine( |
---|
| 1441 | title = _(u"Email Address of Requesting Organization"), |
---|
| 1442 | required = True, |
---|
| 1443 | constraint=validate_email, |
---|
| 1444 | ) |
---|
| 1445 | |
---|
[15740] | 1446 | request_type = schema.Choice( |
---|
| 1447 | title = _(u'Request Type'), |
---|
| 1448 | vocabulary = request_types_vocab, |
---|
| 1449 | required = True, |
---|
| 1450 | ) |
---|
| 1451 | |
---|
[15693] | 1452 | document_type = schema.Choice( |
---|
| 1453 | title = _(u'Document Type'), |
---|
| 1454 | vocabulary = document_types_vocab, |
---|
| 1455 | required = True, |
---|
| 1456 | ) |
---|
| 1457 | |
---|
[13544] | 1458 | class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant, |
---|
[15530] | 1459 | ITranscriptApplicant, ICertificateRequest, |
---|
[15951] | 1460 | IVerificationRequest, ISendByEmailRequest, |
---|
[15991] | 1461 | IFedexRequest, IRecruitment): |
---|
[14471] | 1462 | """An interface for all types of applicants. |
---|
[13544] | 1463 | |
---|
[8931] | 1464 | Attention: The ICustomPGApplicant field seetings will be overwritten |
---|
| 1465 | by ICustomPGApplicant field settings. If a field is defined |
---|
[8728] | 1466 | in both interfaces zope.schema validates only against the |
---|
[8931] | 1467 | constraints in ICustomUGApplicant. This does not affect the forms |
---|
| 1468 | since they are build on either ICustomUGApplicant or ICustomPGApplicant. |
---|
[8012] | 1469 | """ |
---|
| 1470 | |
---|
[8746] | 1471 | def writeLogMessage(view, comment): |
---|
[8053] | 1472 | """Adds an INFO message to the log file |
---|
| 1473 | """ |
---|
| 1474 | |
---|
| 1475 | def createStudent(): |
---|
| 1476 | """Create a student object from applicatnt data |
---|
| 1477 | and copy applicant object. |
---|
| 1478 | """ |
---|
| 1479 | |
---|
[10298] | 1480 | class ICustomUGApplicantEdit(ICustomUGApplicant): |
---|
[8728] | 1481 | """An undergraduate applicant interface for edit forms. |
---|
[8012] | 1482 | |
---|
| 1483 | Here we can repeat the fields from base data and set the |
---|
| 1484 | `required` and `readonly` attributes to True to further restrict |
---|
| 1485 | the data access. Or we can allow only certain certificates to be |
---|
| 1486 | selected by choosing the appropriate source. |
---|
| 1487 | |
---|
| 1488 | We cannot omit fields here. This has to be done in the |
---|
| 1489 | respective form page. |
---|
| 1490 | """ |
---|
| 1491 | |
---|
[13977] | 1492 | #programme_type = schema.Choice( |
---|
| 1493 | # title = _(u'Programme Type'), |
---|
| 1494 | # vocabulary = programme_types_vocab, |
---|
| 1495 | # required = True, |
---|
| 1496 | # ) |
---|
[13548] | 1497 | |
---|
[10924] | 1498 | date_of_birth = FormattedDate( |
---|
| 1499 | title = _(u'Date of Birth'), |
---|
| 1500 | required = True, |
---|
| 1501 | show_year = True, |
---|
| 1502 | ) |
---|
| 1503 | |
---|
[15462] | 1504 | course1 = schema.Choice( |
---|
| 1505 | title = _(u'1st Choice Course of Study'), |
---|
| 1506 | source = AppCatCertificateSource(), |
---|
| 1507 | required = True, |
---|
| 1508 | ) |
---|
| 1509 | |
---|
| 1510 | course2 = schema.Choice( |
---|
| 1511 | title = _(u'2nd Choice Course of Study'), |
---|
| 1512 | source = AppCatCertificateSource(), |
---|
| 1513 | required = True, |
---|
| 1514 | ) |
---|
| 1515 | |
---|
| 1516 | course3 = schema.Choice( |
---|
| 1517 | title = _(u'3rd Choice Course of Study'), |
---|
| 1518 | source = AppCatCertificateSource(), |
---|
| 1519 | required = True, |
---|
| 1520 | ) |
---|
| 1521 | |
---|
[14829] | 1522 | fst_sit_fname = schema.TextLine( |
---|
| 1523 | title = _(u'Full Name'), |
---|
| 1524 | required = True, |
---|
| 1525 | readonly = False, |
---|
| 1526 | ) |
---|
| 1527 | |
---|
| 1528 | fst_sit_no = schema.TextLine( |
---|
| 1529 | title = _(u'Exam Number'), |
---|
| 1530 | required = True, |
---|
| 1531 | readonly = False, |
---|
| 1532 | ) |
---|
| 1533 | |
---|
| 1534 | fst_sit_sc_pin = schema.TextLine( |
---|
| 1535 | title = _(u'Scratch Card Pin'), |
---|
| 1536 | required = True, |
---|
| 1537 | readonly = False, |
---|
| 1538 | ) |
---|
| 1539 | |
---|
| 1540 | fst_sit_sc_serial_number = schema.TextLine( |
---|
| 1541 | title = _(u'Scratch Card Serial Number'), |
---|
| 1542 | required = True, |
---|
| 1543 | readonly = False, |
---|
| 1544 | ) |
---|
| 1545 | |
---|
| 1546 | fst_sit_date = FormattedDate( |
---|
| 1547 | title = _(u'Exam Date'), |
---|
| 1548 | required = True, |
---|
| 1549 | readonly = False, |
---|
| 1550 | show_year = True, |
---|
| 1551 | ) |
---|
| 1552 | |
---|
| 1553 | fst_sit_type = schema.Choice( |
---|
| 1554 | title = _(u'Exam Type'), |
---|
| 1555 | required = True, |
---|
| 1556 | readonly = False, |
---|
| 1557 | vocabulary = exam_types, |
---|
| 1558 | ) |
---|
| 1559 | |
---|
[15459] | 1560 | # course1 works only on manage pages. On edit pages course1 input is missing |
---|
| 1561 | # and no Invalid exception is raised. |
---|
| 1562 | # NoInputData: NoInputD...course1' |
---|
| 1563 | # Therefore, we check and compare course1 on CustomApplicantEditFormPage. |
---|
| 1564 | @invariant |
---|
| 1565 | def course_choice(applicant): |
---|
| 1566 | if applicant.course2 == applicant.course3: |
---|
| 1567 | raise Invalid(_("3rd choice course must differ from 2nd choice course.")) |
---|
| 1568 | |
---|
[13977] | 1569 | #ICustomUGApplicantEdit['programme_type'].order = ICustomUGApplicant[ |
---|
| 1570 | # 'programme_type'].order |
---|
[10924] | 1571 | ICustomUGApplicantEdit['date_of_birth'].order = ICustomUGApplicant[ |
---|
| 1572 | 'date_of_birth'].order |
---|
[15462] | 1573 | ICustomUGApplicantEdit['course1'].order = ICustomUGApplicant[ |
---|
| 1574 | 'course1'].order |
---|
| 1575 | ICustomUGApplicantEdit['course2'].order = ICustomUGApplicant[ |
---|
| 1576 | 'course2'].order |
---|
| 1577 | ICustomUGApplicantEdit['course3'].order = ICustomUGApplicant[ |
---|
| 1578 | 'course3'].order |
---|
[14829] | 1579 | ICustomUGApplicantEdit['fst_sit_fname'].order = ICustomUGApplicant[ |
---|
| 1580 | 'fst_sit_fname'].order |
---|
| 1581 | ICustomUGApplicantEdit['fst_sit_no'].order = ICustomUGApplicant[ |
---|
| 1582 | 'fst_sit_no'].order |
---|
| 1583 | ICustomUGApplicantEdit['fst_sit_sc_pin'].order = ICustomUGApplicant[ |
---|
| 1584 | 'fst_sit_sc_pin'].order |
---|
| 1585 | ICustomUGApplicantEdit['fst_sit_sc_serial_number'].order = ICustomUGApplicant[ |
---|
| 1586 | 'fst_sit_sc_serial_number'].order |
---|
| 1587 | ICustomUGApplicantEdit['fst_sit_date'].order = ICustomUGApplicant[ |
---|
| 1588 | 'fst_sit_date'].order |
---|
| 1589 | ICustomUGApplicantEdit['fst_sit_type'].order = ICustomUGApplicant[ |
---|
| 1590 | 'fst_sit_type'].order |
---|
[10924] | 1591 | |
---|
[16756] | 1592 | class ICustomPGApplicantEdit(ICustomPGApplicant): |
---|
[7866] | 1593 | """A postgraduate applicant interface for editing. |
---|
| 1594 | |
---|
| 1595 | Here we can repeat the fields from base data and set the |
---|
| 1596 | `required` and `readonly` attributes to True to further restrict |
---|
| 1597 | the data access. Or we can allow only certain certificates to be |
---|
| 1598 | selected by choosing the appropriate source. |
---|
| 1599 | |
---|
| 1600 | We cannot omit fields here. This has to be done in the |
---|
| 1601 | respective form page. |
---|
[8017] | 1602 | """ |
---|
[8455] | 1603 | |
---|
[16756] | 1604 | email = schema.ASCIILine( |
---|
| 1605 | title = _(u'Email Address'), |
---|
| 1606 | required = True, |
---|
| 1607 | constraint=validate_email, |
---|
| 1608 | ) |
---|
| 1609 | date_of_birth = FormattedDate( |
---|
| 1610 | title = _(u'Date of Birth'), |
---|
| 1611 | required = True, |
---|
| 1612 | show_year = True, |
---|
| 1613 | ) |
---|
| 1614 | |
---|
| 1615 | ICustomPGApplicantEdit[ |
---|
| 1616 | 'date_of_birth'].order = ICustomPGApplicant['date_of_birth'].order |
---|
| 1617 | ICustomPGApplicantEdit[ |
---|
| 1618 | 'email'].order = ICustomPGApplicant['email'].order |
---|
| 1619 | |
---|
[8931] | 1620 | class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment): |
---|
[8247] | 1621 | """An applicant payment via payment gateways. |
---|
| 1622 | |
---|
| 1623 | """ |
---|
[8532] | 1624 | |
---|
[8980] | 1625 | class IPUTMEApplicantEdit(IPUTMEApplicantEdit): |
---|
[8532] | 1626 | """An undergraduate applicant interface for editing. |
---|
| 1627 | |
---|
| 1628 | Here we can repeat the fields from base data and set the |
---|
| 1629 | `required` and `readonly` attributes to True to further restrict |
---|
| 1630 | the data access. Or we can allow only certain certificates to be |
---|
| 1631 | selected by choosing the appropriate source. |
---|
| 1632 | |
---|
| 1633 | We cannot omit fields here. This has to be done in the |
---|
| 1634 | respective form page. |
---|
| 1635 | """ |
---|
| 1636 | |
---|
[14471] | 1637 | class ICustomApplicantUpdateByRegNo(ICustomApplicant): |
---|
[8583] | 1638 | """Representation of an applicant. |
---|
| 1639 | |
---|
| 1640 | Skip regular reg_number validation if reg_number is used for finding |
---|
| 1641 | the applicant object. |
---|
| 1642 | """ |
---|
[8980] | 1643 | |
---|
[14471] | 1644 | reg_number = schema.TextLine( |
---|
| 1645 | title = u'Registration Number', |
---|
| 1646 | required = False, |
---|
| 1647 | ) |
---|
[13544] | 1648 | |
---|
| 1649 | |
---|
[14471] | 1650 | |
---|
| 1651 | |
---|