blob: 2dc0dfce5cb2e90ed0d968aadcbbce8a7690dae4 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once(__DIR__."/../core.php");
3security::checkType(security::WORKER, security::METHOD_NOTFOUND);
4security::checkWorkerUIEnabled();
5
6if (!isset($_GET["id"])) {
7 security::notFound();
8}
9
10$id = (int)$_GET["id"];
11
12$record = registry::get($id);
13if ($record === false || $record["invalidated"] != 0) security::notFound();
14
15$isAdmin = security::isAllowed(security::ADMIN);
16if (!$isAdmin) registry::checkRecordIsFromPerson($record["id"]);
17?>
18
19<form action="doinvalidaterecord.php" method="POST" autocomplete="off">
20 <input type="hidden" name="id" value="<?=(int)$id?>">
21 <h4 class="mdl-dialog__title">Invalidar elemento del registro</h4>
22 <div class="mdl-dialog__content">
23 <p>¿Estás seguro que quieres eliminar este elemento del registro? <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>