From e3d56597cd8aba4eee17a19f326f36bfcb3b90e2 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 29 Oct 2013 16:01:25 +0100 Subject: Fix password expiration notification - was broken by navigation and application controller refactoring https://fedorahosted.org/freeipa/ticket/4003 --- install/ui/src/freeipa/Application_controller.js | 6 ++++-- install/ui/src/freeipa/ipa.js | 4 ++-- install/ui/src/freeipa/user.js | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'install/ui/src') diff --git a/install/ui/src/freeipa/Application_controller.js b/install/ui/src/freeipa/Application_controller.js index 4bde1238c..13c270fca 100644 --- a/install/ui/src/freeipa/Application_controller.js +++ b/install/ui/src/freeipa/Application_controller.js @@ -116,8 +116,10 @@ define([ start_runtime: function() { this.run_time = new Deferred(); - // now we are ready for displaying a facet - // cat match a facet if hash is set + IPA.update_password_expiration(); + + // now we are ready for displaying a facet, + // it can match a facet if hash is set this.router.startup(); // choose default facet if not defined by route diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js index b3017650d..51b4e1d24 100644 --- a/install/ui/src/freeipa/ipa.js +++ b/install/ui/src/freeipa/ipa.js @@ -610,7 +610,7 @@ IPA.update_password_expiration = function() { */ IPA.password_selfservice = function() { var reset_dialog = IPA.user_password_dialog({ - self_service: true, + pkey: IPA.whoami.uid[0], on_success: function() { var command = IPA.get_whoami_command(); var orig_on_success = command.on_success; @@ -620,7 +620,7 @@ IPA.password_selfservice = function() { }; command.execute(); - alert(text.get('@i18n:password.password_change_complete')); + IPA.notify_success(text.get('@i18n:password.password_change_complete')); reset_dialog.close(); } }); diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js index 34c3a7adf..61bdb43b4 100644 --- a/install/ui/src/freeipa/user.js +++ b/install/ui/src/freeipa/user.js @@ -536,7 +536,6 @@ IPA.user_password_dialog = function(spec) { that.success_handler = spec.on_success; that.error_handler = spec.on_error; - that.self_service = spec.self_service; //option to force self-service that.pkey = spec.pkey; that.is_self_service = function() { -- cgit