blob: c8d0b6a5440b263db7a536b12e33cdf5a52c0cd8 [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$s = schedules::get($_GET["id"]);
10
11if ($s === false) {
12 security::notFound();
13}
14?>
15
16<form action="doeditschedule.php" method="POST" autocomplete="off">
17 <input type="hidden" name="id" value="<?=(int)$s["id"]?>">
18 <h4 class="mdl-dialog__title">Editar horario</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="date" name="begins" id="begins" autocomplete="off" value="<?=security::htmlsafe(date("Y-m-d", $s["begins"]))?>" data-required>
22 <label class="mdl-textfield__label always-focused" for="begins">Fecha inicio de validez del horario</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="ends" id="ends" autocomplete="off" value="<?=security::htmlsafe(date("Y-m-d", $s["ends"]))?>" data-required>
27 <label class="mdl-textfield__label always-focused" for="ends">Fecha fin de validez del horario</label>
28 </div>
29 </div>
30 <div class="mdl-dialog__actions">
31 <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent">Confirmar</button>
32 <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button>
33 </div>
34</form>