From 6d14331a0561e98e4ce8a51bb418c1f6d25b5e88 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 19 Jul 2011 13:46:09 -0500 Subject: Added checkbox to remove hosts from DNS. A custom deleter dialog for hosts has been added to provide an option whether to remove the hosts from DNS. Ticket #1470 --- install/ui/host.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'install/ui/host.js') diff --git a/install/ui/host.js b/install/ui/host.js index 9994abf3..bbac4edd 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