diff options
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/host.js | 255 | ||||
-rwxr-xr-x | install/ui/test/bin/update_ipa_init.sh | 11 | ||||
-rw-r--r-- | install/ui/test/data/ipa_init.json | 180 | ||||
-rw-r--r-- | install/ui/user.js | 14 |
4 files changed, 321 insertions, 139 deletions
diff --git a/install/ui/host.js b/install/ui/host.js index 5a786b016..52a0e8f92 100644 --- a/install/ui/host.js +++ b/install/ui/host.js @@ -56,9 +56,14 @@ IPA.entity_factories.host = function () { name:'enrollment', fields:[ { - factory: IPA.host_provisioning_status_widget, - 'name': 'provisioning_status', - label: IPA.messages.objects.host.status + factory: IPA.host_keytab_widget, + 'name': 'has_keytab', + label: IPA.messages.objects.host.keytab + }, + { + factory: IPA.host_password_widget, + 'name': 'has_password', + label: IPA.messages.objects.host.password } ] }, @@ -409,7 +414,7 @@ IPA.force_host_add_checkbox_widget = function(spec) { return IPA.checkbox_widget(spec); }; -IPA.host_provisioning_status_widget = function(spec) { +IPA.host_keytab_widget = function(spec) { spec = spec || {}; @@ -419,98 +424,44 @@ IPA.host_provisioning_status_widget = function(spec) { that.widget_create(container); - var div = $('<div/>', { - name: 'kerberos-key-valid', + that.missing_span = $('<span/>', { + name: 'missing', style: 'display: none;' }).appendTo(container); $('<img/>', { - src: 'check.png', - style: 'float: left;', + src: 'caution.png', 'class': 'status-icon' - }).appendTo(div); - - var content_div = $('<div/>', { - style: 'float: left;' - }).appendTo(div); - - content_div.append('<b>'+IPA.messages.objects.host.valid+':</b>'); + }).appendTo(that.missing_span); - content_div.append(' '); + that.missing_span.append(' '); - $('<input/>', { - 'type': 'button', - 'name': 'unprovision', - 'value': IPA.messages.objects.host.delete_key_unprovision - }).appendTo(content_div); + that.missing_span.append(IPA.messages.objects.host.keytab_missing); - div = $('<div/>', { - name: 'kerberos-key-missing', + that.present_span = $('<span/>', { + name: 'present', style: 'display: none;' }).appendTo(container); $('<img/>', { - src: 'caution.png', - style: 'float: left;', + src: 'check.png', 'class': 'status-icon' - }).appendTo(div); - - content_div = $('<div/>', { - style: 'float: left;' - }).appendTo(div); - - content_div.append('<b>'+IPA.messages.objects.host.missing+'</b>'); - - content_div.append('<br/>'); - - content_div.append(IPA.messages.objects.host.enroll_otp+':'); + }).appendTo(that.present_span); - content_div.append('<br/>'); - content_div.append('<br/>'); + that.present_span.append(' '); - $('<input/>', { - 'type': 'text', - 'name': 'otp', - 'class': 'otp' - }).appendTo(content_div); + that.present_span.append(IPA.messages.objects.host.keytab_present); - content_div.append(' '); + that.present_span.append(': '); - $('<input/>', { - 'type': 'button', - 'name': 'enroll', - 'value': IPA.messages.objects.host.set_otp - }).appendTo(content_div); - - that.status_valid = $('div[name=kerberos-key-valid]', that.container); - that.status_missing = $('div[name=kerberos-key-missing]', - that.container); - - var button = $('input[name=unprovision]', that.container); - that.unprovision_button = IPA.button({ + IPA.button({ name: 'unprovision', label: IPA.messages.objects.host.delete_key_unprovision, click: function() { that.show_unprovision_dialog(); return false; } - }); - button.replaceWith(that.unprovision_button); - - that.otp_input = $('input[name=otp]', that.container); - - that.enroll_button = $('input[name=enroll]', that.container); - button = IPA.button({ - name: 'enroll', - label: IPA.messages.objects.host.set_otp, - click: function() { - that.set_otp(); - return false; - } - }); - - that.enroll_button.replaceWith(button); - that.enroll_button = button; + }).appendTo(that.present_span); }; that.show_unprovision_dialog = function() { @@ -559,11 +510,136 @@ IPA.host_provisioning_status_widget = function(spec) { command.execute(); }; - that.set_otp = function() { + that.load = function(result) { + that.result = result; + var value = result[that.name]; + set_status(value ? 'present' : 'missing'); + }; + + function set_status(status) { + that.present_span.css('display', status == 'present' ? 'inline' : 'none'); + that.missing_span.css('display', status == 'missing' ? 'inline' : 'none'); + } + + return that; +}; + +IPA.host_password_widget = function(spec) { + + spec = spec || {}; + + var that = IPA.widget(spec); + + that.create = function(container) { + + that.widget_create(container); + + that.missing_span = $('<span/>', { + name: 'missing' + }).appendTo(container); + + $('<img/>', { + src: 'caution.png', + 'class': 'status-icon' + }).appendTo(that.missing_span); + + that.missing_span.append(' '); + + that.missing_span.append(IPA.messages.objects.host.password_missing); + + that.present_span = $('<span/>', { + name: 'present', + style: 'display: none;' + }).appendTo(container); + + $('<img/>', { + src: 'check.png', + 'class': 'status-icon' + }).appendTo(that.present_span); + + that.present_span.append(' '); + + that.present_span.append(IPA.messages.objects.host.password_present); + + container.append(': '); + + that.set_password_button = IPA.button({ + name: 'set_password', + label: IPA.messages.objects.host.password_set_button, + click: function() { + that.show_password_dialog(); + return false; + } + }).appendTo(container); + }; + + that.show_password_dialog = function() { + + var title; + var label; + + if (that.status == 'missing') { + title = IPA.messages.objects.host.password_set_title; + label = IPA.messages.objects.host.password_set_button; + } else { + title = IPA.messages.objects.host.password_reset_title; + label = IPA.messages.objects.host.password_reset_button; + } + + var dialog = IPA.dialog({ + title: title, + width: 400 + }); + + var password1 = dialog.add_field(IPA.text_widget({ + name: 'password1', + label: IPA.messages.password.new_password, + type: 'password', + undo: false + })); + + var password2 = dialog.add_field(IPA.text_widget({ + name: 'password2', + label: IPA.messages.password.verify_password, + type: 'password', + undo: false + })); + + dialog.add_button(label, function() { + + var record = {}; + dialog.save(record); + var new_password = record.password1; + var repeat_password = record.password2; + + if (new_password != repeat_password) { + alert(IPA.messages.password.password_must_match); + return; + } + + that.set_password( + new_password, + function(data, text_status, xhr) { + set_status('present'); + dialog.close(); + }, + function(xhr, text_status, error_thrown) { + dialog.close(); + } + ); + dialog.close(); + }); + + dialog.add_button(IPA.messages.buttons.cancel, function() { + dialog.close(); + }); + + dialog.open(that.container); + }; + + that.set_password = function(password, on_success, on_error) { var pkey = that.entity.get_primary_key(); - var otp = that.otp_input.val(); - that.otp_input.val(''); var command = IPA.command({ entity: that.entity.name, @@ -572,11 +648,10 @@ IPA.host_provisioning_status_widget = function(spec) { options: { all: true, rights: true, - userpassword: otp + userpassword: password }, - on_success: function(data, text_status, xhr) { - alert(IPA.messages.objects.host.otp_confirmation); - } + on_success: on_success, + on_error: on_error }); command.execute(); @@ -584,13 +659,25 @@ IPA.host_provisioning_status_widget = function(spec) { that.load = function(result) { that.result = result; - var krblastpwdchange = result['krblastpwdchange']; - set_status(krblastpwdchange ? 'valid' : 'missing'); + var value = result[that.name]; + set_status(value ? 'present' : 'missing'); }; function set_status(status) { - that.status_valid.css('display', status == 'valid' ? 'inline' : 'none'); - that.status_missing.css('display', status == 'missing' ? 'inline' : 'none'); + + that.status = status; + var password_label = $('.button-label', that.set_password_button); + + if (status == 'missing') { + that.missing_span.css('display', 'inline'); + that.present_span.css('display', 'none'); + password_label.text(IPA.messages.objects.host.password_set_button); + + } else { + that.missing_span.css('display', 'none'); + that.present_span.css('display', 'inline'); + password_label.text(IPA.messages.objects.host.password_reset_button); + } } return that; diff --git a/install/ui/test/bin/update_ipa_init.sh b/install/ui/test/bin/update_ipa_init.sh index 23852a269..2fc9c2170 100755 --- a/install/ui/test/bin/update_ipa_init.sh +++ b/install/ui/test/bin/update_ipa_init.sh @@ -17,4 +17,13 @@ fi -curl -v -H "Content-Type:application/json" -H "Accept:applicaton/json" --negotiate -u : --cacert /etc/ipa/ca.crt -d '{"method":"batch","params":[[{"method":"json_metadata","params":[[],{}]},{"method":"i18n_messages","params":[[],{}]},{"method":"user_find","params":[[],{"whoami":true,"all":true}]},{"method":"env","params":[[],{}]},{"method":"dns_is_enabled","params":[[],{}]},{"method":"hbacrule_find","params":[[],{"accessruletype":"deny"}]}],{}]}' -X POST https://`hostname`/ipa/json | sed 's/[ \t]*$//' > $INIT_FILE +curl -v\ + -H "Content-Type: application/json"\ + -H "Accept: applicaton/json"\ + --negotiate\ + --delegation always\ + -u :\ + --cacert /etc/ipa/ca.crt\ + -d '{"method":"batch","params":[[{"method":"json_metadata","params":[[],{}]},{"method":"i18n_messages","params":[[],{}]},{"method":"user_find","params":[[],{"whoami":true,"all":true}]},{"method":"env","params":[[],{}]},{"method":"dns_is_enabled","params":[[],{}]},{"method":"hbacrule_find","params":[[],{"accessruletype":"deny"}]}],{}]}'\ + -X POST\ + https://`hostname`/ipa/json | sed 's/[ \t]*$//' > $INIT_FILE diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 9f31a7268..8c4a78077 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -352,7 +352,7 @@ "pattern_errmsg": null, "primary_key": false, "query": false, - "required": true, + "required": false, "type": "unicode" } ] @@ -8118,7 +8118,9 @@ "default": null, "doc": "Automount key name.", "exclude": null, - "flags": [], + "flags": [ + "req_update" + ], "hint": null, "include": null, "label": "Key", @@ -8883,6 +8885,14 @@ "authenticationmethod", "authorityrevocationlist", "authorizedservice", + "automemberdefaultgroup", + "automemberdisabled", + "automemberexclusiveregex", + "automemberfilter", + "automembergroupingattr", + "automemberinclusiveregex", + "automemberscope", + "automembertargetgroup", "automountinformation", "automountkey", "automountmapname", @@ -9351,6 +9361,7 @@ "nsslapd-changelogsuffix", "nsslapd-ldapiautodnsuffix", "nsslapd-parent-suffix", + "nsslapd-pluginconfigarea", "nsslapd-plugindescription", "nsslapd-pluginenabled", "nsslapd-pluginid", @@ -10385,7 +10396,7 @@ "cli_name": "name_server", "cli_short_name": null, "default": null, - "doc": "Authoritative nameserver.", + "doc": "Authoritative nameserver domain name", "exclude": null, "flags": [], "hint": null, @@ -11524,13 +11535,17 @@ "memberof", "objectclass" ], - "attribute_members": {}, + "attribute_members": { + "memberof": [ + "hbacsvcgroup" + ] + }, "bindable": false, "container_dn": "cn=hbacservices,cn=hbac", "default_attributes": [ "cn", "description", - "memberindirect" + "memberof" ], "hidden_attributes": [ "objectclass", @@ -11823,7 +11838,6 @@ "nsosversion", "usercertificate", "memberof", - "krblastpwdchange", "managedby", "memberindirect", "memberofindirect" @@ -12350,7 +12364,7 @@ "aciattrs": [], "attribute_members": {}, "bindable": false, - "container_dn": "cn=SERVER15.AYOUNG.BOSTON.DEVEL.REDHAT.COM,cn=kerberos", + "container_dn": "cn=IDM.LAB.BOS.REDHAT.COM,cn=kerberos", "default_attributes": [ "krbmaxticketlife", "krbmaxrenewableage" @@ -13207,7 +13221,7 @@ ], "attribute_members": {}, "bindable": false, - "container_dn": "cn=SERVER15.AYOUNG.BOSTON.DEVEL.REDHAT.COM,cn=kerberos", + "container_dn": "cn=IDM.LAB.BOS.REDHAT.COM,cn=kerberos", "default_attributes": [ "cn", "cospriority", @@ -13777,8 +13791,7 @@ "default_attributes": [ "krbprincipalname", "usercertificate", - "managedby", - "krblastpwdchange" + "managedby" ], "hidden_attributes": [ "objectclass", @@ -14788,7 +14801,7 @@ "cli_name": "ipasudorunas_user", "cli_short_name": null, "default": null, - "doc": "RunAs User", + "doc": "Run as a user or any user within a specified group", "exclude": null, "flags": [ "no_update", @@ -14819,7 +14832,7 @@ "cli_name": "ipasudorunas_group", "cli_short_name": null, "default": null, - "doc": "RunAs Group", + "doc": "Run with the gid of a specified POSIX group ", "exclude": null, "flags": [ "no_update", @@ -14850,7 +14863,7 @@ "cli_name": "externaluser", "cli_short_name": null, "default": null, - "doc": "External User the rule applies to", + "doc": "External User the rule applies to (sudorule-find only)", "exclude": null, "flags": [], "hint": null, @@ -14877,7 +14890,7 @@ "cli_name": "runasexternaluser", "cli_short_name": null, "default": null, - "doc": "External User the commands can run as", + "doc": "External User the commands can run as (sudorule-find only)", "exclude": null, "flags": [], "hint": null, @@ -14904,7 +14917,7 @@ "cli_name": "runasexternalgroup", "cli_short_name": null, "default": null, - "doc": "External Group the commands can run as", + "doc": "External Group the commands can run as (sudorule-find only)", "exclude": null, "flags": [], "hint": null, @@ -14922,6 +14935,68 @@ "query": false, "required": false, "type": "unicode" + }, + { + "alwaysask": false, + "attribute": false, + "autofill": false, + "class": "Str", + "cli_name": "ipasudoopt", + "cli_short_name": null, + "default": null, + "doc": "Sudo Option", + "exclude": null, + "flags": [ + "no_update", + "no_create", + "no_search" + ], + "hint": null, + "include": null, + "label": "Sudo Option", + "length": null, + "maxlength": null, + "minlength": null, + "multivalue": false, + "name": "ipasudoopt", + "noextrawhitespace": true, + "pattern": null, + "pattern_errmsg": null, + "primary_key": false, + "query": false, + "required": false, + "type": "unicode" + }, + { + "alwaysask": false, + "attribute": false, + "autofill": false, + "class": "Str", + "cli_name": "ipasudorunasgroup_group", + "cli_short_name": null, + "default": null, + "doc": "RunAsGroup Group", + "exclude": null, + "flags": [ + "no_update", + "no_create", + "no_search" + ], + "hint": null, + "include": null, + "label": "RunAsGroup Group", + "length": null, + "maxlength": null, + "minlength": null, + "multivalue": false, + "name": "ipasudorunasgroup_group", + "noextrawhitespace": true, + "pattern": null, + "pattern_errmsg": null, + "primary_key": false, + "query": false, + "required": false, + "type": "unicode" } ], "uuid_attribute": "ipauniqueid" @@ -15843,11 +15918,11 @@ "add": { "ipasudorunas": "Add RunAs ${other_entity} into ${entity} ${primary_key}", "ipasudorunasgroup": "Add RunAs Groups into ${entity} ${primary_key}", + "managedby": "Add ${other_entity} Managing ${entity} ${primary_key}", "member": "Add ${other_entity} into ${entity} ${primary_key}", "memberallowcmd": "Add Allow ${other_entity} into ${entity} ${primary_key}", "memberdenycmd": "Add Deny ${other_entity} into ${entity} ${primary_key}", "memberof": "Add ${entity} ${primary_key} into ${other_entity}", - "managedby": "Add ${other_entity} Managing ${entity} ${primary_key}", "sourcehost": "Add Source ${other_entity} into ${entity} ${primary_key}" }, "direct_enrollment": "Direct Enrollment", @@ -15857,11 +15932,11 @@ "remove": { "ipasudorunas": "Remove RunAs ${other_entity} from ${entity} ${primary_key}", "ipasudorunasgroup": "Remove RunAs Groups from ${entity} ${primary_key}", + "managedby": "Remove ${other_entity} Managing ${entity} ${primary_key}", "member": "Remove ${other_entity} from ${entity} ${primary_key}", "memberallowcmd": "Remove Allow ${other_entity} from ${entity} ${primary_key}", "memberdenycmd": "Remove Deny ${other_entity} from ${entity} ${primary_key}", "memberof": "Remove ${entity} ${primary_key} from ${other_entity}", - "managedby": "Remove ${other_entity} Managing ${entity} ${primary_key}", "sourcehost": "Remove Source ${other_entity} from ${entity} ${primary_key}" }, "show_results": "Show Results" @@ -15905,6 +15980,7 @@ "dirty_title": "Unsaved Changes", "hide_details": "Hide details", "prospective": "Prospective", + "redirection": "Redirection", "remove_empty": "Select entries to be removed.", "remove_title": "Remove ${entity}", "show_details": "Show details", @@ -15982,7 +16058,9 @@ "delegation": {}, "dnsrecord": { "data": "Data", + "deleted_no_data": "DNS record was deleted because it contained no data.", "other": "Other Record Types", + "redirection_dnszone": "You will be redirected to DNS Zone.", "standard": "Standard Record Types", "title": "Records for DNS Zone", "type": "Record Type" @@ -16041,19 +16119,23 @@ "cn": "Host Name", "delete_key_unprovision": "Delete Key, Unprovision", "details": "Host Settings", - "enroll_otp": "Enroll via One-Time-Password", "enrolled": "Enrolled?", "enrollment": "Enrollment", "fqdn": "Fully Qualified Host Name", - "missing": "Kerberos Key Not Present", - "otp_confirmation": "One-Time-Password has been set.", - "posix": "Is this a POSIX group?", - "set_otp": "Set OTP", + "keytab": "Kerberos Key", + "keytab_missing": "Kerberos Key Not Present", + "keytab_present": "Kerberos Key Present, Host Provisioned", + "password": "One-Time-Password", + "password_missing": "One-Time-Password Not Present", + "password_present": "One-Time-Password Present", + "password_reset_button": "Reset OTP", + "password_reset_title": "Reset One-Time-Password", + "password_set_button": "Set OTP", + "password_set_title": "Set One-Time-Password", "status": "Status", "unprovision": "Unprovision", "unprovision_confirmation": "Are you sure you want to unprovision this host?", - "unprovision_title": "Unprovisioning ${entity}", - "valid": "Kerberos Key Present, Host Provisioned" + "unprovision_title": "Unprovisioning ${entity}" }, "hostgroup": { "identity": "Host Group Settings" @@ -16138,14 +16220,16 @@ "error_changing_status": "Error changing account status", "inactive": "Inactive", "mailing": "Mailing Address", - "misc": "Misc. Information", - "new_password": "New Password", - "password_change_complete": "Password change complete", - "password_must_match": "Passwords must match", - "repeat_password": "Repeat Password", - "reset_password": "Reset Password" + "misc": "Misc. Information" } }, + "password": { + "new_password": "New Password", + "password_change_complete": "Password change complete", + "password_must_match": "Passwords must match", + "reset_password": "Reset Password", + "verify_password": "Verify Password" + }, "search": { "delete_confirm": "Are you sure you want to delete selected entries?", "partial_delete": "Some entries were not deleted", @@ -16189,38 +16273,40 @@ "cn": [ "Administrator" ], - "dn": "uid=admin,cn=users,cn=accounts,dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com", + "dn": "uid=admin,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com", "gecos": [ "Administrator" ], "gidnumber": [ - "349800000" + "166000000" ], + "has_keytab": true, + "has_password": true, "homedirectory": [ "/home/admin" ], "ipauniqueid": [ - "3d3de554-b49b-11e0-921a-525400b55a47" + "a632c9f6-cdf7-11e0-89ce-525400e135d8" ], "krbextradata": [ { - "__base64__": "AALU0ylOcm9vdC9hZG1pbkBTRVJWRVIxNS5BWU9VTkcuQk9TVE9OLkRFVkVMLlJFREhBVC5DT00A" + "__base64__": "AAJyYFROcm9vdC9hZG1pbkBJRE0uTEFCLkJPUy5SRURIQVQuQ09NAA==" }, { - "__base64__": "AALU0ylOcm9vdC9hZG1pbkBTRVJWRVIxNS5BWU9VTkcuQk9TVE9OLkRFVkVMLlJFREhBVC5DT00A" + "__base64__": "AAgBAA==" } ], "krblastpwdchange": [ - "20110722194732Z" + "20110824022242Z" ], "krblastsuccessfulauth": [ - "20110725162159Z" + "20110824023056Z" ], "krbpasswordexpiration": [ - "20111020194732Z" + "20111122022242Z" ], "krbprincipalname": [ - "admin@SERVER15.AYOUNG.BOSTON.DEVEL.REDHAT.COM" + "admin@IDM.LAB.BOS.REDHAT.COM" ], "loginshell": [ "/bin/bash" @@ -16245,7 +16331,7 @@ "admin" ], "uidnumber": [ - "349800000" + "166000000" ] } ], @@ -16256,11 +16342,11 @@ "count": 68, "error": null, "result": { - "basedn": "dc=server15,dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com", + "basedn": "dc=idm,dc=lab,dc=bos,dc=redhat,dc=com", "bin": "/var/www", "ca_agent_port": 9443, "ca_ee_port": 9444, - "ca_host": "server15.ayoung.boston.devel.redhat.com", + "ca_host": "edewata-f15.idm.lab.bos.redhat.com", "ca_port": 9180, "conf": "/etc/ipa/server.conf", "conf_default": "/etc/ipa/default.conf", @@ -16294,17 +16380,17 @@ "container_virtual": "cn=virtual operations,cn=etc", "context": "server", "debug": false, - "domain": "ayoung.boston.devel.redhat.com", + "domain": "idm.lab.bos.redhat.com", "dot_ipa": "/var/www/.ipa", "enable_ra": true, "fallback": true, "home": "/var/www", - "host": "server15.ayoung.boston.devel.redhat.com", + "host": "edewata-f15.idm.lab.bos.redhat.com", "in_server": true, "in_tree": false, "interactive": true, "ipalib": "/usr/lib/python2.7/site-packages/ipalib", - "ldap_uri": "ldapi://%2fvar%2frun%2fslapd-SERVER15-AYOUNG-BOSTON-DEVEL-REDHAT-COM.socket", + "ldap_uri": "ldapi://%2fvar%2frun%2fslapd-IDM-LAB-BOS-REDHAT-COM.socket", "log": null, "logdir": "/var/log/ipa", "mode": "production", @@ -16313,7 +16399,7 @@ "mount_xmlserver": "xml", "prompt_all": false, "ra_plugin": "selfsign", - "realm": "SERVER15.AYOUNG.BOSTON.DEVEL.REDHAT.COM", + "realm": "IDM.LAB.BOS.REDHAT.COM", "rpc_json_uri": "http://localhost:8888/ipa/json", "script": "/var/www/mod_wsgi", "site_packages": "/usr/lib/python2.7/site-packages", @@ -16323,7 +16409,7 @@ "wait_for_attr": false, "webui_assets_dir": null, "webui_prod": true, - "xmlrpc_uri": "https://server15.ayoung.boston.devel.redhat.com/ipa/xml" + "xmlrpc_uri": "https://edewata-f15.idm.lab.bos.redhat.com/ipa/xml" }, "summary": "68 variables", "total": 68 diff --git a/install/ui/user.js b/install/ui/user.js index 14d28deea..d390d1906 100644 --- a/install/ui/user.js +++ b/install/ui/user.js @@ -306,7 +306,7 @@ IPA.user_password_widget = function(spec) { $('<a/>', { href: 'jslink', title: 'userpassword', - text: IPA.messages.objects.user.reset_password, + text: IPA.messages.password.reset_password, click: function() { that.show_dialog(); return false; @@ -317,25 +317,25 @@ IPA.user_password_widget = function(spec) { that.show_dialog = function() { var dialog = IPA.dialog({ - title: IPA.messages.objects.user.reset_password, + title: IPA.messages.password.reset_password, width: 400 }); var password1 = dialog.add_field(IPA.text_widget({ name: 'password1', - label: IPA.messages.objects.user.new_password, + label: IPA.messages.password.new_password, type: 'password', undo: false })); var password2 = dialog.add_field(IPA.text_widget({ name: 'password2', - label: IPA.messages.objects.user.repeat_password, + label: IPA.messages.password.verify_password, type: 'password', undo: false })); - dialog.add_button(IPA.messages.objects.user.reset_password, function() { + dialog.add_button(IPA.messages.password.reset_password, function() { var record = {}; dialog.save(record); @@ -344,14 +344,14 @@ IPA.user_password_widget = function(spec) { var repeat_password = record.password2; if (new_password != repeat_password) { - alert(IPA.messages.objects.user.password_must_match); + alert(IPA.messages.password.password_must_match); return; } that.set_password( new_password, function(data, text_status, xhr) { - alert(IPA.messages.objects.user.password_change_complete); + alert(IPA.messages.password.password_change_complete); dialog.close(); }, function(xhr, text_status, error_thrown) { |