diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 7ceda5703..01201f69e 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -425,6 +425,7 @@ "current_password": "Current Password", "current_password_required": "Current password is required", "new_password": "New Password", + "new_password_required": "New password is required", "password_change_complete": "Password change complete", "password_must_match": "Passwords must match", "reset_password": "Reset Password", diff --git a/install/ui/user.js b/install/ui/user.js index 65d3de726..61db5315e 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 = $('