mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-05-10 23:03:57 +03:00
Merge pull request #203 from WilliamDEdwards/fix/make-clone-admin-only
Make cloning admin-only, check zones returned by formzonelist
This commit is contained in:
commit
39050cd015
2 changed files with 8 additions and 3 deletions
|
@ -181,8 +181,10 @@ if ($blocklogin === TRUE) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="zones">
|
<div id="zones">
|
||||||
<?php if (is_adminuser() or $allowzoneadd === TRUE) { ?>
|
<?php if ($allowzoneadd === TRUE) { ?>
|
||||||
<div style="display: none;" id="ImportZone"></div>
|
<div style="display: none;" id="ImportZone"></div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (is_adminuser()) { ?>
|
||||||
<div style="display: none;" id="CloneZone"></div>
|
<div style="display: none;" id="CloneZone"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="tables" id="MasterZones">
|
<div class="tables" id="MasterZones">
|
||||||
|
@ -503,7 +505,7 @@ $(document).ready(function () {
|
||||||
hoverAnimationDuration: 60,
|
hoverAnimationDuration: 60,
|
||||||
hoverAnimationEasing: undefined,
|
hoverAnimationEasing: undefined,
|
||||||
items: [
|
items: [
|
||||||
<?php if (is_adminuser() or $allowzoneadd === TRUE) { ?>
|
<?php if ($allowzoneadd === TRUE) { ?>
|
||||||
{
|
{
|
||||||
icon: 'jtable/lib/themes/metro/add.png',
|
icon: 'jtable/lib/themes/metro/add.png',
|
||||||
text: 'Import a new zone',
|
text: 'Import a new zone',
|
||||||
|
@ -511,6 +513,8 @@ $(document).ready(function () {
|
||||||
$('#ImportZone').jtable('showCreateForm');
|
$('#ImportZone').jtable('showCreateForm');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (is_adminuser()) { ?>
|
||||||
{
|
{
|
||||||
icon: 'jtable/lib/themes/metro/add.png',
|
icon: 'jtable/lib/themes/metro/add.png',
|
||||||
text: 'Clone a zone',
|
text: 'Clone a zone',
|
||||||
|
@ -887,7 +891,6 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#CloneZone').jtable({
|
$('#CloneZone').jtable({
|
||||||
title: 'Clone zone',
|
title: 'Clone zone',
|
||||||
actions: {
|
actions: {
|
||||||
|
|
|
@ -546,6 +546,8 @@ case "formzonelist":
|
||||||
usort($zones, "zone_compare");
|
usort($zones, "zone_compare");
|
||||||
$ret = array();
|
$ret = array();
|
||||||
foreach ($zones as $zone) {
|
foreach ($zones as $zone) {
|
||||||
|
if (!check_account($zone))
|
||||||
|
continue;
|
||||||
if ($zone['kind'] == 'Slave')
|
if ($zone['kind'] == 'Slave')
|
||||||
continue;
|
continue;
|
||||||
array_push($ret, array(
|
array_push($ret, array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue