[IMP]Minor Changes related to terminology for Change Password dialog pop-up
bzr revid: vja@tinyerp.com-20121120072957-rrjlbwkn6tkdmqkc
This commit is contained in:
parent
60b16fb913
commit
3b07266500
|
@ -890,15 +890,15 @@ class Session(openerpweb.Controller):
|
|||
old_password, new_password,confirm_password = operator.itemgetter('old_pwd', 'new_password','confirm_pwd')(
|
||||
dict(map(operator.itemgetter('name', 'value'), fields)))
|
||||
if not (old_password.strip() and new_password.strip() and confirm_password.strip()):
|
||||
return {'error':'All passwords have to be filled.','title': 'Change Password'}
|
||||
if new_password != confirm_password:
|
||||
return {'error': 'The new password and its confirmation must be identical.','title': 'Change Password'}
|
||||
return {'error':'You cannot leave any password empty.','title': 'Change Password'}
|
||||
try:
|
||||
if req.session.model('res.users').change_password(
|
||||
old_password, new_password):
|
||||
return {'new_password':new_password}
|
||||
except Exception:
|
||||
return {'error': 'Original password incorrect, your password was not changed.', 'title': 'Change Password'}
|
||||
return {'error': 'The Old Password you provided is incorrect. Please try again.', 'title': 'Change Password'}
|
||||
if new_password != confirm_password:
|
||||
return {'error': 'The new password and its confirmation must be identical.','title': 'Change Password'}
|
||||
return {'error': 'Error, password not changed !', 'title': 'Change Password'}
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
|
|
|
@ -328,7 +328,7 @@
|
|||
minlength="1"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="oe_form_group_cell oe_form_group_cell_label"><label for="confirm_pwd" class="oe_form_label">Confirm Password:</label></td>
|
||||
<td class="oe_form_group_cell oe_form_group_cell_label"><label for="confirm_pwd" class="oe_form_label">Confirm New Password:</label></td>
|
||||
<td class="oe_form_group_cell"><input type="password" name="confirm_pwd"
|
||||
minlength="1"/></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue