blob: ef1d23225cfe1922565ee79d1490b26e35e92e4d [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("core.php");
22security::checkType(security::WORKER);
23
24$id = people::userData("id");
25
26$allowedMethods = validations::getAllowedMethods();
27?>
28<!DOCTYPE html>
29<html>
30<head>
31 <title><?php echo $conf["appName"]; ?></title>
32 <?php visual::includeHead(); ?>
33 <link rel="stylesheet" href="css/dashboard.css">
34 <link rel="stylesheet" href="css/incidents.css">
35</head>
36<?php visual::printBodyTag(); ?>
37 <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--fixed-drawer">
38 <?php visual::includeNav(); ?>
39 <main class="mdl-layout__content">
40 <div class="page-content">
41 <div class="main mdl-shadow--4dp">
42 <h2>Validación</h2>
43 <div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
44 <div class="mdl-tabs__tab-bar">
45 <?php
46 foreach ($allowedMethods as $method) {
47 echo '<a href="#method'.security::htmlsafe(validations::$methodCodename[$method]).'" class="mdl-tabs__tab'.($method == $conf["validation"]["defaultMethod"] ? " is-active" : "").'">'.security::htmlsafe(validations::$methodName[$method]).'</a>';
48 }
49 ?>
50 </div>
51 <?php
52 foreach ($allowedMethods as $method) {
53 echo '<div class="mdl-tabs__panel'.($method == $conf["validation"]["defaultMethod"] ? " is-active" : "").'" id="method'.security::htmlsafe(validations::$methodCodename[$method]).'">';
54 validationsView::renderChallengeInstructions($method);
55 echo '</a>';
56 }
57 ?>
58 </div>
59 </div>
60 </div>
61 </main>
62 </div>
63</body>
64</html>