Only superadmin can enable/disable a domain
This commit is contained in:
parent
8565a9b8a0
commit
392f46ef73
|
@ -38,7 +38,7 @@ if (!empty($_POST['delete'])) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['isactive'])) {
|
if (!empty($_POST['isactive']) && $server->isSuperAdmin()) {
|
||||||
$active = ($_POST['isactive'] == "TRUE") ? true : false;
|
$active = ($_POST['isactive'] == "TRUE") ? true : false;
|
||||||
try {
|
try {
|
||||||
$domain->update($active);
|
$domain->update($active);
|
||||||
|
@ -53,10 +53,12 @@ if (!empty($_POST['isactive'])) {
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<?php
|
<?php
|
||||||
print '<form name="update" method="post" action="admin.php?domain='.$domain->getName().'">';
|
print '<form name="update" method="post" action="admin.php?domain='.$domain->getName().'">';
|
||||||
if (!$domain->isactive()) {
|
if ($server->isSuperAdmin()) {
|
||||||
print '<button type="submit" name="isactive" value="TRUE" class="btn btn-primary">Activer le domaine</button> ';
|
if (!$domain->isactive()) {
|
||||||
} else {
|
print '<button type="submit" name="isactive" value="TRUE" class="btn btn-primary">Activer le domaine</button> ';
|
||||||
print '<button type="submit" name="isactive" value="FALSE" class="btn btn-primary">Désactiver le domaine</button> ';
|
} else {
|
||||||
|
print '<button type="submit" name="isactive" value="FALSE" class="btn btn-primary">Désactiver le domaine</button> ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="compte.php?domain=<?php print $domain->getName() ?>"><button type="button" class="btn btn-primary">Ajouter un nouveau compte</button></a>
|
<a href="compte.php?domain=<?php print $domain->getName() ?>"><button type="button" class="btn btn-primary">Ajouter un nouveau compte</button></a>
|
||||||
|
|
Loading…
Reference in a new issue