From 5c105a5ff4dc027ba38dde39c2329d031deb1dc3 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 18 Jan 2011 12:12:47 -0500 Subject: Force flag for Hosts and Services. The add dialogs for Hosts and Services have been updated to include a checkbox to force adding hosts/services that are not in DNS. The widgets has been updated to support tooltips. --- install/static/add.js | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'install/static/add.js') diff --git a/install/static/add.js b/install/static/add.js index 69e0ad79..69b1108c 100644 --- a/install/static/add.js +++ b/install/static/add.js @@ -78,8 +78,7 @@ IPA.add_dialog = function (spec) { state[that.entity_name + '-facet'] = 'details'; state[that.entity_name + '-pkey'] = pkey; $.bbq.pushState(state); - }, - function() { } + } ); }); @@ -90,28 +89,30 @@ IPA.add_dialog = function (spec) { that.dialog_init(); }; + that.add = function(record, on_success, on_error) { - function save_field(field, record, args, options){ var pkey_name = IPA.metadata[that.entity_name].primary_key; - var value = record[field.name]; - if (!value) return; - if (field.name == pkey_name) { - args.push(value); - } else { - options[field.name] = value; - } - } - - that.add = function(record, on_success, on_error) { - var args = []; - var options = {}; + var command = IPA.command({ + method: that.entity_name+'_add', + on_success: on_success, + on_error: on_error + }); for (var i=0; i