summaryrefslogtreecommitdiffstats
path: root/install/static/service.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-01-18 12:12:47 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-01-18 12:35:14 -0500
commit5c105a5ff4dc027ba38dde39c2329d031deb1dc3 (patch)
tree9cc39e57b3e2dbc99e5bc4d8973562579086059b /install/static/service.js
parent17122d270546ff8864ae9c9c834abee03a68e204 (diff)
downloadfreeipa.git-5c105a5ff4dc027ba38dde39c2329d031deb1dc3.tar.gz
freeipa.git-5c105a5ff4dc027ba38dde39c2329d031deb1dc3.tar.xz
freeipa.git-5c105a5ff4dc027ba38dde39c2329d031deb1dc3.zip
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.
Diffstat (limited to 'install/static/service.js')
-rw-r--r--install/static/service.js36
1 files changed, 34 insertions, 2 deletions
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 = $('<tr/>').appendTo(table);
var td = $('<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 = $('<tr/>').appendTo(table);
td = $('<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 = $('<span/>', { 'name': 'host' }).appendTo(td);
field.create(span);
+
+ field = that.get_field('force');
+
+ tr = $('<tr/>').appendTo(table);
+
+ td = $('<td/>', {
+ style: 'vertical-align: top;',
+ title: field.label
+ }).appendTo(tr);
+ td.append(field.label+': ');
+
+ td = $('<td/>', {
+ 'style': 'vertical-align: top;'
+ }).appendTo(tr);
+
+ span = $('<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;
};