Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | require_once(__DIR__."/../core.php"); |
| 3 | security::checkType(security::ADMIN, security::METHOD_NOTFOUND); |
| 4 | |
| 5 | if (!isset($_GET["id"])) { |
| 6 | security::notFound(); |
| 7 | } |
| 8 | |
| 9 | $t = schedules::getTemplate($_GET["id"]); |
| 10 | |
| 11 | if ($t === false) { |
| 12 | security::notFound(); |
| 13 | } |
| 14 | ?> |
| 15 | |
| 16 | <form action="doeditscheduletemplate.php" method="POST" autocomplete="off"> |
| 17 | <input type="hidden" name="id" value="<?=(int)$t["id"]?>"> |
| 18 | <h4 class="mdl-dialog__title">Editar plantilla</h4> |
| 19 | <div class="mdl-dialog__content"> |
| 20 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> |
| 21 | <input class="mdl-textfield__input" type="text" name="name" id="name" autocomplete="off" value="<?=security::htmlsafe($t["name"])?>" data-required> |
| 22 | <label class="mdl-textfield__label" for="name">Nombre de la plantilla</label> |
| 23 | </div> |
| 24 | <br> |
| 25 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> |
| 26 | <input class="mdl-textfield__input" type="date" name="begins" id="begins" autocomplete="off" value="<?=security::htmlsafe(date("Y-m-d", $t["begins"]))?>" data-required> |
| 27 | <label class="mdl-textfield__label always-focused" for="begins">Fecha inicio de validez del horario</label> |
| 28 | </div> |
| 29 | <br> |
| 30 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> |
| 31 | <input class="mdl-textfield__input" type="date" name="ends" id="ends" autocomplete="off" value="<?=security::htmlsafe(date("Y-m-d", $t["ends"]))?>" data-required> |
| 32 | <label class="mdl-textfield__label always-focused" for="ends">Fecha fin de validez del horario</label> |
| 33 | </div> |
| 34 | </div> |
| 35 | <div class="mdl-dialog__actions"> |
| 36 | <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent">Confirmar</button> |
| 37 | <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button> |
| 38 | </div> |
| 39 | </form> |