Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ color:#000;
<spring:message code="label.form.title"></spring:message>
</h1>
<br>
<form action="/" method="POST" enctype="utf8" onsubmit="register()">
<form action="/" method="POST" enctype="utf8">
<div class="form-group row" >
<label class="col-sm-3"><spring:message code="label.user.firstName"></spring:message></label>
<span class="col-sm-5"><input class="form-control" name="firstName" value="" required/></span>
Expand Down Expand Up @@ -64,14 +64,36 @@ color:#000;

<script type="text/javascript">
$(document).ready(function () {
$('form').submit(function(event) {
register(event);
});

$('#password').keyup(function(){
if($("#password").val() != $("#matchPassword").val()){
$("#globalError").show().html("Password mismatch");
}
});

options = {
common: {minChar:8},
ui: {showVerdictsInsideProgressBar:true,showErrors:true}
ui: {
showVerdictsInsideProgressBar:true,
showErrors:true,
errorMessages:{
wordLength: "Your password is too short",
wordNotEmail: "Do not use your email as your password",
wordSequences: "Your password contains sequences",
wordLowercase: "Use lower case characters",
wordUppercase: "Use upper case characters",
wordOneNumber: "Use numbers",
wordOneSpecialChar: "Use special characters"
}
}
};
$('#password').pwstrength(options);
});

function register(){
function register(event){
event.preventDefault();
$(".alert").html("").hide();
$(".error-list").html("");
Expand Down