summaryrefslogtreecommitdiffstats
path: root/install/static/user.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-11-16 18:10:40 -0600
committerAdam Young <ayoung@redhat.com>2010-11-18 10:12:18 -0500
commit5da8313b668340494f06afe6d3459f368948588f (patch)
treec19b19cf32bd8487cf42f21348a1ca97f8fe2f6c /install/static/user.js
parentb42271c47d0e672f1a88585f5a87f5db8522f634 (diff)
downloadfreeipa.git-5da8313b668340494f06afe6d3459f368948588f.tar.gz
freeipa.git-5da8313b668340494f06afe6d3459f368948588f.tar.xz
freeipa.git-5da8313b668340494f06afe6d3459f368948588f.zip
Service and Host Provisioning
The service and host details pages have been modified to display Kerberos key provisioning status and to provide a way to unprovision. The host enrollment via OTP has not been implemented yet. The ipa_details_field has been modified to remove any old <dd> tags it created in the previous load operation. This is to support other widgets that need to perform load operation without removing <dd> tags. The certificate_status_panel has been converted into a widget. The host entity has been rewritten using the new framework. The unit tests has been updated.
Diffstat (limited to 'install/static/user.js')
-rw-r--r--install/static/user.js56
1 files changed, 31 insertions, 25 deletions
diff --git a/install/static/user.js b/install/static/user.js
index 74c003e5..2a9bc7d0 100644
--- a/install/static/user.js
+++ b/install/static/user.js
@@ -26,7 +26,7 @@ ipa_entity_set_search_definition('user', [
['uidnumber', 'UID', null],
['mail', 'EMAIL', null],
['telephonenumber', 'Phone', null],
- ['title', 'Job Title', null],
+ ['title', 'Job Title', null]
]);
ipa_entity_set_add_definition('user', [
@@ -89,10 +89,13 @@ ipa_entity_set_association_definition('user', {
function user_status_load(container, result) {
- var lock_field = 'nsaccountlock';
- var dt = $('dt[title='+this.name+']', container);
- if (!dt.length) return;
+ $('dd', container).remove();
+
+ var dd = ipa_create_first_dd(this.name);
+ dd.appendTo(container);
+
+ var lock_field = 'nsaccountlock';
var locked = result[lock_field] &&
result[lock_field][0].toLowerCase() === 'true';
@@ -134,8 +137,7 @@ function user_status_load(container, result) {
return (false);
}
});
-
- dt.after(ipa_create_first_dd(this.name, status_field));
+ status_field.appendTo(dd);
}
@@ -191,17 +193,20 @@ function resetpwd_on_click(){
}
function user_password_load(container, result) {
- var dt = $('dt[title='+this.name+']', container);
- if (!dt.length) return;
-
- dt.after(ipa_create_first_dd(
- this.name,
- $('<a/>',{
- href:"jslink",
- click:resetpwd_on_click,
- title:'userpassword',
- text: 'reset password'
- })));
+
+ $('dd', container).remove();
+
+ var dd = ipa_create_first_dd(this.name);
+ dd.appendTo(container);
+
+ var link = $('<a/>',{
+ href:"jslink",
+ click:resetpwd_on_click,
+ title:'userpassword',
+ text: 'reset password'
+ });
+ link.appendTo(dd);
+
}
var select_temp = '<select title="st"></select>';
@@ -215,17 +220,18 @@ var states = [
'WA', 'WV', 'WI', 'WY', ''
];
function user_state_load(container, result) {
- var dt = $('dt[title='+this.name+']', container);
- if (!dt.length) return;
- var next = dt.next();
- next.css('clear', 'none');
- next.css('width', '70px');
+ $('dd', container).remove();
+
+ //var next = dt.next();
+ //next.css('clear', 'none');
+ //next.css('width', '70px');
- var dd = ipa_create_first_dd(this.name, select_temp);
- dt.after(dd);
+ var dd = ipa_create_first_dd(this.name);
+ dd.append(select_temp);
+ dd.appendTo(container);
- var sel = dt.next().children().first();
+ var sel = dd.children().first();
for (var i = 0; i < states.length; ++i)
sel.append(option_temp.replace(/V/g, states[i]));