Merge pull request #183 from Doha2012/master

fix client side issues
This commit is contained in:
Eugen 2015-04-02 20:52:37 +03:00
commit 51cbb0f14e
1 changed files with 25 additions and 3 deletions

View File

@ -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>
@ -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("");