Changeset 2676


Ignore:
Timestamp:
16 Nov 2007, 11:17:54 (17 years ago)
Author:
Henrik Bettermann
Message:

beautify names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/clearance_edit.py

    r2673 r2676  
    8282            wftool.doActionFor(info['per'],'open')
    8383        per_doc = info['per'].getContent()
    84         per_doc.edit(mapping = {'firstname': clear_doc.firstname, 'middlename': clear_doc.middlename, 'lastname': clear_doc.lastname,})
     84        firstname = clear_doc.firstname.replace('-',' - ')
     85        firstname = ' '.join([m.capitalize() for m in firstname.split()])
     86        firstname = firstname.replace(' - ','-')   
     87        middlename = clear_doc.middlename.replace('-',' - ')
     88        middlename = ' '.join([m.capitalize() for m in middlename.split()])
     89        middlename = middlename.replace(' - ','-')       
     90        lastname = clear_doc.lastname.replace('-',' - ')
     91        lastname = ' '.join([m.capitalize() for m in lastname.split()])
     92        lastname = lastname.replace(' - ','-')   
     93        per_doc.edit(mapping = {'firstname': firstname, 'middlename': middlename, 'lastname': lastname,})
    8594
    8695    psm = "Clearance and eligibility record is validated and student is cleared!"
Note: See TracChangeset for help on using the changeset viewer.