feat(password): added a password reset page (and unused form), corrected the validation of the password changer, modified styles
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,48 +1,53 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Password change{% endblock %}
|
||||
|
||||
{% block main_block %}
|
||||
<div class="row col-md" id="change-form">
|
||||
<div class="col-md-8" id="change-form">
|
||||
<div class="col-md-auto">
|
||||
<h1>Password change</h1>
|
||||
<hr>
|
||||
<form method="post">
|
||||
{{ form.csrf_token() }}
|
||||
<div class="form-group">
|
||||
<div class="form-group mb-3">
|
||||
{{ form.username.label }}
|
||||
<div id="username-msg">
|
||||
The username can contain at most 64 characters and cannot contain one of the following characters : [*?!'^+%&/()=}{$#;,\"
|
||||
</div>
|
||||
{{ form.username(class="form-control") }}
|
||||
<small class="form-text" id="username-msg">
|
||||
The username can contain at most 64 characters and cannot contain one of the following characters :
|
||||
[*?!'^+%&/()=}{$#;,\"
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group mb-3">
|
||||
{{ form.currentpassword.label }}
|
||||
{{ form.currentpassword(class="form-control") }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group mb-3">
|
||||
{{ form.newpassword.label }}
|
||||
<div id="password-msg">
|
||||
The new password should contain at least :
|
||||
{{ form.newpassword(class="form-control") }}
|
||||
<small class="form-text" id="password-msg">
|
||||
The new password should at least contain the following:
|
||||
<ul>
|
||||
<li id="minlen">{{ form.minlength }} characters</li>
|
||||
<li id="digit">1 numeric digit [0-9]</li>
|
||||
<li id="lower">1 lowercase character [a-z]</li>
|
||||
<li id="upper">1 uppercase character [A-Z]</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ form.newpassword(class="form-control") }}
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group mb-3">
|
||||
{{ form.confirm_password.label }}
|
||||
<div id="confirm-msg">
|
||||
Passwords must match
|
||||
</div>
|
||||
{{ form.confirm_password(class="form-control") }}
|
||||
<small class="form-text" id="confirm-msg">
|
||||
Passwords must match
|
||||
</small>
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-group" style="text-align: center; margin-bottom: 0.40em" disabled=true>
|
||||
{{ form.submit(class="btn btn-primary")}}
|
||||
</div>
|
||||
{{ form.submit(class="btn btn-primary")}}
|
||||
<a class="btn btn-outline-danger" href="/password/reset">I forgot my password</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock main_block %}
|
||||
|
||||
{% block script_block %}
|
||||
<script defer src="/static/js/validate.js"></script>
|
||||
{% endblock script_block %}
|
||||
{% endblock script_block %}
|
||||
Reference in New Issue
Block a user