From ea5ae4b1cf1aa912ca4b88a7f2dbb59594b28cdb Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 3 May 2012 10:48:23 +0200 Subject: User password widget modified. Currently the user password is shown as follows in the details page: Password: Reset Password This is inconsistent with the rest of the page because the 'Reset Password' is an action, not the value of the password. Now password is shown as follows: Password: ******* (if set) Password: (if not set) Reset password link was removed as well the dialog for reset password was removed from password widget. The dialog was moved to its own object and can be now showed independently. An action for showing this dialog should be created. https://fedorahosted.org/freeipa/ticket/2248 --- install/ui/user.js | 185 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 112 insertions(+), 73 deletions(-) (limited to 'install/ui/user.js') diff --git a/install/ui/user.js b/install/ui/user.js index 65d3de72..61db5315 100644 --- a/install/ui/user.js +++ b/install/ui/user.js @@ -107,7 +107,8 @@ IPA.user.entity = function(spec) { 'uid', { factory: IPA.user_password_widget, - name: 'userpassword' + name: 'has_password', + metadata: IPA.get_entity_param('user', 'userpassword') }, { name: 'krbpasswordexpiration', @@ -430,118 +431,154 @@ IPA.user_adder_dialog = function(spec) { IPA.user_password_widget = function(spec) { spec = spec || {}; + spec.read_only = true; var that = IPA.input_widget(spec); + that.set_value = spec.set_value || '******'; + that.unset_value = spec.unset_value || ''; that.create = function(container) { that.widget_create(container); - $('', { - href: 'jslink', - title: 'userpassword', - text: IPA.messages.password.reset_password, - click: function() { - that.show_dialog(); - return false; - } + that.display_control = $('