Skip to content

Commit cc15e4a

Browse files
committed
Disable WebUI header menu WEB, DNS, MAIL, DB, CRON, BACKUP if they are set "0" in the package.
1 parent 1820107 commit cc15e4a

File tree

2 files changed

+63
-2
lines changed

2 files changed

+63
-2
lines changed

web/css/styles.min.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,19 @@ input[type="checkbox"] {
993993
margin-right: -8px;
994994
}
995995

996+
.l-stat__col a.disabled {
997+
cursor: default;
998+
text-decoration: none;
999+
}
1000+
1001+
.l-stat__col a.disabled:hover {
1002+
border: none;
1003+
}
1004+
1005+
.l-stat__col a.disabled .l-stat__col-title, .l-stat__col a.disabled li {
1006+
color: #e0e0e0;
1007+
}
1008+
9961009
.l-separator.selected,
9971010
.l-separator {
9981011
height: 1px;
@@ -2512,7 +2525,7 @@ label:hover {
25122525
}
25132526

25142527
.vst-list.flat {
2515-
border: 1px solid #fff;
2528+
border: 1px solid #fff;
25162529
color: #2c9491;
25172530
text-transform: uppercase;
25182531
font-weight: bold;

web/templates/scripts.html

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,54 @@
1515
});
1616
</script>
1717

18+
<?php if($panel[$user]['WEB_DOMAINS'] == "0") { ?>
19+
<script>
20+
$('a[href^="/list/web"]').addClass('disabled').click(function() {
21+
return false;
22+
});
23+
</script>
24+
<?php } ?>
25+
26+
<?php if($panel[$user]['DNS_DOMAINS'] == "0") { ?>
27+
<script>
28+
$('a[href^="/list/dns"]').addClass('disabled').click(function() {
29+
return false;
30+
});
31+
</script>
32+
<?php } ?>
33+
34+
<?php if($panel[$user]['MAIL_DOMAINS'] == "0") { ?>
35+
<script>
36+
$('a[href^="/list/mail"]').addClass('disabled').click(function() {
37+
return false;
38+
});
39+
</script>
40+
<?php } ?>
41+
42+
<?php if($panel[$user]['DATABASES'] == "0") { ?>
43+
<script>
44+
$('a[href^="/list/db"]').addClass('disabled').click(function() {
45+
return false;
46+
});
47+
</script>
48+
<?php } ?>
49+
50+
<?php if($panel[$user]['CRON_JOBS'] == "0") { ?>
51+
<script>
52+
$('a[href^="/list/cron"]').addClass('disabled').click(function() {
53+
return false;
54+
});
55+
</script>
56+
<?php } ?>
57+
58+
<?php if($panel[$user]['BACKUPS'] == "0") { ?>
59+
<script>
60+
$('a[href^="/list/backup"]').addClass('disabled').click(function() {
61+
return false;
62+
});
63+
</script>
64+
<?php } ?>
65+
1866
<?php
1967
// Dialogs
2068
// todo: display all the dialogs?
@@ -68,4 +116,4 @@
68116
<?php
69117
unset($_SESSION['error_msg']);
70118
endif;
71-
?>
119+
?>

0 commit comments

Comments
 (0)