blob: fd1d1ee024cf0f31b64d1f62a6585cccaf2c4b35 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once("core.php");
3security::checkType(security::WORKER);
4security::checkWorkerUIEnabled();
5
6if (secondFactor::isAvailable()) $mdHeaderRowBefore = visual::backBtn("security.php");
7?>
8<!DOCTYPE html>
9<html>
10<head>
11 <title><?php echo $conf["appName"]; ?></title>
12 <?php visual::includeHead(); ?>
13 <link rel="stylesheet" href="css/dashboard.css">
14</head>
15<?php visual::printBodyTag(); ?>
16 <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--fixed-drawer">
17 <?php visual::includeNav(); ?>
18 <main class="mdl-layout__content">
19 <div class="page-content">
20 <div class="main mdl-shadow--4dp">
21 <h2>Cambiar contraseña</h2>
22 <form action="dochangepassword.php" method="POST">
23 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
24 <input class="mdl-textfield__input" type="password" name="oldpassword" id="oldpassword" data-required>
25 <label class="mdl-textfield__label" for="oldpassword">Contraseña actual</label>
26 </div>
27 <br>
28 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
29 <input class="mdl-textfield__input" type="password" name="newpassword" id="newpassword" data-required>
30 <label class="mdl-textfield__label" for="newpassword">Nueva contraseña</label>
31 </div>
32 <p class="mdl-color-text--grey-600"><?=security::htmlsafe(security::$passwordHelperText)?></p>
33
34 <p><button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">Cambiar contraseña</button></p>
35 </form>
36 </div>
37 </div>
38 </main>
39 </div>
40
41 <?php
42 visual::smartSnackbar([
43 ["wrong", "Ha ocurrido un error intentando cambiar la contraseña. Asegúrate de que has introducido correctamente la contraseña actual."]
44 ]);
45 ?>
46</body>
47</html>