|
|
@@ -8,9 +8,21 @@ if(core::ifGet("add")) {
|
|
|
$submit = "Modifier ce tirage au sort";
|
|
|
$id_form = '<input type="hidden" name="id" value="' . $lottery["id"] . '">';
|
|
|
}
|
|
|
-
|
|
|
+ if(isset($lottery["id"]) AND $lottery["sortDate"] == NULL){
|
|
|
?>
|
|
|
-
|
|
|
+ <div style="float:right; margin-top: -60px;">
|
|
|
+ <a href="/submit.php?from=lottery-delete&id=<?php echo $lottery["id"] ?>" style="color: #dc3545; text-decoration:none;" onclick="return confirm('Voulez-vous supprimer ce tirage au sort ?')"><button type="submit" class="btn btn-outline-danger btn-sm"><span data-feather="trash-2"></span> Supprimer</button></a>
|
|
|
+ </div>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ if(isset($lottery["id"]) AND $lottery["sortDate"] != NULL){
|
|
|
+ ?>
|
|
|
+ <div style="float:right; margin-top: -60px;">
|
|
|
+ <button class="btn btn-outline-secondary btn-sm" onclick="alert('Ce tirage au sort ne peut plus être supprimé car il a déjà été réalisé.')" >Ce tirage au sort est vérouillé</button>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
<br />
|
|
|
|
|
|
<form method="post" action="/submit.php">
|