Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | <?php |
| 2 | require_once(__DIR__."/../core.php"); |
| 3 | security::checkType(security::WORKER, security::METHOD_NOTFOUND); |
| 4 | security::checkWorkerUIEnabled(); |
| 5 | secondFactor::checkAvailability(); |
| 6 | |
| 7 | if (!isset($_GET["id"])) security::notFound(); |
| 8 | $id = (int)$_GET["id"]; |
| 9 | |
| 10 | $s = secondFactor::getSecurityKeyById($id); |
| 11 | if ($s === false || people::userData("id") != $s["person"]) security::notFound(); |
| 12 | ?> |
| 13 | |
| 14 | <form action="dodeletesecuritykey.php" method="POST" autocomplete="off"> |
| 15 | <input type="hidden" name="id" value="<?=(int)$s["id"]?>"> |
| 16 | <h4 class="mdl-dialog__title">Eliminar llave de seguridad</h4> |
| 17 | <div class="mdl-dialog__content"> |
| 18 | <p>¿Estás seguro que quieres eliminar la llave de seguridad <b><?=security::htmlsafe($s["name"])?></b>? <span style="color:#EF5350;font-weight:bold;">Una vez la elimines no tendrás la opción de escogerla como segundo factor.</span></p> |
| 19 | </div> |
| 20 | <div class="mdl-dialog__actions"> |
| 21 | <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent">Eliminar</button> |
| 22 | <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button> |
| 23 | </div> |
| 24 | </form> |