update ui

This commit is contained in:
DOHA 2015-04-01 21:21:46 +02:00
parent 5ab6b9e611
commit 2ebf9bea07
16 changed files with 342 additions and 243 deletions

View File

@ -1,29 +1,34 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<div class="container">
<div class="span12">
<sec:authorize ifNotGranted="WRITE_PRIVILEGE">
<spring:message code="message.unauth"></spring:message>
</sec:authorize>
<sec:authorize ifAnyGranted="WRITE_PRIVILEGE">
<H1>
<spring:message code="label.pages.admin.message"></spring:message>
</H1>
</sec:authorize>
<a href="<c:url value="/j_spring_security_logout" />"><spring:message
code="label.pages.logout"></spring:message></a> <a
href="<c:url value="/home.html" />"><spring:message
code="label.pages.home.title"></spring:message></a>
</div>
</div>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
</ul>
</div>
</nav>
<div class="container">
<sec:authorize ifNotGranted="WRITE_PRIVILEGE">
<spring:message code="message.unauth"></spring:message>
</sec:authorize>
<sec:authorize ifAnyGranted="WRITE_PRIVILEGE">
<h1>
<spring:message code="label.pages.admin.message"></spring:message>
</h1>
</sec:authorize>
</div>
</body>
</html>
</html>

View File

