Ignore:
Timestamp:
14 Sep 2022, 08:18:48 (2 years ago)
Author:
Henrik Bettermann
Message:

Customize transcript application form.

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  
    270270    grok.name('res_stat')
    271271
    272 class TestimonialForm(AdditionalFile):
    273     grok.name('testimonial')       
     272class NotificationRegistrationForm(AdditionalFile):
     273    grok.name('not_reg')     
     274   
     275class OtherDocument1(AdditionalFile):
     276    grok.name('doc_1')
     277
     278class OtherDocument2(AdditionalFile):
     279    grok.name('doc_2')   
     280
     281class OtherDocument3(AdditionalFile):
     282    grok.name('doc_3')           
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/interfaces.py

    r17053 r17095  
    2020"""
    2121
     22from datetime import datetime
    2223from zope import schema
    2324from zope.interface import invariant, Invalid
     
    3233from waeup.kofa.interfaces import (
    3334    SimpleKofaVocabulary, academic_sessions_vocab, validate_email,
    34     IKofaObject)
     35    IKofaObject, MonthSource)
    3536from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber
    3637from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    3738from waeup.kofa.applicants.interfaces import (
    3839    contextual_reg_num_source,
     40    year_range,
    3941    IApplicantBaseData)
    4042from kofacustom.nigeria.applicants.interfaces import (
     
    5355from kofacustom.edocons.interfaces import MessageFactory as _
    5456from kofacustom.edocons.payments.interfaces import ICustomOnlinePayment
     57
     58def entry_year_range():
     59    curr_year = datetime.now().year
     60    return range(curr_year - 25, curr_year)
    5561
    5662programme_types_vocab = SimpleKofaVocabulary(
     
    103109    def getTitle(self, value):
    104110        if value == 'o':
    105             return _('Original')
     111            return _('Student Transcript')
    106112        if value == 'c':
    107             return _('Certified True Copy')
     113            return _('Certified Transcript')
    108114
    109115class TranscriptCertificateSource(CertificateSource):
     
    475481        )
    476482
    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,
    489507        )
    490508
    491509    entry_mode = schema.Choice(
    492         title = _(u'Mode of Entry'),
     510        title = _(u'Course of Study'),
    493511        source = StudyModeSource(),
    494512        required = False,
     
    496514        )
    497515
    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    #    )
    505523
    506524    #course_changed = schema.Choice(
     
    532550
    533551    dispatch_address = schema.Text(
    534         title = _(u'Recipient Body'),
     552        title = _(u'Recipient Address'),
    535553        description = u'Addresses (including email address and phone number) '
    536554                       'to which transcripts should be posted. '
     
    568586        )
    569587
    570     proc_date = FormattedDate(
    571         title = _(u'Processing Date'),
    572         required = False,
    573         #date_format = u'%d/%m/%Y', # Use grok-instance-wide default
    574         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    #    )
    576594
    577595    @invariant
    578596    def type_of_order(applicant):
    579597        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'."))
    581599        if applicant.order == 'o' and applicant.charge.startswith('cert_'):
    582600            raise Invalid(_("You've selected the wrong transcript charge."))
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/utils.py

    r17043 r17095  
    3434    ADDITIONAL_FILES = (
    3535                 ('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'),
    3740                 )
    3841
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/utils.py

    r17075 r17095  
    3030    # prefix
    3131    STUDENT_ID_PREFIX = u'N'
     32
     33    # Maximum size of upload files in kB
     34    MAX_KB = 500
    3235   
    3336    SKIP_UPLOAD_VIEWLETS = (
Note: See TracChangeset for help on using the changeset viewer.