blob: a5b9fce8cfc9576f93bd0bd6b33f1bbd9ae1228c [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once("core.php");
3security::checkType(security::HYPERADMIN);
4
5$mdHeaderRowBefore = visual::backBtn("powertools.php");
6?>
7<!DOCTYPE html>
8<html>
9<head>
10 <title><?php echo $conf["appName"]; ?></title>
11 <?php visual::includeHead(); ?>
12 <link rel="stylesheet" href="css/dashboard.css">
13</head>
14<?php visual::printBodyTag(); ?>
15 <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--fixed-drawer">
16 <?php visual::includeNav(); ?>
17 <main class="mdl-layout__content">
18 <div class="page-content">
19 <div class="main mdl-shadow--4dp">
20 <h2>Enviar enlaces para generar contraseña</h2>
21 <p>Selecciona las personas a las que quieres enviar un correo para que puedan establecer su contraseña:</p>
22 <form action="dosendbulkpasswords.php" method="POST">
23 <div class="overflow-wrapper overflow-wrapper--for-table">
24 <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
25 <thead>
26 <tr>
27 <?php
28 if ($conf["debug"]) {
29 ?>
30 <th class="extra">ID</th>
31 <?php
32 }
33 ?>
34 <th class="mdl-data-table__cell--non-numeric">Nombre</th>
35 <th class="mdl-data-table__cell--non-numeric extra">Categoría</th>
36 </tr>
37 </thead>
38 <tbody>
39 <?php
40 $people = people::getAll();
41 foreach ($people as $p) {
42 ?>
43 <tr data-person-id="<?=(int)$p["id"]?>">
44 <?php
45 if ($conf["debug"]) {
46 ?>
47 <td class="extra"><?=(int)$p["id"]?></td>
48 <?php
49 }
50 ?>
51 <td class="mdl-data-table__cell--non-numeric"><?=security::htmlsafe($p["name"])?></td>
52 <td class="mdl-data-table__cell--non-numeric extra"><?=security::htmlsafe($p["category"])?></td>
53 </tr>
54 <?php
55 }
56 ?>
57 </tbody>
58 </table>
59 </div>
60
61 <br>
62 <button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent mdl-js-ripple-effect">Enviar</button>
63 </form>
64 </div>
65 </div>
66 </main>
67 </div>
68
69 <?php
70 visual::smartSnackbar([
71 ["empty", "Faltan datos por introducir en el formulario."],
72 ["unexpected", "Ha ocurrido un error inesperado. Inténtelo de nuevo en unos segundos."]
73 ]);
74 ?>
75 <script src="js/sendbulkpasswords.js"></script>
76</body>
77</html>