diff --git a/src/sunstone/public/app/tabs/users-tab/panels/info.js b/src/sunstone/public/app/tabs/users-tab/panels/info.js index a629c62808..fe914d9731 100644 --- a/src/sunstone/public/app/tabs/users-tab/panels/info.js +++ b/src/sunstone/public/app/tabs/users-tab/panels/info.js @@ -43,6 +43,7 @@ define(function(require) { var XML_ROOT = "USER"; var PASSWORD_DIALOG_ID = require('tabs/users-tab/dialogs/password/dialogId'); var LOGIN_TOKEN_DIALOG_ID = require('tabs/users-tab/dialogs/login-token/dialogId'); + var CONFIRM_DIALOG_ID = require('utils/dialogs/generic-confirm/dialogId'); /* CONSTRUCTOR @@ -126,7 +127,30 @@ define(function(require) { } }); - // Password button + // View password button + context.off("click", "#view_password"); + context.on("click", "#view_password", function(){ + Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ + header : Locale.tr("Password"), + headerTabId: TAB_ID, + body: '' + + '
'+that.element.PASSWORD+'
', + question : '', + buttons : [ + Locale.tr("Close"), + ], + submit : [ + function(){ + return false; + } + ] + }); + + Sunstone.getDialog(CONFIRM_DIALOG_ID).reset(); + Sunstone.getDialog(CONFIRM_DIALOG_ID).show(); + }); + + // Edit password button context.off("click", "#update_password"); context.on("click", "#update_password", function(){ Sunstone.getDialog(PASSWORD_DIALOG_ID).setParams( diff --git a/src/sunstone/public/app/tabs/users-tab/panels/info/html.hbs b/src/sunstone/public/app/tabs/users-tab/panels/info/html.hbs index f18d25f70c..c338a3cadc 100644 --- a/src/sunstone/public/app/tabs/users-tab/panels/info/html.hbs +++ b/src/sunstone/public/app/tabs/users-tab/panels/info/html.hbs @@ -76,19 +76,23 @@ {{tr "Authentication driver"}} - {{element.AUTH_DRIVER}} - + {{element.AUTH_DRIVER}} - {{#isTabActionEnabled "users-tab" "User.update_password"}} {{tr "Password"}} - + + {{#isTabActionEnabled "users-tab" "User.update_password"}} +
+ +
+ {{/isTabActionEnabled}} + - {{/isTabActionEnabled}} {{#isTabActionEnabled "users-tab" "User.login_token"}} {{tr "Login token"}} @@ -97,6 +101,7 @@ {{tr "Get a login token"}} + {{/isTabActionEnabled}}