Changeset 17095 for main/kofacustom.edocons
- Timestamp:
- 14 Sep 2022, 08:18:48 (2 years ago)
- Location:
- main/kofacustom.edocons/trunk/src/kofacustom/edocons
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/browser.py
r17043 r17095 270 270 grok.name('res_stat') 271 271 272 class TestimonialForm(AdditionalFile): 273 grok.name('testimonial') 272 class NotificationRegistrationForm(AdditionalFile): 273 grok.name('not_reg') 274 275 class OtherDocument1(AdditionalFile): 276 grok.name('doc_1') 277 278 class OtherDocument2(AdditionalFile): 279 grok.name('doc_2') 280 281 class OtherDocument3(AdditionalFile): 282 grok.name('doc_3') -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/interfaces.py
r17053 r17095 20 20 """ 21 21 22 from datetime import datetime 22 23 from zope import schema 23 24 from zope.interface import invariant, Invalid … … 32 33 from waeup.kofa.interfaces import ( 33 34 SimpleKofaVocabulary, academic_sessions_vocab, validate_email, 34 IKofaObject )35 IKofaObject, MonthSource) 35 36 from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber 36 37 from waeup.kofa.students.vocabularies import nats_vocab, GenderSource 37 38 from waeup.kofa.applicants.interfaces import ( 38 39 contextual_reg_num_source, 40 year_range, 39 41 IApplicantBaseData) 40 42 from kofacustom.nigeria.applicants.interfaces import ( … … 53 55 from kofacustom.edocons.interfaces import MessageFactory as _ 54 56 from kofacustom.edocons.payments.interfaces import ICustomOnlinePayment 57 58 def entry_year_range(): 59 curr_year = datetime.now().year 60 return range(curr_year - 25, curr_year) 55 61 56 62 programme_types_vocab = SimpleKofaVocabulary( … … 103 109 def getTitle(self, value): 104 110 if value == 'o': 105 return _(' Original')111 return _('Student Transcript') 106 112 if value == 'c': 107 return _('Certified Tr ue Copy')113 return _('Certified Transcript') 108 114 109 115 class TranscriptCertificateSource(CertificateSource): … … 475 481 ) 476 482 477 entry_session = schema.Choice( 478 title = _(u'Academic Session of Entry'), 479 source = academic_sessions_vocab, 480 required = False, 481 readonly = False, 482 ) 483 484 end_session = schema.Choice( 485 title = _(u'Academic Session of Graduation'), 486 source = academic_sessions_vocab, 487 required = False, 488 readonly = False, 483 entry_year = schema.Choice( 484 title = _(u'Year of Entrance'), 485 required = False, 486 values = entry_year_range(), 487 readonly = False, 488 ) 489 490 entry_month = schema.Choice( 491 title = _(u'Month of Entry'), 492 source = MonthSource(), 493 required = False, 494 ) 495 496 end_year = schema.Choice( 497 title = _(u'Year of Graduation'), 498 required = False, 499 values = entry_year_range(), 500 readonly = False, 501 ) 502 503 end_month = schema.Choice( 504 title = _(u'Month of Graduation'), 505 source = MonthSource(), 506 required = False, 489 507 ) 490 508 491 509 entry_mode = schema.Choice( 492 title = _(u' Mode of Entry'),510 title = _(u'Course of Study'), 493 511 source = StudyModeSource(), 494 512 required = False, … … 496 514 ) 497 515 498 course_studied = schema.Choice(499 title = _(u'Course of Study'),500 source = TranscriptCertificateSource(),501 description = u'Faculty / Department / Course',502 required = True,503 readonly = False,504 )516 #course_studied = schema.Choice( 517 # title = _(u'Course of Study'), 518 # source = TranscriptCertificateSource(), 519 # description = u'Faculty / Department / Course', 520 # required = True, 521 # readonly = False, 522 # ) 505 523 506 524 #course_changed = schema.Choice( … … 532 550 533 551 dispatch_address = schema.Text( 534 title = _(u'Recipient Body'),552 title = _(u'Recipient Address'), 535 553 description = u'Addresses (including email address and phone number) ' 536 554 'to which transcripts should be posted. ' … … 568 586 ) 569 587 570 proc_date = FormattedDate(571 title = _(u'Processing Date'),572 required = False,573 #date_format = u'%d/%m/%Y', # Use grok-instance-wide default574 show_year = True,575 )588 #proc_date = FormattedDate( 589 # title = _(u'Processing Date'), 590 # required = False, 591 # #date_format = u'%d/%m/%Y', # Use grok-instance-wide default 592 # show_year = True, 593 # ) 576 594 577 595 @invariant 578 596 def type_of_order(applicant): 579 597 if not applicant.collected and applicant.order != 'o': 580 raise Invalid(_("If you haven't collected transcript before, type of order must be ' original'."))598 raise Invalid(_("If you haven't collected transcript before, type of order must be 'Student Transcript'.")) 581 599 if applicant.order == 'o' and applicant.charge.startswith('cert_'): 582 600 raise Invalid(_("You've selected the wrong transcript charge.")) -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/utils.py
r17043 r17095 34 34 ADDITIONAL_FILES = ( 35 35 ('Testimonial','testimonial'), 36 ('Statement of Result','res_stat'), 36 ('Notification of Registration (optional)','not_reg'), 37 ('Document 1','doc_1'), 38 ('Document 2','doc_2'), 39 ('Document 3','doc_3'), 37 40 ) 38 41 -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/utils.py
r17075 r17095 30 30 # prefix 31 31 STUDENT_ID_PREFIX = u'N' 32 33 # Maximum size of upload files in kB 34 MAX_KB = 500 32 35 33 36 SKIP_UPLOAD_VIEWLETS = (
Note: See TracChangeset for help on using the changeset viewer.