@ -1,38 +1,37 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="messages" />
<%@ page session="true"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<title><spring:message
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message
code="label.badUser.title"></spring:message></title>
</head>
<body>
<h1>
<div class="alert alert-error">
${param.message}
<div class="container">
<h1 class="alert alert-danger">
${param.message}
</h1>
<br>
<a href="<c:url value="/registration.html" />"><spring:message
<a class="btn btn-default" href="<c:url value="/registration.html" />"><spring:message
code="label.form.loginSignUp"></spring:message></a>
<c:if test="${param.expired}">
<br>
<h1>${label.form.resendRegistrationToken}</h1>
<button onclick="resendToken()">
<spring:message code="label.form.resendRegistrationToken"></spring:message>
<spring:message code="label.form.resendRegistrationToken"></spring:message>
</button>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript">
function resendToken(){
$.get("<c:url value="/user/resendRegistrationToken"><c:param name="token" value="${param.token}"/></c:url>", function(data){
window.location.href = "<c:url value="/login.html"></c:url>" + "?message=" + data.message;
$.get("<c:url value="/user/resendRegistrationToken"><c:param name="token" value="${param.token}"/></c:url>", function(data){
window.location.href = "<c:url value="/login.html"></c:url>" + "?message=" + data.message;
})
.fail(function(data) {
if(data.responseJSON.error.indexOf("MailError") > -1)
@ -50,5 +49,6 @@ $(document).ajaxStart(function() {
});
</script>
</c:if>
</div>
</body>
</html>

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
<%@ page session="false"%>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><spring:message code="message.changePassword"></spring:message></title>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="#"><spring:message code="label.pages.home.title"></spring:message></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
</ul>
</div>
</nav>
<div class="container">
<div class="row">
<div id="errormsg" class="alert alert-danger" style="display:none"></div>
<h1> <spring:message code="message.changePassword"></spring:message> </h1>
<div >
<br>
<label class="col-sm-2"><spring:message code="label.user.oldPassword"></spring:message></label>
<span class="col-sm-5"><input class="form-control" id="oldpass" name="oldpassword" type="password" value="" /></span>
<span class="col-sm-5"></span>
<br><br>
<label class="col-sm-2"><spring:message code="label.user.newPassword"></spring:message></label>
<span class="col-sm-5"><input class="form-control" id="pass" name="password" type="password" value="" /></span>
<span class="col-sm-5"></span>
<br><br>
<label class="col-sm-2"><spring:message code="label.user.confirmPass"></spring:message></label>
<span class="col-sm-5"><input class="form-control" id="passConfirm" type="password" value="" /></span>
<span id="error" class="alert alert-danger" style="display:none"><spring:message code="PasswordMatches.user"></spring:message></span>
<br><br>
<button class="btn btn-primary" type="submit" onclick="savePass()">
<spring:message code="message.changePassword"></spring:message>
</button>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript">
function savePass(){
var pass = $("#pass").val();
var valid = pass == $("#passConfirm").val();
if(!valid) {
$("#error").show();
return;
}
$.post("<c:url value="/user/updatePassword"></c:url>",{password: pass, oldpassword: $("#oldpass").val()} ,function(data){
window.location.href = "<c:url value="/console.html"></c:url>" + "?message="+data.message;
})
.fail(function(data) {
$("#errormsg").show().html(data.responseJSON.message);
});
}
</script>
</body>
</html>

View File

@ -1,29 +1,42 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="span12">
<h1>This is the landing page for the admin</h1>
<sec:authorize access="hasRole('READ_PRIVILEGE')">
This text is only visible to a user
<br />
</sec:authorize>
<sec:authorize access="hasRole('WRITE_PRIVILEGE')">
This text is only visible to an admin
<br />
</sec:authorize>
<a href="<c:url value="/j_spring_security_logout" />"><spring:message
code="label.pages.logout"></spring:message></a> <a
href="<c:url value="/admin.html" />"><spring:message
code="label.pages.admin"></spring:message></a>
</div>
</div>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
</ul>
</div>
</nav>
<div class="container">
<c:if test="${param.message != null}">
<div class="alert alert-info">
${param.message}
</div>
</c:if>
<h1>This is the landing page for the admin</h1>
<sec:authorize access="hasRole('READ_PRIVILEGE')">
This text is only visible to a user
<br />
</sec:authorize>
<sec:authorize access="hasRole('WRITE_PRIVILEGE')">
This text is only visible to an admin
<br />
</sec:authorize>
<a class="btn btn-default" href="<c:url value="/changePassword.html" />"><spring:message code="message.changePassword"></spring:message></a>
<a class="btn btn-default" href="<c:url value="/admin.html" />"><spring:message code="label.pages.admin"></spring:message></a>
</div>
</body>
</html>

View File

@ -2,18 +2,16 @@
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<div class="container">
<div class="span12">
<h1 class="alert alert-error">
<spring:message code="message.email.config.error"></spring:message>
</h1>
</div>
</div>
<div class="container">
<h1 class="alert alert-danger">
<spring:message code="message.email.config.error"></spring:message>
</h1>
</div>
</body>
</html>
</html>

View File

@ -1,6 +1,6 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="messages" />
@ -8,16 +8,17 @@
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<title><spring:message code="label.pages.home.title"></spring:message></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<h1>
<div class="container">
<h1 class="alert alert-info">
<spring:message code="auth.message.expired"></spring:message>
</h1>
<br>
<a href="<c:url value="/registration.html" />"><spring:message
<a class="btn btn-default" href="<c:url value="registration.html" />"><spring:message
code="label.form.loginSignUp"></spring:message></a>
</div>
</body>
</html>

View File

@ -4,41 +4,30 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@ page session="false"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><spring:message code="message.resetPassword"></spring:message></title>
</head>
<body>
<div class="container">
<div class="span12">
<h1>
<spring:message code="message.resetPassword"></spring:message>
</h1>
<div>
<br>
<tr>
<td><label><spring:message code="label.user.email"></spring:message></label></td>
<td><input id="email" name="email" type="email" value="" /></td>
</tr>
<button class="btn btn-primary" type="submit" onclick="resetPass()">
<spring:message code="message.resetPassword"></spring:message>
</button>
<h1><spring:message code="message.resetPassword"></spring:message></h1>
<br>
<div class="row">
<label class="col-sm-1"><spring:message code="label.user.email"></spring:message></label>
<span class="col-sm-5"><input class="form-control" id="email" name="email" type="email" value="" /></span>
<button class="btn btn-primary" type="submit" onclick="resetPass()"><spring:message code="message.resetPassword"></spring:message></button>
</div>
<br>
<a href="<c:url value="/registration.html" />"><spring:message code="label.form.loginSignUp"></spring:message></a>
<br>
<a href="<c:url value="login.html" />"><spring:message code="label.form.loginLink"></spring:message></a>
<a class="btn btn-default" href="<c:url value="registration.html" />"><spring:message code="label.form.loginSignUp"></spring:message></a>
<br><br>
<a class="btn btn-default" href="<c:url value="login.html" />"><spring:message code="label.form.loginLink"></spring:message></a>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript">
function resetPass(){

View File

@ -4,19 +4,26 @@
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<div class="container">
<div class="span12">
<h1>
<spring:message code="label.pages.home.message"></spring:message>
</h1>
<a href="<c:url value="/j_spring_security_logout" />"><spring:message
code="label.pages.logout"></spring:message></a>
</div>
</div>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="#"><spring:message code="label.pages.home.title"></spring:message></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
</ul>
</div>
</nav>
<div class="container">
<h1>
<spring:message code="label.pages.home.message"></spring:message>
</h1>
</div>
</body>
</html>

View File

@ -1,35 +1,38 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ page session="true"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
</ul>
</div>
</nav>
<div class="container">
<div class="span12">
<sec:authorize access="hasRole('READ_PRIVILEGE')">
<spring:message code="label.pages.user.message"></spring:message>
<br />
</sec:authorize>
<div class="container">
<sec:authorize access="hasRole('READ_PRIVILEGE')">
<spring:message code="label.pages.user.message"></spring:message>
<br />
</sec:authorize>
<sec:authorize access="hasRole('WRITE_PRIVILEGE')">
<spring:message code="label.pages.admin.message"></spring:message>
<br />
</sec:authorize>
${param.user}
<a href="<c:url value="/j_spring_security_logout" />"><spring:message
code="label.pages.logout"></spring:message></a> <a
href="<c:url value="/home.html" />"><spring:message
code="label.pages.home.title"></spring:message></a> <a
href="<c:url value="/admin.html" />"><spring:message
code="label.pages.admin"></spring:message></a>
</div>
</div>
<sec:authorize access="hasRole('WRITE_PRIVILEGE')">
<spring:message code="label.pages.admin.message"></spring:message>
<br />
</sec:authorize>
${param.user}
<a class="btn btn-default" href="<c:url value="/admin.html" />"><spring:message code="label.pages.admin"></spring:message></a>
</div>
</body>
</html>

View File

@ -2,19 +2,17 @@
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<div class="container">
<div class="span12">
<h1 class="alert alert-error">
<spring:message code="message.sessionExpired"></spring:message>
</h1>
<a href="<c:url value="login.html" />"><spring:message
code="label.form.loginLink"></spring:message></a>
</div>
</div>
<div class="container">
<h1 class="alert alert-danger">
<spring:message code="message.sessionExpired"></spring:message>
</h1>
<a class="btn btn-primary" href="<c:url value="login.html" />"><spring:message
code="label.form.loginLink"></spring:message></a>
</div>
</body>
</html>
</html>

View File

@ -1,6 +1,6 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="messages" />
@ -8,58 +8,62 @@
<fmt:message key="message.password" var="noPass" />
<fmt:message key="message.username" var="noUser" />
<c:if test="${param.error != null}">
<c:choose>
<c:when
test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User is disabled'}">
<div class="alert alert-error">
<spring:message code="auth.message.disabled"></spring:message>
</div>
</c:when>
<c:when
test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User account has expired'}">
<div class="alert alert-error">
<spring:message code="auth.message.expired"></spring:message>
</div>
</c:when>
<c:when
<c:choose>
<c:when
test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User is disabled'}">
<div class="alert alert-danger">
<spring:message code="auth.message.disabled"></spring:message>
</div>
</c:when>
<c:when
test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'User account has expired'}">
<div class="alert alert-danger">
<spring:message code="auth.message.expired"></spring:message>
</div>
</c:when>
<c:when
test="${SPRING_SECURITY_LAST_EXCEPTION.message == 'blocked'}">
<div class="alert alert-error">
<div class="alert alert-danger">
<spring:message code="auth.message.blocked"></spring:message>
</div>
</c:when>
<c:otherwise>
<div class="alert alert-error">
<!-- <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/> -->
<spring:message code="message.badCredentials"></spring:message>
</div>
</c:otherwise>
</c:choose>
<c:otherwise>
<div class="alert alert-danger">
<!-- <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/> -->
<spring:message code="message.badCredentials"></spring:message>
</div>
</c:otherwise>
</c:choose>
</c:if>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<title><spring:message code="label.pages.home.title"></spring:message></title>
<script type="text/javascript">
function validate() {
if (document.f.j_username.value == ""
&& document.f.j_password.value == "") {
alert("${noUser} & ${noPass}");
document.f.j_username.focus();
return false;
}
if (document.f.j_username.value == "") {
alert("${noUser}");
document.f.j_username.focus();
return false;
}
if (document.f.j_password.value == "") {
alert("${noPass}");
document.f.j_password.focus();
return false;
}
}
function validate() {
if (document.f.j_username.value == ""
&& document.f.j_password.value == "") {
alert("${noUser} & ${noPass}");
document.f.j_username.focus();
return false;
}
if (document.f.j_username.value == "") {
alert("${noUser}");
document.f.j_username.focus();
return false;
}
if (document.f.j_password.value == "") {
alert("${noPass}");
document.f.j_password.focus();
return false;
}
}
</script>
<style type="text/css">
.wrapper{width:400px;margin-left:auto;margin-right:auto}
label{padding-left:0 !important}
</style>
</head>
<body>
<c:if test="${param.message != null}">
@ -68,42 +72,38 @@ ${param.message}
</div>
</c:if>
<div class="container">
<div class="span12">
<h1>
<spring:message code="label.form.loginTitle"></spring:message>
</h1>
<a href="?lang=en"><spring:message code="label.form.loginEnglish"></spring:message></a>
| <a href="?lang=es_ES"><spring:message
code="label.form.loginSpanish"></spring:message></a>
<form name='f' action="j_spring_security_check" method='POST'
onsubmit="return validate();">
<table>
<tr>
<td><label><spring:message
code="label.form.loginEmail"></spring:message></label></td>
<td><input type='text' name='j_username' value=''></td>
</tr>
<tr>
<td><label><spring:message
code="label.form.loginPass"></spring:message></label></td>
<td><input type='password' name='j_password' /></td>
</tr>
<tr>
<td><input class="btn btn-primary" name="submit" type="submit"
value=<spring:message code="label.form.submit"></spring:message> /></td>
</tr>
</table>
<div class="container">
<div class="row wrapper">
<h1>
<spring:message code="label.form.loginTitle"></spring:message>
</h1>
<a href="?lang=en"><spring:message code="label.form.loginEnglish"></spring:message></a>
| <a href="?lang=es_ES"><spring:message
code="label.form.loginSpanish"></spring:message></a>
<br><br>
<form name='f' action="j_spring_security_check" method='POST'
onsubmit="return validate();">
<label class="col-sm-2"><spring:message code="label.form.loginEmail"></spring:message></label>
<span class="col-sm-10"><input class="form-control" type='text' name='j_username' value=''></span>
<br><br>
<label class="col-sm-2"><spring:message code="label.form.loginPass"></spring:message></label>
<span class="col-sm-10"><input class="form-control" type='password' name='j_password' /></span>
<br><br>
<input class="btn btn-primary" name="submit" type="submit"
value=<spring:message code="label.form.submit"></spring:message> />
</form>
<br> Current Locale : ${pageContext.response.locale} <br> <a
href="<c:url value="/registration.html" />"><spring:message
code="label.form.loginSignUp"></spring:message></a>
<br><br><br>
<a href="<c:url value="/forgetPassword.html" />"><spring:message
</form>
<br> Current Locale : ${pageContext.response.locale} <br><br>
<a class="btn btn-default" href="<c:url value="registration.html" />"><spring:message
code="label.form.loginSignUp"></spring:message></a>
<br><br>
<a class="btn btn-default" href="<c:url value="/forgetPassword.html" />"><spring:message
code="message.resetPassword"></spring:message></a>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -1,32 +1,31 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION}">
<div id="error">
<spring:message code="message.logoutError"></spring:message>
</div>
<h1 id="error" class="alert alert-danger">
<spring:message code="message.logoutError"></spring:message>
</h1>
</c:if>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<div class="container">
<div class="span12">
<c:if test="${param.logSucc == true}">
<div id="success">
<spring:message code="message.logoutSucc"></spring:message>
</div>
</c:if>
<a href="<c:url value="login.html" />"><spring:message
code="label.form.loginLink"></spring:message></a>
</div>
</div>
<div class="container">
<c:if test="${param.logSucc == true}">
<h1 id="success" class="alert alert-info">
<spring:message code="message.logoutSucc"></spring:message>
</h1>
</c:if>
<a class="btn btn-primary" href="<c:url value="login.html" />"><spring:message
code="label.form.loginLink"></spring:message></a>
</div>
</body>
</html>

View File

@ -6,7 +6,13 @@
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<style>
.password-verdict{
color:#000;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="<c:url value="/resources/pwstrength.js" />"></script>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><spring:message code="label.form.title"></spring:message></title>
</head>
@ -57,6 +63,14 @@
</div>
<script type="text/javascript">
$(document).ready(function () {
options = {
common: {minChar:8},
ui: {showVerdictsInsideProgressBar:true}
};
$('#password').pwstrength(options);
});
function register(){
event.preventDefault();
$(".alert").html("").hide();

View File

@ -1,6 +1,6 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"
uri="http://www.springframework.org/security/tags"%>
uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="messages" />
@ -10,13 +10,14 @@
</c:if>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><spring:message code="label.pages.home.title"></spring:message></title>
</head>
<body>
<spring:message code="message.regSucc"></spring:message>
<a href="<c:url value="login.html" />"><spring:message code="label.login"></spring:message></a>
<div>
<h1 class="alert alert-info"><spring:message code="message.regSucc"></spring:message></h1>
<a class="btn btn-primary" href="<c:url value="login.html" />"><spring:message code="label.login"></spring:message></a>
</div>
</body>
</html>

View File

@ -8,31 +8,26 @@
<%@ page session="false"%>
<html>
<head>
<link href="<c:url value="/resources/bootstrap.css" />" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title><spring:message code="message.updatePassword"></spring:message></title>
</head>
<body>
<sec:authorize access="hasRole('READ_PRIVILEGE')">
<div class="container">
<div class="span12">
<H1>
<spring:message code="message.resetYourPassword"></spring:message>
</H1>
<div class="row">
<h1> <spring:message code="message.resetYourPassword"></spring:message> </h1>
<div >
<br>
<tr>
<td><label><spring:message code="label.user.password"></spring:message></label></td>
<td><input id="pass" name="password" type="password" value="" /></td>
</tr>
<tr>
<td><label><spring:message code="label.user.confirmPass"></spring:message></label></td>
<td>
<input id="passConfirm" type="password" value="" />
<span id="error" class="alert alert-error" style="display:none"><spring:message code="PasswordMatches.user"></spring:message></span>
</td>
</tr>
<label class="col-sm-2"><spring:message code="label.user.password"></spring:message></label>
<span class="col-sm-5"><input class="form-control" id="pass" name="password" type="password" value="" /></span>
<span class="col-sm-5"></span>
<br><br>
<label class="col-sm-2"><spring:message code="label.user.confirmPass"></spring:message></label>
<span class="col-sm-5"><input class="form-control" id="passConfirm" type="password" value="" /></span>
<span id="error" class="alert alert-danger" style="display:none"><spring:message code="PasswordMatches.user"></spring:message></span>
<br><br>
<button class="btn btn-primary" type="submit" onclick="savePass()">
<spring:message code="message.updatePassword"></spring:message>

File diff suppressed because one or more lines are too long