mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-05-07 22:42:21 +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">
|
||||
<?php if (is_adminuser() or $allowzoneadd === TRUE) { ?>
|
||||
<?php if ($allowzoneadd === TRUE) { ?>
|
||||
<div style="display: none;" id="ImportZone"></div>
|
||||
<?php } ?>
|
||||
<?php if (is_adminuser()) { ?>
|
||||
<div style="display: none;" id="CloneZone"></div>
|
||||
<?php } ?>
|
||||
<div class="tables" id="MasterZones">
|
||||
|
@ -503,7 +505,7 @@ $(document).ready(function () {
|
|||
hoverAnimationDuration: 60,
|
||||
hoverAnimationEasing: undefined,
|
||||
items: [
|
||||
<?php if (is_adminuser() or $allowzoneadd === TRUE) { ?>
|
||||
<?php if ($allowzoneadd === TRUE) { ?>
|
||||
{
|
||||
icon: 'jtable/lib/themes/metro/add.png',
|
||||
text: 'Import a new zone',
|
||||
|
@ -511,6 +513,8 @@ $(document).ready(function () {
|
|||
$('#ImportZone').jtable('showCreateForm');
|
||||
}
|
||||
},
|
||||
<?php } ?>
|
||||
<?php if (is_adminuser()) { ?>
|
||||
{
|
||||
icon: 'jtable/lib/themes/metro/add.png',
|
||||
text: 'Clone a zone',
|
||||
|
@ -887,7 +891,6 @@ $(document).ready(function () {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
$('#CloneZone').jtable({
|
||||
title: 'Clone zone',
|
||||
actions: {
|
||||
|
|
|
@ -546,6 +546,8 @@ case "formzonelist":
|
|||
usort($zones, "zone_compare");
|
||||
$ret = array();
|
||||
foreach ($zones as $zone) {
|
||||
if (!check_account($zone))
|
||||
continue;
|
||||
if ($zone['kind'] == 'Slave')
|
||||
continue;
|
||||
array_push($ret, array(
|
||||
|
|
Loading…
Add table
Reference in a new issue