tracman-server/views/password.html

61 lines
2.2 KiB
HTML
Executable File

{% extends 'templates/base.html' %}
{% block title %}{{super()}} | Set Password{% endblock %}
{% block head %}
{{super()}}
<link rel="stylesheet" type="text/css" href="/static/css/.form.min.css">
<link rel="stylesheet" type="text/css" href="/static/css/.settings.min.css">
{% endblock %}
{% block javascript %}
{{super()}}
<script type="application/javascript" src="/static/js/lib/.zxcvbn.min.js"></script>
<script type="application/javascript" src="/static/js/.password.min.js"></script>
{% endblock %}
{% block main %}
<section class='container'>
<h1>Set Password</h1>
<form id='password-form' role="form" method="post">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<style>
#password-form .password {
flex-grow: 1;
min-width: 0;
margin: 2%;
}
#password-help {
display: none;
}
.form-group > span {
display: flex;
flex-wrap: wrap;
}
</style>
<p>Your password must be at least 8 characters long. You can use any letter, number, symbol, emoji, or spaces. Your password will be checked using <a href="https://github.com/dropbox/zxcvbn">zxcvbn</a>. All passwords are stored on the server as salted hashes. </p>
<div class='form-group' style="flex-wrap:wrap">
<span title="Enter your new password here" style="flex-grow:1; max-width:70vw">
<input id='p1' class='form-control password' name="password" type="password" placeholder="enter password" minlength="8" maxlength="160">
<input id='p2' class='form-control password' name="repassword" type="password" placeholder="retype password" minlength="8" maxlength="160">
</span>
<span title="Show your passwords if nobody's looking over your shoulder. " style="margin:auto">
<input id='show' name="show" type="checkbox" style="margin:8px auto">
<label for="show" style="width:100%; text-align:center;">show</label>
</span>
</div>
<p id='password-help' title="Your passwords are checked using zxcvbn. "></p>
<div id='submit-group' class='form-group flexbox' style="justify-content:space-around">
<input id='submit' class='btn main' style="min-width:50%" type="submit" value="Save" title="You need to enter a password first. " disabled>
</div>
</form>
</section>
{% endblock %}