summaryrefslogtreecommitdiffstats
path: root/install/ui/ipa.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-10-25 13:42:18 +0200
committerPetr Vobornik <pvoborni@redhat.com>2013-01-07 10:53:58 +0100
commite433379c469ab8dba80cb76f906d794e4f61b132 (patch)
tree54edbc10bf9400744a802c02fa8f8504f8179053 /install/ui/ipa.js
parent3df18f5583ff96d505fe9249949bd4493df68172 (diff)
downloadfreeipa.git-e433379c469ab8dba80cb76f906d794e4f61b132.tar.gz
freeipa.git-e433379c469ab8dba80cb76f906d794e4f61b132.tar.xz
freeipa.git-e433379c469ab8dba80cb76f906d794e4f61b132.zip
Standardize login password reset, user reset password and host set OTP dialogs
In all dialogs: * validation notification was standardized * can be confirmed by enter User pwd dialog has fixed focus of first element. https://fedorahosted.org/freeipa/ticket/2884 https://fedorahosted.org/freeipa/ticket/3200 Standartize password reset dialog
Diffstat (limited to 'install/ui/ipa.js')
-rw-r--r--install/ui/ipa.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index fa26a2ad..cc62f089 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -1672,7 +1672,10 @@ IPA.unauthorized_dialog = function(spec) {
name: 'verify_password',
type: 'password',
required: true,
- label: IPA.get_message('password.verify_password', "Verify Password")
+ label: IPA.get_message('password.verify_password', "Verify Password"),
+ validators: [IPA.same_password_validator({
+ other_field: 'new_password'
+ })]
}
]
}
@@ -1946,24 +1949,12 @@ IPA.unauthorized_dialog = function(spec) {
var new_password = that.new_password_widget.save();
var verify_password = that.verify_password_widget.save();
- if (new_password[0] !== verify_password[0]) {
- var message = IPA.get_message('password.password_must_match',
- "Passwords must match");
- that.reset_error_box.html(message);
- that.reset_error_box.css('display', 'block');
- return;
- } else {
- that.reset_error_box.css('display', 'none');
- }
-
- IPA.display_activity_icon();
+ that.reset_error_box.css('display', 'none');
var result = IPA.reset_password(username[0],
password[0],
new_password[0]);
- IPA.hide_activity_icon();
-
if (result.status === 'ok') {
that.on_reset_success();
} else {