Changeset 7356 for main/waeup.sirp/trunk/src
- Timestamp:
- 16 Dec 2011, 06:38:11 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicant.py
r7355 r7356 71 71 @property 72 72 def fullname(self): 73 # We do not necessarily have the middlename sattribute74 middlename s = getattr(self, 'middlenames', None)75 if middlename s:73 # We do not necessarily have the middlename attribute 74 middlename = getattr(self, 'middlename', None) 75 if middlename: 76 76 return '%s %s %s' % (self.firstname, 77 middlename s, self.lastname)77 middlename, self.lastname) 78 78 else: 79 79 return '%s %s' % (self.firstname, self.lastname) … … 102 102 # Fire transition 'create' 103 103 IWorkflowInfo(self).fireTransition('create') 104 105 # TODO: Split fullname in students package and copy first,106 # middle and lastname107 108 104 # Copy some base data 109 student.fullname = self.fullname 105 student.firstname = self.firstname 106 student.lastname = self.lastname 110 107 student.sex = self.sex 111 108 student.date_of_birth = self.date_of_birth -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7351 r7356 413 413 #grok.template('applicantaddpage') 414 414 form_fields = grok.AutoFields(IApplicant).select( 415 'firstname', 'middlename s', 'lastname',415 'firstname', 'middlename', 'lastname', 416 416 'email', 'phone') 417 417 title = 'Applicants' -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r7351 r7356 309 309 required = True, 310 310 ) 311 middlename s= schema.TextLine(312 title = u'Middle Name s',311 middlename = schema.TextLine( 312 title = u'Middle Name', 313 313 required = False, 314 314 ) -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r7348 r7356 289 289 self.assertEqual(self.browser.url, self.add_applicant_path) 290 290 self.browser.getControl(name="form.firstname").value = 'Alois' 291 self.browser.getControl(name="form.middlename s").value = 'Kofi'291 self.browser.getControl(name="form.middlename").value = 'Kofi' 292 292 self.browser.getControl(name="form.lastname").value = 'Bettermann' 293 293 self.browser.getControl(name="form.email").value = 'xx@yy.zz'
Note: See TracChangeset for help on using the changeset viewer.