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/service.js | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'install/static/service.js') diff --git a/install/static/service.js b/install/static/service.js index 4154b22d..81f00ec7 100644 --- a/install/static/service.js +++ b/install/static/service.js @@ -100,6 +100,14 @@ IPA.service_add_dialog = function (spec) { 'undo': false })); + // TODO: Replace with i18n label + that.add_field(IPA.checkbox_widget({ + name: 'force', + label: 'Force', + tooltip: 'force principal name even if not in DNS', + undo: false + })); + that.add_dialog_init(); }; @@ -112,7 +120,8 @@ IPA.service_add_dialog = function (spec) { var tr = $('').appendTo(table); var td = $('', { - 'style': 'vertical-align: top;' + style: 'vertical-align: top;', + title: field.label }).appendTo(tr); td.append(field.label+': '); @@ -128,7 +137,8 @@ IPA.service_add_dialog = function (spec) { tr = $('').appendTo(table); td = $('', { - 'style': 'vertical-align: top;' + style: 'vertical-align: top;', + title: field.label }).appendTo(tr); td.append(field.label+': '); @@ -138,6 +148,23 @@ IPA.service_add_dialog = function (spec) { span = $('', { 'name': 'host' }).appendTo(td); field.create(span); + + field = that.get_field('force'); + + tr = $('').appendTo(table); + + td = $('', { + style: 'vertical-align: top;', + title: field.label + }).appendTo(tr); + td.append(field.label+': '); + + td = $('', { + 'style': 'vertical-align: top;' + }).appendTo(tr); + + span = $('', { 'name': 'force' }).appendTo(td); + field.create(span); }; that.get_record = function() { @@ -151,6 +178,11 @@ IPA.service_add_dialog = function (spec) { record['krbprincipalname'] = service+'/'+host; + field = that.get_field('force'); + var force = field.save()[0]; + + record['force'] = force; + return record; }; -- cgit