diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 9d22da7f1..5245ba92c 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -631,7 +631,7 @@ IPA.deleter_dialog = function (spec) { }; that.set_values = function(values) { - that.values = that.values.concat(values); + that.values = values; }; that.create = function() { @@ -678,5 +678,7 @@ IPA.deleter_dialog = function (spec) { that.dialog_open(container); }; + that.deleter_dialog_create = that.create; + return that; }; diff --git a/install/ui/entity.js b/install/ui/entity.js index ec0317897..0940c7d17 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -974,6 +974,13 @@ IPA.entity_builder = function(){ return that.dialog(spec); }; + that.deleter_dialog = function(spec) { + spec.factory = spec.factory || IPA.search_deleter_dialog; + spec.name = spec.name || 'remove'; + + return that.dialog(spec); + }; + that.build = function(){ var item = entity; entity = null; diff --git a/install/ui/host.js b/install/ui/host.js index 9994abf31..bbac4edd7 100644 --- a/install/ui/host.js +++ b/install/ui/host.js @@ -122,9 +122,50 @@ IPA.entity_factories.host = function () { } ] }). + deleter_dialog({ + factory: IPA.host_deleter_dialog + }). build(); }; +IPA.host_deleter_dialog = function(spec) { + + spec = spec || {}; + + var that = IPA.search_deleter_dialog(spec); + + that.create = function() { + + that.deleter_dialog_create(); + + var metadata = IPA.get_method_option('host_del', 'updatedns'); + + that.updatedns = $('', { + type: 'checkbox', + name: 'updatedns', + title: metadata.doc + }).appendTo(that.container); + + that.container.append(' '); + + that.container.append(metadata.doc); + }; + + that.create_command = function() { + var batch = that.search_deleter_dialog_create_command(); + var updatedns = that.updatedns.is(':checked'); + + for (var i=0; i