summaryrefslogtreecommitdiffstats
path: root/install/ui/sudorule.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-02-03 21:42:50 -0600
committerAdam Young <ayoung@redhat.com>2011-02-07 11:31:17 -0500
commit348d734c59432a740b52924ac18ff47b30dad54e (patch)
tree7ed5d13f7a8f16dce89e6889366f9b661ef41cf1 /install/ui/sudorule.js
parenta6849ef2ba5611ac44b612b2c0552c685b22aa3a (diff)
downloadfreeipa-348d734c59432a740b52924ac18ff47b30dad54e.tar.gz
freeipa-348d734c59432a740b52924ac18ff47b30dad54e.tar.xz
freeipa-348d734c59432a740b52924ac18ff47b30dad54e.zip
Restructuring details page.
Previously the IPA.details_list_section can only be used with widgets that generates <dd> tag because it uses the following structure: <dl> <dt>Telephone Number:</dt> <span name="teleponenumber"> <dd>111-1111</dd> <dd>222-2222</dd> </span> </dl> The <dd> tag was previously used to handle multi-valued attributes. Since multi-valued attributes are now handled by the recently added IPA.multivalued_text_widget, the structure can be changed as follows: <dl> <dt>Telephone Number:</dt> <dd> <span name="telephonenumber"> <div>111-1111</div> <div>222-2222</div> </span> </dd> </dl> This allows IPA.details_list_section to be used with any widgets without requiring the <dd> tag.
Diffstat (limited to 'install/ui/sudorule.js')
-rw-r--r--install/ui/sudorule.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/install/ui/sudorule.js b/install/ui/sudorule.js
index ab4d9ab4f..bab457e88 100644
--- a/install/ui/sudorule.js
+++ b/install/ui/sudorule.js
@@ -115,9 +115,9 @@ IPA.sudorule_details_facet = function (spec) {
that.add_section(section);
}
- section.create_text({ 'name': 'cn', 'read_only': true });
- section.create_textarea({ 'name': 'description' });
- section.create_radio({ 'name': 'ipaenabledflag' });
+ section.text({name: 'cn', read_only: true});
+ section.textarea({name: 'description'});
+ section.radio({name: 'ipaenabledflag'});
section = IPA.rule_details_section({
'name': 'user',
@@ -134,7 +134,7 @@ IPA.sudorule_details_facet = function (spec) {
});
that.add_section(section);
- var category = section.create_radio({ name: 'usercategory', label: 'User category' });
+ var category = section.radio({ name: 'usercategory', label: 'User category' });
section.add_field(IPA.sudorule_association_table_widget({
'id': that.entity_name+'-memberuser_user',
'name': 'memberuser_user', 'label': 'Users', 'category': category,
@@ -162,7 +162,7 @@ IPA.sudorule_details_facet = function (spec) {
});
that.add_section(section);
- category = section.create_radio({ 'name': 'hostcategory', 'label': 'Host category' });
+ category = section.radio({ 'name': 'hostcategory', 'label': 'Host category' });
section.add_field(IPA.sudorule_association_table_widget({
'id': that.entity_name+'-memberhost_host',
'name': 'memberhost_host', 'label': 'Host', 'category': category,
@@ -407,6 +407,11 @@ IPA.sudorule_details_general_section = function (spec){
title: param_info ? param_info.doc : 'cn'
}).appendTo(td);
+ $('<label/>', {
+ name: 'cn',
+ style: 'display: none;'
+ }).appendTo(span);
+
$('<input/>', {
'type': 'text',
'name': 'cn',
@@ -518,7 +523,7 @@ IPA.sudorule_details_command_section = function (spec){
that.init = function() {
- var category = that.create_radio({'name': 'cmdcategory'});
+ var category = that.radio({'name': 'cmdcategory'});
that.add_field(IPA.sudorule_command_table_widget({
'id': that.entity_name+'-memberallowcmd_sudocmd',
@@ -690,7 +695,7 @@ IPA.sudorule_details_runas_section = function (spec){
that.init = function() {
- var category = that.create_radio({ name: 'ipasudorunasusercategory', label: 'Run as User category' });
+ var category = that.radio({ name: 'ipasudorunasusercategory', label: 'Run as User category' });
that.add_field(IPA.sudorule_association_table_widget({
'id': that.entity_name+'-runasruser_user',
'name': 'ipasudorunas_user', 'label': 'Users', 'category': category,
@@ -702,7 +707,7 @@ IPA.sudorule_details_runas_section = function (spec){
'other_entity': 'group', 'add_method': 'add_runasuser', 'remove_method': 'remove_runasuser'
}));
- category = that.create_radio({ name: 'ipasudorunasgroupcategory', label: 'Run as Group category' });
+ category = that.radio({ name: 'ipasudorunasgroupcategory', label: 'Run as Group category' });
that.add_field(IPA.sudorule_association_table_widget({
'id': that.entity_name+'-runasgroup_group',
'name': 'ipasudorunasgroup_group', 'label': 'Groups', 'category': category,