Ignore:
Timestamp:
8 Jul 2020, 08:28:52 (4 years ago)
Author:
Henrik Bettermann
Message:

Configure transcript application.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/applicants
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r16144 r16151  
    134134    'date_of_birth',
    135135    'sex',
    136     'nationality',
     136    #'nationality',
    137137    'entry_mode',
    138138    'entry_session',
     
    140140    'course_studied',
    141141    'course_changed',
    142     'change_level',
     142    #'change_level',
    143143    )
    144144
     
    228228                form_fields = form_fields.omit(field)
    229229            form_fields['dispatch_address'].custom_widget = BytesDisplayWidget
    230             form_fields['perm_address'].custom_widget = BytesDisplayWidget
     230            #form_fields['perm_address'].custom_widget = BytesDisplayWidget
    231231            return form_fields
    232232        if self.target is not None and self.target == 'transshort':
     
    235235                form_fields = form_fields.omit(field)
    236236            form_fields['dispatch_address'].custom_widget = BytesDisplayWidget
    237             form_fields['perm_address'].custom_widget = BytesDisplayWidget
     237            #form_fields['perm_address'].custom_widget = BytesDisplayWidget
    238238            return form_fields
    239239        if self.target == 'ictwk':
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py

    r16144 r16151  
    9494        return [item[0] for item in sorted_items]
    9595
     96    def getToken(self, value):
     97        return value
     98
    9699    def getTitle(self, value):
    97100        return u"%s (₦ %s)" % (
    98101            DESTINATION_COST[value][0],
    99102            DESTINATION_COST[value][1])
     103
     104class OrderSource(BasicSourceFactory):
     105    """
     106    """
     107    def getValues(self):
     108        return ['o', 'c']
     109
     110    def getToken(self, value):
     111        return value
     112
     113    def getTitle(self, value):
     114        if value == 'o':
     115            return _('Original')
     116        if value == 'c':
     117            return _('Certified True Copy')
    100118
    101119class IUnibenRegistration(IKofaObject):
     
    248266
    249267    firstname = schema.TextLine(
    250         title = _(u'First Name'),
     268        title = _(u'First Name in School'),
    251269        required = True,
    252270        )
    253271
    254272    middlename = schema.TextLine(
    255         title = _(u'Middle Name'),
     273        title = _(u'Middle Name in School'),
    256274        required = False,
    257275        )
    258276
    259277    lastname = schema.TextLine(
    260         title = _(u'Last Name (Surname)'),
     278        title = _(u'Surname in School'),
    261279        required = True,
    262280        )
     
    275293        )
    276294
    277     nationality = schema.Choice(
    278         vocabulary = nats_vocab,
    279         title = _(u'Nationality'),
    280         required = False,
    281         )
     295    #nationality = schema.Choice(
     296    #    vocabulary = nats_vocab,
     297    #    title = _(u'Nationality'),
     298    #    required = False,
     299    #    )
    282300
    283301    email = schema.ASCIILine(
     
    293311        )
    294312
    295     perm_address = schema.Text(
    296         title = _(u'Current Local Address'),
    297         required = False,
    298         readonly = False,
     313    #perm_address = schema.Text(
     314    #    title = _(u'Current Local Address'),
     315    #    required = False,
     316    #    readonly = False,
     317    #    )
     318
     319    entry_session = schema.Choice(
     320        title = _(u'Academic Session of Entry'),
     321        source = academic_sessions_vocab,
     322        required = False,
     323        readonly = False,
     324        )
     325
     326    end_session = schema.Choice(
     327        title = _(u'Academic Session of Graduation'),
     328        source = academic_sessions_vocab,
     329        required = False,
     330        readonly = False,
     331        )
     332
     333    entry_mode = schema.Choice(
     334        title = _(u'Mode of Entry'),
     335        source = StudyModeSource(),
     336        required = False,
     337        readonly = False,
     338        )
     339
     340    course_studied = schema.Choice(
     341        title = _(u'Course of Study'),
     342        source = CertificateSource(),
     343        required = False,
     344        readonly = False,
     345        )
     346
     347    course_changed = schema.Choice(
     348        title = _(u'Change of Study Course / Transfer'),
     349        description = u'If yes, select previous course of study.',
     350        source = CertificateSource(),
     351        readonly = False,
     352        required = False,
     353        )
     354
     355    #change_level = schema.Choice(
     356    #    title = _(u'Change Level'),
     357    #    description = u'If yes, select level at which you changed course of study.',
     358    #    source = StudyLevelSource(),
     359    #    required = False,
     360    #    readonly = False,
     361    #    )
     362
     363    purpose = schema.TextLine(
     364        title = _(u'Transcript Purpose'),
     365        required = False,
     366        )
     367
     368    order = schema.Choice(
     369        source = OrderSource(),
     370        title = _(u'Type of Order'),
     371        required = False,
    299372        )
    300373
    301374    dispatch_address = schema.Text(
    302         title = _(u'Dispatch Addresses'),
    303         description = u'Addresses to which transcripts should be posted. '
    304                        'Addresses must involve same courier charges.',
     375        title = _(u'Recipient Body'),
     376        description = u'Addresses (including email address and phone number) '
     377                       'to which transcripts should be posted. '
     378                       'All addresses must involve same courier charges.',
    305379        required = False,
    306380        readonly = False,
     
    311385        source = DestinationCostSource(),
    312386        required = True,
    313         )
    314 
    315     entry_mode = schema.Choice(
    316         title = _(u'Entry Mode'),
    317         source = StudyModeSource(),
    318         required = False,
    319         readonly = False,
    320         )
    321 
    322     entry_session = schema.Choice(
    323         title = _(u'Entry Session'),
    324         source = academic_sessions_vocab,
    325         required = False,
    326         readonly = False,
    327         )
    328 
    329     end_session = schema.Choice(
    330         title = _(u'End Session'),
    331         source = academic_sessions_vocab,
    332         required = False,
    333         readonly = False,
    334         )
    335 
    336     course_studied = schema.Choice(
    337         title = _(u'Course of Study / Degree'),
    338         source = CertificateSource(),
    339         required = False,
    340         readonly = False,
    341         )
    342 
    343     course_changed = schema.Choice(
    344         title = _(u'Change of Study Course'),
    345         description = u'If yes, select previous course of study.',
    346         source = CertificateSource(),
    347         readonly = False,
    348         required = False,
    349         )
    350 
    351     change_level = schema.Choice(
    352         title = _(u'Change Level'),
    353         description = u'If yes, select level at which you changed course of study.',
    354         source = StudyLevelSource(),
    355         required = False,
    356         readonly = False,
    357387        )
    358388
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py

    r16078 r16151  
    2727from zope.securitypolicy.interfaces import IPrincipalRoleManager
    2828from zope.component import createObject, getUtility
    29 from waeup.kofa.configuration import SessionConfiguration
    3029from waeup.kofa.interfaces import IUserAccount
    3130from waeup.kofa.browser.tests.test_pdf import samples_dir
     
    296295
    297296    def test_transcript_payment(self):
    298         configuration = SessionConfiguration()
     297        configuration = CustomSessionConfiguration()
    299298        configuration.academic_session = session_1
    300299        self.app['configuration'].addSessionConfiguration(configuration)
     
    302301        applicantscontainer = ApplicantsContainer()
    303302        applicantscontainer.year = session_1
    304         applicantscontainer.application_fee = 200.0
     303        applicantscontainer.application_fee = 1.0 # Must be set but is not used.
    305304        applicantscontainer.code = u'trans1234'
    306         applicantscontainer.prefix = 'trans'
     305        applicantscontainer.prefix = 'transfull'
    307306        applicantscontainer.title = u'This is a trans container'
    308307        applicantscontainer.application_category = 'no'
     
    332331        self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'
    333332        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    334         self.browser.getControl(name="form.nationality").value = ['NG']
    335333        self.browser.getControl(name="form.firstname").value = 'Angela'
    336334        self.browser.getControl(name="form.lastname").value = 'Merkel'
    337335        self.browser.getControl(name="form.sex").value = ['f']
    338         self.browser.getControl(name="form.no_copies").value = ['3']
     336        self.browser.getControl(name="form.no_copies").value = ['2']
    339337        self.browser.getControl(name="form.course_studied").value = ['CERT1']
    340338        self.browser.getControl(name="form.matric_number").value = '234'
    341         self.browser.getControl(name="form.place_of_birth").value = 'Bochum'
    342339        self.browser.getControl(name="form.dispatch_address").value = 'Kuensche'
    343         self.browser.getControl(name="form.perm_address").value = 'Kuensche'
    344340        self.browser.getControl(name="form.entry_mode").value = ['ug_ft']
    345341        self.browser.getControl(name="form.entry_session").value = ['2014']
     
    347343        self.browser.getControl(name="form.phone.country").value = ['+234']
    348344        self.browser.getControl(name="form.phone.ext").value = '5678'
     345        self.browser.getControl(name="form.charge").value = ['nigeria']
    349346        self.browser.getControl("Save").click()
    350347        self.browser.getControl("Add online payment ticket").click()
    351348        self.assertTrue('Payment ticket created' in self.browser.contents)
    352         self.assertTrue('<span>200.0</span>' in self.browser.contents)
    353         self.assertEqual(applicant.values()[0].amount_auth, 200.0)
     349        self.assertTrue('<span>40000.0</span>' in self.browser.contents)
     350        self.assertEqual(applicant.values()[0].amount_auth, 40000.0)
    354351        return
Note: See TracChangeset for help on using the changeset viewer.