Nuestro burocrata preferido: Sam Lowry https://lowry.sindominio.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lowry/tmpl/password.html

52 lines
2.0 KiB

5 years ago
{{template "header.html"}}
{{template "navbar.html" .}}
5 years ago
<div class="container">
<br />
{{if eq .Data "PassChanged"}}
<h1 class="row justify-content-center">La contraseña se ha actualizado.</h1>
5 years ago
{{else}}
<h1 class="row justify-content-center">Cambio de contraseña</h1>
5 years ago
<br />
<div class="row justify-content-center">
<form class="col-sm-4" id="needs-validation" action="/password/" method="post" novalidate>
<div class="form-group">
<label for="oldpass">Contraseña actual:</label>
<input type="password" class="form-control {{if eq .Data "WrongOldpass"}}is-invalid{{end}}" id="oldpass" name="oldpass" placeholder="Contraseña">
{{if eq .Data "WrongOldpass"}}<div class="invalid-feedback">Contraseña incorrecta.</div>{{end}}
</div>
<div class="form-group">
<label for="password">Nueva contraseña:</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Contraseña">
</div>
<div class="form-group">
<label for="password2">Repite la contraseña nueva:</label>
<input type="password" class="form-control {{if eq .Data "WrongPass"}}is-invalid{{end}}" id="password2" name="password2" placeholder="Contraseña">
<div class="invalid-feedback">No ha introducido la misma contraseña.</div>
</div>
<button type="submit" class="btn btn-primary">Cambiar</button>
</form>
5 years ago
</div>
{{end}}
5 years ago
</div>
<script>
(function() {
"use strict";
window.addEventListener("load", function() {
var form = document.getElementById("needs-validation");
form.addEventListener("submit", function(event) {
if (form.password.value !== form.password2.value) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add("was-validated");
}, false);
}, false);
}());
</script>
5 years ago
{{template "footer.html"}}