comparison rhodecode/controllers/login.py @ 4095:b59568e929ef

fixed password refill in login form when wrong password was given It's better to not refill the passwords on wrong credentials given. Standard behaviour on all pages are making the password blank
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 22 Jul 2013 16:01:07 +0200
parents 3b136af34329
children 360f31856657 ffd45b185016
comparison
equal deleted inserted replaced
4094:8f66758252f8 4095:b59568e929ef
113 raise HTTPFound(location=c.came_from, headers=headers) 113 raise HTTPFound(location=c.came_from, headers=headers)
114 else: 114 else:
115 raise HTTPFound(location=url('home'), headers=headers) 115 raise HTTPFound(location=url('home'), headers=headers)
116 116
117 except formencode.Invalid, errors: 117 except formencode.Invalid, errors:
118 defaults = errors.value
119 # remove password from filling in form again
120 del defaults['password']
118 return htmlfill.render( 121 return htmlfill.render(
119 render('/login.html'), 122 render('/login.html'),
120 defaults=errors.value, 123 defaults=errors.value,
121 errors=errors.error_dict or {}, 124 errors=errors.error_dict or {},
122 prefix_error=False, 125 prefix_error=False,