From 348d734c59432a740b52924ac18ff47b30dad54e Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 3 Feb 2011 21:42:50 -0600 Subject: Restructuring details page. Previously the IPA.details_list_section can only be used with widgets that generates
tag because it uses the following structure:
Telephone Number:
111-1111
222-2222
The
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:
Telephone Number:
111-1111
222-2222
This allows IPA.details_list_section to be used with any widgets without requiring the
tag. --- install/ui/hbacrule.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'install/ui/hbacrule.js') diff --git a/install/ui/hbacrule.js b/install/ui/hbacrule.js index 6b6e12381..6859e6fdc 100644 --- a/install/ui/hbacrule.js +++ b/install/ui/hbacrule.js @@ -155,10 +155,10 @@ IPA.hbacrule_details_facet = function (spec) { that.add_section(section); } - section.create_text({ 'name': 'cn', 'label': 'Name', 'read_only': true }); - section.create_radio({ 'name': 'accessruletype', 'label': 'Rule Type' }); - section.create_textarea({ 'name': 'description', 'label': 'Description' }); - section.create_radio({ 'name': 'ipaenabledflag', 'label': 'Enabled' }); + section.text({name: 'cn', label: 'Name', read_only: true}); + section.radio({name: 'accessruletype', label: 'Rule Type'}); + section.textarea({name: 'description', label: 'Description'}); + section.radio({name: 'ipaenabledflag', label: 'Enabled'}); if (IPA.layout) { section = that.create_section({ @@ -185,7 +185,7 @@ IPA.hbacrule_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.rule_association_table_widget({ 'id': that.entity_name+'-memberuser_user', 'name': 'memberuser_user', 'label': 'Users', 'category': category, @@ -222,7 +222,7 @@ IPA.hbacrule_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.rule_association_table_widget({ 'id': that.entity_name+'-memberhost_host', 'name': 'memberhost_host', 'label': 'Hosts', 'category': category, @@ -259,7 +259,7 @@ IPA.hbacrule_details_facet = function (spec) { that.add_section(section); } - category = section.create_radio({ 'name': 'servicecategory', 'label': 'Service category' }); + category = section.radio({ 'name': 'servicecategory', 'label': 'Service category' }); section.add_field(IPA.rule_association_table_widget({ 'id': that.entity_name+'-memberservice_hbacsvc', 'name': 'memberservice_hbacsvc', 'label': 'Services', 'category': category, @@ -296,7 +296,7 @@ IPA.hbacrule_details_facet = function (spec) { that.add_section(section); } - category = section.create_radio({ 'name': 'sourcehostcategory', 'label': 'Source host category' }); + category = section.radio({ 'name': 'sourcehostcategory', 'label': 'Source host category' }); section.add_field(IPA.rule_association_table_widget({ 'id': that.entity_name+'-sourcehost_host', 'name': 'sourcehost_host', 'label': 'Host', 'category': category, @@ -565,6 +565,11 @@ IPA.hbacrule_details_general_section = function (spec){ var span = $('', { 'name': 'cn' }).appendTo(td); + $('