diff --git a/install/ui/src/freeipa/add.js b/install/ui/src/freeipa/add.js index 388b4e497..a2b60435e 100644 --- a/install/ui/src/freeipa/add.js +++ b/install/ui/src/freeipa/add.js @@ -59,8 +59,7 @@ IPA.entity_adder_dialog = function(spec) { function(data, text_status, xhr) { that.added.notify(); that.show_message(that.get_success_message(data)); - var facet = IPA.current_entity.get_facet(); - facet.refresh(); + that.facet.refresh(); that.reset(); that.focus_first_element(); }, @@ -101,8 +100,7 @@ IPA.entity_adder_dialog = function(spec) { that.add( function(data, text_status, xhr) { that.added.notify(); - var facet = IPA.current_entity.get_facet(); - facet.refresh(); + that.facet.refresh(); that.close(); that.notify_success(data); }, diff --git a/install/ui/src/freeipa/automember.js b/install/ui/src/freeipa/automember.js index 0e05b8c59..0f188bd19 100644 --- a/install/ui/src/freeipa/automember.js +++ b/install/ui/src/freeipa/automember.js @@ -331,8 +331,8 @@ IPA.automember.rule_adder_dialog = function(spec) { if (pkey instanceof Array) { pkey = pkey[0]; } - var facet = IPA.current_entity.get_facet(); - var facetname = facet.group_type === 'group' ? 'usergrouprule' : + + var facetname = that.facet.group_type === 'group' ? 'usergrouprule' : 'hostgrouprule'; navigation.show_entity(that.entity.name, facetname, [pkey]); @@ -341,19 +341,17 @@ IPA.automember.rule_adder_dialog = function(spec) { that.reset = function() { var field = that.fields.get_field('cn'); - var facet = IPA.current_entity.get_facet(); - field.widget.other_entity = IPA.get_entity(facet.group_type); + field.widget.other_entity = IPA.get_entity(that.facet.group_type); that.dialog_reset(); }; that.create_add_command = function(record) { - var facet = IPA.current_entity.get_facet(); var command = that.entity_adder_dialog_create_add_command(record); - command.name = that.entity.name+facet.group_type+'_show'; - command.set_option('type', facet.group_type); + command.name = that.entity.name+that.facet.group_type+'_show'; + command.set_option('type', that.facet.group_type); return command; }; @@ -370,13 +368,11 @@ IPA.automember.rule_deleter_dialog = function(spec) { that.create_command = function() { - var facet = IPA.current_entity.get_facet(); - var batch = that.search_deleter_dialog_create_command(); for (var i=0; i