From 26a2fa027d4e3d5c6953db325080074eedf64d98 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 16 Sep 2011 16:06:07 -0500 Subject: Fixed problem enabling/disabling DNS zone. The details facet for DNS zone has been modified to use dnszone- enable/disable for idnszoneactive and dnszone-mod for other fields. Ticket #1813 --- install/ui/sudo.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'install/ui/sudo.js') diff --git a/install/ui/sudo.js b/install/ui/sudo.js index c9e7cdaf..cdd5e50a 100644 --- a/install/ui/sudo.js +++ b/install/ui/sudo.js @@ -261,14 +261,14 @@ IPA.sudorule_details_facet = function(spec) { that.update = function(on_success, on_error) { - var pkey = IPA.nav.get_state(that.entity.name+'-pkey'); + var args = that.get_primary_key(); var modify_operation = { 'execute': false, 'command': IPA.command({ entity: that.entity.name, method: 'mod', - args: [pkey], + args: args, options: {all: true, rights: true} }) }; @@ -298,7 +298,7 @@ IPA.sudorule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_user', - args: [pkey], + args: args, options: {all: true, rights: true} }) }, @@ -308,7 +308,7 @@ IPA.sudorule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_host', - args: [pkey], + args: args, options: {all: true, rights: true} }) }, @@ -318,7 +318,7 @@ IPA.sudorule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_allow_command', - args: [pkey], + args: args, options: {all: true, rights: true} }) }, @@ -328,7 +328,7 @@ IPA.sudorule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_runasuser', - args: [pkey], + args: args, options: {all: true, rights: true} }) }, @@ -338,7 +338,7 @@ IPA.sudorule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'remove_runasgroup', - args: [pkey], + args: args, options: {all: true, rights: true} }) } @@ -349,7 +349,7 @@ IPA.sudorule_details_facet = function(spec) { 'command': IPA.command({ entity: that.entity.name, method: 'enable', - args: [pkey], + args: args, options: {all: true, rights: true} }) }; @@ -361,15 +361,17 @@ IPA.sudorule_details_facet = function(spec) { var section_fields = section.fields.values; for (var j=0; j= 0) { @@ -427,11 +429,11 @@ IPA.sudorule_details_facet = function(spec) { 'name': 'sudorule_details_update', 'on_success': function(data, text_status, xhr) { that.refresh(); - if (on_success) on_success(data, text_status, xhr); + if (on_success) on_success.call(this, data, text_status, xhr); }, 'on_error': function(xhr, text_status, error_thrown) { that.refresh(); - if (on_error) on_error(xhr, text_status, error_thrown); + if (on_error) on_error.call(this, xhr, text_status, error_thrown); } }); -- cgit