Fixed password page formatting

master
Keith Irwin 2017-04-15 10:48:56 -04:00
parent 1293269429
commit 0793c44a6a
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
2 changed files with 18 additions and 7 deletions

View File

@ -49,8 +49,12 @@ $(function(){
$('#password-help').text("That's is one of the world's most commonly used passwords. You may not use it for Tracman and should not use it anywhere. ").css({'color':'#fb6e3d'});
$('#submit').prop('disabled',true).prop('title',"You need to come up with a better password. ");
}
else if (daysToCrack<1) {
$('#password-help').text("That password is pretty bad. It could be cracked in less than a day. Try adding more words, numbers, or symbols. ").css({'color':'#fb6e3d'});
$('#submit').prop('disabled',true).prop('title',"You need to come up with a better password. ");
}
else if (daysToCrack<10) {
$('#password-help').text("That password isn't good enough. It could be cracked in "+daysToCrack+" day"+(daysToCrack!=1?'s':'')+". Try something a little longer or more complex. ").css({'color':'#fb6e3d'});
$('#password-help').text("That password isn't good enough. It could be cracked in "+daysToCrack+" day"+(daysToCrack!=1?'s':'')+". Try adding another word, number, or symbol. ").css({'color':'#fb6e3d'});
$('#submit').prop('disabled',true).prop('title',"You need to come up with a better password. ");
}

View File

@ -14,22 +14,29 @@
<form id='password-form' role="form" method="post">
<style>
#password-form .password {
min-width: 40%;
margin-bottom: 2%;
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 stored as a salted hash on the server. </p>
<div class='form-group' style="flex-wrap:wrap">
<input id='p1' class='form-control password' name="password" type="password" placeholder="enter password" title="Type your new password here" minlength="8" maxlength="160">
<input id='p2' class='form-control password' name="repassword" type="password" placeholder="retype password" title="Retype your new password here" minlength="8" maxlength="160">
<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">
<label for="show">show</label>
<input id='show' name="show" type="checkbox" style="margin:8px auto">
<label for="show" style="width:100%; text-align:center;">show</label>
</span>
</div>