summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/ipa.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-05-22 16:20:02 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-26 12:37:39 +0200
commit870db2f677dff01750aeec104c90fce3ca0e54be (patch)
tree024f578dd8f3a7c5b26e9c7ecf6b9d82339a272a /install/ui/src/freeipa/ipa.js
parente3de46767683c5050377cc5e683cd6e3d28ea4e9 (diff)
downloadfreeipa-870db2f677dff01750aeec104c90fce3ca0e54be.tar.gz
freeipa-870db2f677dff01750aeec104c90fce3ca0e54be.tar.xz
freeipa-870db2f677dff01750aeec104c90fce3ca0e54be.zip
webui: rebase user password dialog on password dialog and add otp support
https://fedorahosted.org/freeipa/ticket/4262 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/ipa.js')
-rw-r--r--install/ui/src/freeipa/ipa.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js
index 66d92b6e0..be671d8f4 100644
--- a/install/ui/src/freeipa/ipa.js
+++ b/install/ui/src/freeipa/ipa.js
@@ -619,20 +619,20 @@ IPA.update_password_expiration = function() {
* @member IPA
*/
IPA.password_selfservice = function() {
- var reset_dialog = IPA.user_password_dialog({
- pkey: IPA.whoami.uid[0],
- on_success: function() {
- var command = IPA.get_whoami_command();
- var orig_on_success = command.on_success;
- command.on_success = function(data, text_status, xhr) {
- orig_on_success.call(this, data, text_status, xhr);
- IPA.update_password_expiration();
- };
- command.execute();
-
- IPA.notify_success(text.get('@i18n:password.password_change_complete'));
- reset_dialog.close();
- }
+ var reset_dialog = builder.build('dialog', {
+ $type: 'user_password',
+ args: [IPA.whoami.uid[0]]
+ });
+ reset_dialog.succeeded.attach(function() {
+ var command = IPA.get_whoami_command();
+ var orig_on_success = command.on_success;
+ command.on_success = function(data, text_status, xhr) {
+ orig_on_success.call(this, data, text_status, xhr);
+ IPA.update_password_expiration();
+ };
+ command.execute();
+
+ IPA.notify_success(text.get('@i18n:password.password_change_complete'));
});
reset_dialog.open();
};