Changeset 16151 for main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Timestamp:
- 8 Jul 2020, 08:28:52 (4 years ago)
- 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 134 134 'date_of_birth', 135 135 'sex', 136 'nationality',136 #'nationality', 137 137 'entry_mode', 138 138 'entry_session', … … 140 140 'course_studied', 141 141 'course_changed', 142 'change_level',142 #'change_level', 143 143 ) 144 144 … … 228 228 form_fields = form_fields.omit(field) 229 229 form_fields['dispatch_address'].custom_widget = BytesDisplayWidget 230 form_fields['perm_address'].custom_widget = BytesDisplayWidget230 #form_fields['perm_address'].custom_widget = BytesDisplayWidget 231 231 return form_fields 232 232 if self.target is not None and self.target == 'transshort': … … 235 235 form_fields = form_fields.omit(field) 236 236 form_fields['dispatch_address'].custom_widget = BytesDisplayWidget 237 form_fields['perm_address'].custom_widget = BytesDisplayWidget237 #form_fields['perm_address'].custom_widget = BytesDisplayWidget 238 238 return form_fields 239 239 if self.target == 'ictwk': -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r16144 r16151 94 94 return [item[0] for item in sorted_items] 95 95 96 def getToken(self, value): 97 return value 98 96 99 def getTitle(self, value): 97 100 return u"%s (₦ %s)" % ( 98 101 DESTINATION_COST[value][0], 99 102 DESTINATION_COST[value][1]) 103 104 class 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') 100 118 101 119 class IUnibenRegistration(IKofaObject): … … 248 266 249 267 firstname = schema.TextLine( 250 title = _(u'First Name '),268 title = _(u'First Name in School'), 251 269 required = True, 252 270 ) 253 271 254 272 middlename = schema.TextLine( 255 title = _(u'Middle Name '),273 title = _(u'Middle Name in School'), 256 274 required = False, 257 275 ) 258 276 259 277 lastname = schema.TextLine( 260 title = _(u' Last Name (Surname)'),278 title = _(u'Surname in School'), 261 279 required = True, 262 280 ) … … 275 293 ) 276 294 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 # ) 282 300 283 301 email = schema.ASCIILine( … … 293 311 ) 294 312 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, 299 372 ) 300 373 301 374 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.', 305 379 required = False, 306 380 readonly = False, … … 311 385 source = DestinationCostSource(), 312 386 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,357 387 ) 358 388 -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py
r16078 r16151 27 27 from zope.securitypolicy.interfaces import IPrincipalRoleManager 28 28 from zope.component import createObject, getUtility 29 from waeup.kofa.configuration import SessionConfiguration30 29 from waeup.kofa.interfaces import IUserAccount 31 30 from waeup.kofa.browser.tests.test_pdf import samples_dir … … 296 295 297 296 def test_transcript_payment(self): 298 configuration = SessionConfiguration()297 configuration = CustomSessionConfiguration() 299 298 configuration.academic_session = session_1 300 299 self.app['configuration'].addSessionConfiguration(configuration) … … 302 301 applicantscontainer = ApplicantsContainer() 303 302 applicantscontainer.year = session_1 304 applicantscontainer.application_fee = 200.0303 applicantscontainer.application_fee = 1.0 # Must be set but is not used. 305 304 applicantscontainer.code = u'trans1234' 306 applicantscontainer.prefix = 'trans '305 applicantscontainer.prefix = 'transfull' 307 306 applicantscontainer.title = u'This is a trans container' 308 307 applicantscontainer.application_category = 'no' … … 332 331 self.browser.getControl(name="form.date_of_birth").value = '09/09/1988' 333 332 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 334 self.browser.getControl(name="form.nationality").value = ['NG']335 333 self.browser.getControl(name="form.firstname").value = 'Angela' 336 334 self.browser.getControl(name="form.lastname").value = 'Merkel' 337 335 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'] 339 337 self.browser.getControl(name="form.course_studied").value = ['CERT1'] 340 338 self.browser.getControl(name="form.matric_number").value = '234' 341 self.browser.getControl(name="form.place_of_birth").value = 'Bochum'342 339 self.browser.getControl(name="form.dispatch_address").value = 'Kuensche' 343 self.browser.getControl(name="form.perm_address").value = 'Kuensche'344 340 self.browser.getControl(name="form.entry_mode").value = ['ug_ft'] 345 341 self.browser.getControl(name="form.entry_session").value = ['2014'] … … 347 343 self.browser.getControl(name="form.phone.country").value = ['+234'] 348 344 self.browser.getControl(name="form.phone.ext").value = '5678' 345 self.browser.getControl(name="form.charge").value = ['nigeria'] 349 346 self.browser.getControl("Save").click() 350 347 self.browser.getControl("Add online payment ticket").click() 351 348 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) 354 351 return
Note: See TracChangeset for help on using the changeset viewer.