summaryrefslogtreecommitdiffstats
path: root/install/ui/webui.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-01-25 21:58:49 -0500
committerAdam Young <ayoung@redhat.com>2011-01-26 10:07:21 -0500
commitdcb796df6e92b71ba22667f13b7801014f63e07e (patch)
tree0f6afa151f747ce54223253060fa0246c7921f8a /install/ui/webui.js
parentaa61337221ccef261dc483192e6acb3276e8cbee (diff)
downloadfreeipa-dcb796df6e92b71ba22667f13b7801014f63e07e.tar.gz
freeipa-dcb796df6e92b71ba22667f13b7801014f63e07e.tar.xz
freeipa-dcb796df6e92b71ba22667f13b7801014f63e07e.zip
dns visible if enabled
use the result of the is_dns_enabled command to show or hid the dns tab Also, Javascript lint cleanup from recent patches.
Diffstat (limited to 'install/ui/webui.js')
-rw-r--r--install/ui/webui.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/install/ui/webui.js b/install/ui/webui.js
index b1097f63a..f5b77c851 100644
--- a/install/ui/webui.js
+++ b/install/ui/webui.js
@@ -27,7 +27,7 @@
IPA.admin_tab_set = function () {
- return [
+ var tabset = [
{name:'identity', label: IPA.messages.tabs.identity, children:[
{name:'user', entity:'user'},
{name:'group', entity:'group'},
@@ -37,7 +37,6 @@ IPA.admin_tab_set = function () {
{name:'service', entity:'service'}
]},
{name:'policy', label: IPA.messages.tabs.policy, children:[
- {name:'dnszone', entity:'dnszone'},
{name:'hbacrule', label: IPA.messages.tabs.hbac ,
entity:'hbacrule', children:[
{name:'hbacsvc', entity:'hbacsvc'},
@@ -60,6 +59,14 @@ IPA.admin_tab_set = function () {
{name:'delegation' ,entity:'delegation'},
{name:'config', entity:'config'}
]}];
+
+ if (IPA.dns_enabled){
+ tabset[1].children.unshift(
+ {name:'dnszone', entity:'dnszone'}
+ );
+ }
+
+ return tabset;
};
IPA.self_serv_tab_set = function(){
@@ -139,7 +146,7 @@ $(function() {
IPA.tab_set = IPA.admin_tab_set();
nav_create(IPA.tab_set, navigation, 'tabs');
} else {
- IPA.tab_set = self_serv_tab_set();
+ IPA.tab_set = IPA.self_serv_tab_set();
nav_create(IPA.tab_set, navigation, 'tabs');
var state = {'user-pkey':IPA.whoami_pkey ,