blob: ceeeac3ce4e8f4a5ada341c389326e3e55202f88 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once(__DIR__."/../core.php");
3security::checkType(security::ADMIN, security::METHOD_NOTFOUND);
4
5if (!isset($_GET["id"])) {
6 security::notFound();
7}
8
9$id = (int)$_GET["id"];
10
11$incident = incidents::get($id);
12if ($incident === false) security::notFound();
13
14$status = incidents::getStatus($incident);
15if (!in_array($status, incidents::$canInvalidateStates)) security::notFound();
16?>
17
18<form action="doinvalidateincident.php" method="POST" autocomplete="off">
19 <input type="hidden" name="id" value="<?=(int)$id?>">
20 <?php visual::addContinueInput(); ?>
21 <h4 class="mdl-dialog__title">Invalidar incidencia</h4>
22 <div class="mdl-dialog__content">
23 <p>¿Estás seguro que quieres invalidar esta incidencia? <span style="color:#EF5350;font-weight:bold;">Esta acción es irreversible</span></p>
24 </div>
25 <div class="mdl-dialog__actions">
26 <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent">Invalidar</button>
27 <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button>
28 </div>
29</form>