- Timestamp:
- 14 Jul 2020, 14:19:29 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/interfaces.py
r16147 r16165 21 21 22 22 from zope import schema 23 from zope.component import getUtility 24 from zope.catalog.interfaces import ICatalog 23 25 from zc.sourcefactory.basic import BasicSourceFactory 24 26 from waeup.kofa.applicants.interfaces import ( … … 111 113 DESTINATION_COST[value][1]) 112 114 115 class TranscriptCertificateSource(CertificateSource): 116 """Include Department and Faculty in Title. 117 """ 118 def getValues(self, context): 119 catalog = getUtility(ICatalog, name='certificates_catalog') 120 resultset = catalog.searchResults(code=(None, None)) 121 resultlist = sorted(resultset, key=lambda 122 value: value.__parent__.__parent__.__parent__.code + 123 value.__parent__.__parent__.code + 124 value.code) 125 return resultlist 126 127 def getTitle(self, context, value): 128 """ 129 """ 130 try: title = "%s / %s / %s (%s)" % ( 131 value.__parent__.__parent__.__parent__.title, 132 value.__parent__.__parent__.title, 133 value.title, value.code) 134 except AttributeError: 135 title = "NA / %s (%s)" % (value.title, value.code) 136 return title 137 113 138 class ICustomUGApplicant(IApplicantBaseData): 114 139 """An undergraduate applicant. … … 415 440 ) 416 441 417 #student_id = schema.TextLine(418 # title = _(u'Kofa Student Id'),419 # required = False,420 # readonly = False,421 # )422 423 #reg_number = schema.TextLine(424 # title = _(u'Registration Number'),425 # readonly = False,426 # required = False,427 # )428 429 442 matric_number = schema.TextLine( 430 443 title = _(u'Matriculation Number'), … … 448 461 ) 449 462 450 date_of_birth = FormattedDate(451 title = _(u'Date of Birth'),452 required = False,453 #date_format = u'%d/%m/%Y', # Use grok-instance-wide default454 show_year = True,455 )463 #date_of_birth = FormattedDate( 464 # title = _(u'Date of Birth'), 465 # required = False, 466 # #date_format = u'%d/%m/%Y', # Use grok-instance-wide default 467 # show_year = True, 468 # ) 456 469 457 470 sex = schema.Choice( … … 461 474 ) 462 475 463 nationality = schema.Choice(464 vocabulary = nats_vocab,465 title = _(u'Nationality'),466 required = False,467 )476 #nationality = schema.Choice( 477 # vocabulary = nats_vocab, 478 # title = _(u'Nationality'), 479 # required = False, 480 # ) 468 481 469 482 email = schema.ASCIILine( … … 473 486 ) 474 487 475 phone = PhoneNumber(476 title = _(u'Phone'),477 description = u'',478 required = False,479 )480 481 perm_address = schema.Text(482 title = _(u'Current Local Address'),483 required = False,484 readonly = False,485 )488 #phone = PhoneNumber( 489 # title = _(u'Phone'), 490 # description = u'', 491 # required = False, 492 # ) 493 494 #perm_address = schema.Text( 495 # title = _(u'Current Local Address'), 496 # required = False, 497 # readonly = False, 498 # ) 486 499 487 500 dispatch_address = schema.Text( … … 499 512 ) 500 513 501 entry_mode = schema.Choice( 502 title = _(u'Entry Mode'), 503 source = StudyModeSource(), 504 required = False, 505 readonly = False, 506 ) 507 508 entry_session = schema.Choice( 509 title = _(u'Entry Session'), 514 #entry_mode = schema.Choice( 515 # title = _(u'Entry Mode'), 516 # source = StudyModeSource(), 517 # required = False, 518 # readonly = False, 519 # ) 520 521 #entry_session = schema.Choice( 522 # title = _(u'Entry Session'), 523 # source = academic_sessions_vocab, 524 # required = False, 525 # readonly = False, 526 # ) 527 528 end_session = schema.Choice( 529 title = _(u'Academic Session of Graduation'), 510 530 source = academic_sessions_vocab, 511 531 required = False, … … 513 533 ) 514 534 515 end_session = schema.Choice(516 title = _(u'End Session'),517 source = academic_sessions_vocab,518 required = False,519 readonly = False,520 )521 522 535 course_studied = schema.Choice( 523 title = _(u'Course of Study / Degree'), 524 source = CertificateSource(), 525 required = False, 526 readonly = False, 527 ) 528 529 course_changed = schema.Choice( 530 title = _(u'Change of Study Course'), 531 description = u'If yes, select previous course of study.', 532 source = CertificateSource(), 533 readonly = False, 534 required = False, 535 ) 536 537 change_level = schema.Choice( 538 title = _(u'Change Level'), 539 description = u'If yes, select level at which you changed course of study.', 540 source = StudyLevelSource(), 541 required = False, 542 readonly = False, 543 ) 536 title = _(u'Course of Study'), 537 source = TranscriptCertificateSource(), 538 description = u'Faculty / Department / Course', 539 required = False, 540 readonly = False, 541 ) 542 543 #course_changed = schema.Choice( 544 # title = _(u'Change of Study Course'), 545 # description = u'If yes, select previous course of study.', 546 # source = CertificateSource(), 547 # readonly = False, 548 # required = False, 549 # ) 550 551 #change_level = schema.Choice( 552 # title = _(u'Change Level'), 553 # description = u'If yes, select level at which you changed course of study.', 554 # source = StudyLevelSource(), 555 # required = False, 556 # readonly = False, 557 # ) 544 558 545 559 no_copies = schema.Choice(
Note: See TracChangeset for help on using the changeset viewer.