blob: a31780ce68ac5cbeb7a02a8fd6b0f0cc3465d8e0 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
Adrià Vilanova Martínez5af86512023-12-02 20:44:16 +01002/*
3 * hores
4 * Copyright (c) 2023 Adrià Vilanova Martínez
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public
17 * License along with this program.
18 * If not, see http://www.gnu.org/licenses/.
19 */
20
Copybara botbe50d492023-11-30 00:16:42 +010021require_once(__DIR__."/../core.php");
22security::checkType(security::ADMIN, security::METHOD_NOTFOUND);
23
24if (!isset($_GET["id"])) {
25 security::notFound();
26}
27
28$t = incidents::getType($_GET["id"]);
29
30if ($t === false) {
31 security::notFound();
32}
33?>
34
35<form action="doeditincidenttype.php" method="POST" autocomplete="off">
36 <h4 class="mdl-dialog__title">Edita tipo de incidencia</h4>
37 <div class="mdl-dialog__content">
38 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
39 <input class="mdl-textfield__input" type="text" name="id" id="edit_id" value="<?=security::htmlsafe($t['id'])?>" readonly="readonly" autocomplete="off">
40 <label class="mdl-textfield__label" for="edit_id">ID</label>
41 </div>
42 <br>
43 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
44 <input class="mdl-textfield__input" type="text" name="name" id="e_name" value="<?=security::htmlsafe($t['name'])?>" autocomplete="off" data-required>
45 <label class="mdl-textfield__label" for="e_name">Nombre del tipo de incidencia</label>
46 </div>
47 <p>
48 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="e_present">
49 <input type="checkbox" id="e_present" name="present" value="1" class="mdl-switch__input" <?=($t["present"] ? " checked" : "")?>>
50 <span class="mdl-switch__label">Presente <i class="material-icons help" id="edit_present">help</i></span>
51 </label>
52 <div class="mdl-tooltip" for="edit_present">Márquese si el trabajador está físicamente presente en el espacio de trabajo durante la incidencia.</div>
53 </p>
54 <p>
55 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="e_paid">
56 <input type="checkbox" id="e_paid" name="paid" value="1" class="mdl-switch__input" <?=($t["paid"] ? " checked" : "")?>>
57 <span class="mdl-switch__label">Remunerada <i class="material-icons help" id="edit_paid">help</i></span>
58 </label>
59 <div class="mdl-tooltip" for="edit_paid">Márquese si el trabajador es remunerado las horas que dura la incidencia.</div>
60 </p>
61 <p>
62 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="e_workerfill">
63 <input type="checkbox" id="e_workerfill" name="workerfill" value="1" class="mdl-switch__input"<?=($t["workerfill"] ? " checked" : "")?>>
64 <span class="mdl-switch__label">Puede autorrellenarse <i class="material-icons help" id="edit_workerfill">help</i></span>
65 </label>
66 </p>
67 <div class="mdl-tooltip" for="edit_workerfill">Márquese si se permite que el trabajador pueda rellenar una incidencia de este tipo él mismo (con la posterior verificación por parte de un administrador).</div>
68 <p>
69 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="e_notifies">
70 <input type="checkbox" id="e_notifies" name="notifies" value="1" class="mdl-switch__input"<?=($t["notifies"] ? " checked" : "")?>>
71 <span class="mdl-switch__label">Notifica <i class="material-icons help" id="edit_notifies">help</i></span>
72 </label>
73 <div class="mdl-tooltip" for="edit_notifies">Márquese si la introducción de una incidencia de este tipo notifica por correo electrónico a las personas especificadas en la categoría del trabajador.</div>
74 </p>
75 <p>
76 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="e_autovalidates">
77 <input type="checkbox" id="e_autovalidates" name="autovalidates" value="1" class="mdl-switch__input"<?=($t["autovalidates"] ? " checked" : "")?>>
78 <span class="mdl-switch__label">Se autovalida <i class="material-icons help" id="edit_autovalidates">help</i></span>
79 </label>
80 <div class="mdl-tooltip" for="edit_autovalidates">Márquese si al introducir una incidencia de este tipo se quiere que se autovalide sin necesidad de ser validada posteriormente por el trabajador.</div>
81 </p>
82 <p>
83 <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="e_hidden">
84 <input type="checkbox" id="e_hidden" name="hidden" value="1" class="mdl-switch__input"<?=($t["hidden"] ? " checked" : "")?>>
85 <span class="mdl-switch__label">Oculto</span>
86 </label>
87 </p>
88 </div>
89 <div class="mdl-dialog__actions">
90 <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent">Confirmar</button>
91 <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button>
92 </div>
93</form>