summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-02-09 10:56:25 -0600
committerAdam Young <ayoung@redhat.com>2011-02-11 16:27:59 -0500
commit6880daefee19f164ff3c03f6f761558f0ecc0a7f (patch)
treef05f80e15af3f90dfcd7b41350eb87f21947f818 /install
parent29cf66046ae0786cee9e97178609b11ae82649a0 (diff)
downloadfreeipa-6880daefee19f164ff3c03f6f761558f0ecc0a7f.tar.gz
freeipa-6880daefee19f164ff3c03f6f761558f0ecc0a7f.tar.xz
freeipa-6880daefee19f164ff3c03f6f761558f0ecc0a7f.zip
Fixed add service dialog box.
Previously the add service dialog box shows a 'Principal:' label with no text field next to it. It now has been removed. The dialog box has been widened to avoid line wrapping of the buttons.
Diffstat (limited to 'install')
-rw-r--r--install/ui/dialog.js1
-rw-r--r--install/ui/service.js52
-rw-r--r--install/ui/widget.js1
3 files changed, 29 insertions, 25 deletions
diff --git a/install/ui/dialog.js b/install/ui/dialog.js
index f8eaf2121..4733b7814 100644
--- a/install/ui/dialog.js
+++ b/install/ui/dialog.js
@@ -117,6 +117,7 @@ IPA.dialog = function(spec) {
for (var i=0; i<that.fields.length; i++) {
var field = that.fields[i];
+ if (field.hidden) continue;
var tr = $('<tr/>').appendTo(table);
diff --git a/install/ui/service.js b/install/ui/service.js
index 409aa5dfa..7fc154722 100644
--- a/install/ui/service.js
+++ b/install/ui/service.js
@@ -23,35 +23,36 @@
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
-IPA.entity_factories.service = function () {
+IPA.entity_factories.service = function() {
return IPA.entity({
- 'name': 'service'
+ name: 'service'
}).
association({
- 'name': 'host',
- 'add_method': 'add_host',
- 'remove_method': 'remove_host'
+ name: 'host',
+ add_method: 'add_host',
+ remove_method: 'remove_host'
}).
facet(
IPA.search_facet().
column({name: 'krbprincipalname'}).
dialog(
IPA.service_add_dialog({
- 'name': 'add',
- 'title': 'Add New Service'
+ name: 'add',
+ title: 'Add New Service',
+ width: '450px'
}))).
- facet( IPA.service_details_facet()).
- facet( IPA.service_managedby_host_facet({
- 'name': 'managedby_host',
- 'label': IPA.messages.association.managedby +
+ facet(IPA.service_details_facet()).
+ facet(IPA.service_managedby_host_facet({
+ name: 'managedby_host',
+ label: IPA.messages.association.managedby +
' '+IPA.metadata['host'].label,
- 'other_entity': 'host'
+ other_entity: 'host'
}));
};
-IPA.service_select_widget = function (spec){
+IPA.service_select_widget = function(spec) {
var that = IPA.text_widget(spec);
var known_services = ["", "cifs", "DNS", "ftp", "HTTP","imap", "ldap",
@@ -81,25 +82,26 @@ IPA.service_select_widget = function (spec){
/*TODO: the following labels etc. all need to be replaced with I18N strings */
-IPA.service_add_dialog = function (spec) {
+IPA.service_add_dialog = function(spec) {
spec = spec || {};
var that = IPA.add_dialog(spec).
field(IPA.widget({
- name: 'krbprincipalname'
+ name: 'krbprincipalname',
+ hidden: true
})).
field(IPA.service_select_widget({
- 'name': 'service',
- 'label': 'Service',
- 'size': 20,
- 'undo': false
+ name: 'service',
+ label: 'Service',
+ size: 20,
+ undo: false
})).
field(IPA.text_widget({
- 'name': 'host',
- 'label': 'Host Name',
- 'size': 40,
- 'undo': false
+ name: 'host',
+ label: 'Host Name',
+ size: 40,
+ undo: false
})).
field(IPA.checkbox_widget({
name: 'force',
@@ -127,7 +129,7 @@ IPA.service_add_dialog = function (spec) {
};
-IPA.service_details_facet = function (spec) {
+IPA.service_details_facet = function(spec) {
spec = spec || {};
@@ -360,7 +362,7 @@ function service_certificate_status_widget(spec) {
return that;
}
-IPA.service_managedby_host_facet = function (spec) {
+IPA.service_managedby_host_facet = function(spec) {
spec = spec || {};
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 78a594680..1a2a94a0a 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -35,6 +35,7 @@ IPA.widget = function(spec) {
that.tooltip = spec.tooltip;
that.disabled = spec.disabled;
+ that.hidden = spec.hidden;
// read_only is set during initialization
that.read_only = spec.read_only;