Changeset 37c15c4
- Timestamp:
- Mar 20, 2010, 5:54:38 AM (15 years ago)
- Branches:
- master, client
- Children:
- 86817cf, c1d9650
- Parents:
- c020a3b
- git-author:
- Alex Dehnert <adehnert@…> (03/20/10 05:54:38)
- git-committer:
- Alex Dehnert <adehnert@…> (03/20/10 05:54:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
remit/vouchers/views.py
re8550be r37c15c4 101 101 new_request.budget_term = term_obj 102 102 103 # Prefill from certs103 # Prefill from user information (itself prefilled from LDAP now) 104 104 initial = {} 105 try: 106 name = http_request.META['SSL_CLIENT_S_DN_CN'] 107 names = name.split(' ') 108 initial['check_to_first_name'] = names[0] 109 initial['check_to_last_name'] = names[-1] 110 except KeyError: 111 pass 112 try: 113 initial['check_to_email'] = http_request.META['SSL_CLIENT_S_DN_Email'] 114 except KeyError: 115 pass 105 initial['check_to_first_name'] = http_request.user.first_name 106 initial['check_to_last_name'] = http_request.user.last_name 107 initial['check_to_email'] = http_request.user.email 116 108 117 109 if http_request.method == 'POST': # If the form has been submitted... … … 195 187 # Prefill from certs / config 196 188 initial = {} 197 try: 198 name = http_request.META['SSL_CLIENT_S_DN_CN'] 199 initial['name'] = name 200 except KeyError: 201 pass 189 initial['name'] = '%s %s' % (http_request.user.first_name, http_request.user.last_name, ) 202 190 if settings.SIGNATORY_EMAIL: 203 191 initial['email'] = settings.SIGNATORY_EMAIL 204 192 else: 205 try: 206 initial['email'] = http_request.META['SSL_CLIENT_S_DN_Email'] 207 except KeyError: 208 pass 193 initial['email'] = http_request.user.email 209 194 210 195 approve_message = ''
Note: See TracChangeset
for help on using the changeset viewer.