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="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" <%@ 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://www.springframework.org/tags" prefix="spring"%>
<html> <html>
<head> <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> <title><spring:message code="label.pages.home.title"></spring:message></title>
</head> </head>
<body> <body>
<div class="container"> <nav class="navbar navbar-default">
<div class="span12"> <div class="container-fluid">
<sec:authorize ifNotGranted="WRITE_PRIVILEGE"> <div class="navbar-header">
<spring:message code="message.unauth"></spring:message> <a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
</sec:authorize> </div>
<sec:authorize ifAnyGranted="WRITE_PRIVILEGE"> <ul class="nav navbar-nav navbar-right">
<H1> <li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
<spring:message code="label.pages.admin.message"></spring:message> </ul>
</H1> </div>
</sec:authorize> </nav>
<a href="<c:url value="/j_spring_security_logout" />"><spring:message
code="label.pages.logout"></spring:message></a> <a <div class="container">
href="<c:url value="/home.html" />"><spring:message <sec:authorize ifNotGranted="WRITE_PRIVILEGE">
code="label.pages.home.title"></spring:message></a> <spring:message code="message.unauth"></spring:message>
</div> </sec:authorize>
</div> <sec:authorize ifAnyGranted="WRITE_PRIVILEGE">
<h1>
<spring:message code="label.pages.admin.message"></spring:message>
</h1>
</sec:authorize>
</div>
</body> </body>
</html> </html>

View File

@ -1,38 +1,37 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="sec" <%@ 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://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="messages" /> <fmt:setBundle basename="messages" />
<%@ page session="true"%> <%@ page session="true"%>
<html> <html>
<head> <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 <title><spring:message
code="label.badUser.title"></spring:message></title> code="label.badUser.title"></spring:message></title>
</head> </head>
<body> <body>
<h1> <div class="container">
<div class="alert alert-error"> <h1 class="alert alert-danger">
${param.message} ${param.message}
</h1> </h1>
<br> <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> code="label.form.loginSignUp"></spring:message></a>
<c:if test="${param.expired}"> <c:if test="${param.expired}">
<br> <br>
<h1>${label.form.resendRegistrationToken}</h1> <h1>${label.form.resendRegistrationToken}</h1>
<button onclick="resendToken()"> <button onclick="resendToken()">
<spring:message code="label.form.resendRegistrationToken"></spring:message> <spring:message code="label.form.resendRegistrationToken"></spring:message>
</button> </button>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
function resendToken(){ function resendToken(){
$.get("<c:url value="/user/resendRegistrationToken"><c:param name="token" value="${param.token}"/></c:url>", function(data){ $.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; window.location.href = "<c:url value="/login.html"></c:url>" + "?message=" + data.message;
}) })
.fail(function(data) { .fail(function(data) {
if(data.responseJSON.error.indexOf("MailError") > -1) if(data.responseJSON.error.indexOf("MailError") > -1)
@ -50,5 +49,6 @@ $(document).ajaxStart(function() {
}); });
</script> </script>
</c:if> </c:if>
</div>
</body> </body>
</html> </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="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" <%@ 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://www.springframework.org/tags" prefix="spring"%>
<html> <html>
<head> <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> </head>
<body> <body>
<div class="container"> <nav class="navbar navbar-default">
<div class="span12"> <div class="container-fluid">
<h1>This is the landing page for the admin</h1> <div class="navbar-header">
<sec:authorize access="hasRole('READ_PRIVILEGE')"> <a class="navbar-brand"href="<c:url value="/home.html" />"><spring:message code="label.pages.home.title"></spring:message></a>
This text is only visible to a user </div>
<br /> <ul class="nav navbar-nav navbar-right">
</sec:authorize> <li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
<sec:authorize access="hasRole('WRITE_PRIVILEGE')"> </ul>
This text is only visible to an admin </div>
<br /> </nav>
</sec:authorize>
<a href="<c:url value="/j_spring_security_logout" />"><spring:message <div class="container">
code="label.pages.logout"></spring:message></a> <a <c:if test="${param.message != null}">
href="<c:url value="/admin.html" />"><spring:message <div class="alert alert-info">
code="label.pages.admin"></spring:message></a> ${param.message}
</div> </div>
</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> </body>
</html> </html>

View File

@ -2,18 +2,16 @@
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html> <html>
<head> <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> <title><spring:message code="label.pages.home.title"></spring:message></title>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<div class="span12"> <h1 class="alert alert-danger">
<h1 class="alert alert-error"> <spring:message code="message.email.config.error"></spring:message>
<spring:message code="message.email.config.error"></spring:message> </h1>
</h1>
</div>
</div>
</div>
</body> </body>
</html> </html>

View File

@ -1,6 +1,6 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="sec" <%@ 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://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="messages" /> <fmt:setBundle basename="messages" />
@ -8,16 +8,17 @@
<html> <html>
<head> <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> <title><spring:message code="label.pages.home.title"></spring:message></title>
</head> </head>
<body> <body>
<h1> <div class="container">
<h1 class="alert alert-info">
<spring:message code="auth.message.expired"></spring:message> <spring:message code="auth.message.expired"></spring:message>
</h1> </h1>
<br> <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> code="label.form.loginSignUp"></spring:message></a>
</div>
</body> </body>
</html> </html>

View File

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

View File

@ -4,19 +4,26 @@
<html> <html>
<head> <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> <title><spring:message code="label.pages.home.title"></spring:message></title>
</head> </head>
<body> <body>
<div class="container"> <nav class="navbar navbar-default">
<div class="span12"> <div class="container-fluid">
<h1> <div class="navbar-header">
<spring:message code="label.pages.home.message"></spring:message> <a class="navbar-brand"href="#"><spring:message code="label.pages.home.title"></spring:message></a>
</h1> </div>
<a href="<c:url value="/j_spring_security_logout" />"><spring:message <ul class="nav navbar-nav navbar-right">
code="label.pages.logout"></spring:message></a> <li><a href="<c:url value="/j_spring_security_logout" />"><spring:message code="label.pages.logout"></spring:message></a> </li>
</div> </ul>
</div> </div>
</nav>
<div class="container">
<h1>
<spring:message code="label.pages.home.message"></spring:message>
</h1>
</div>
</body> </body>
</html> </html>

View File

@ -1,35 +1,38 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" <%@ 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://www.springframework.org/tags" prefix="spring"%>
<%@ page session="true"%> <%@ page session="true"%>
<html> <html>
<head> <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> <title><spring:message code="label.pages.home.title"></spring:message></title>
</head> </head>
<body> <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="container">
<div class="span12"> <sec:authorize access="hasRole('READ_PRIVILEGE')">
<sec:authorize access="hasRole('READ_PRIVILEGE')"> <spring:message code="label.pages.user.message"></spring:message>
<spring:message code="label.pages.user.message"></spring:message> <br />
<br /> </sec:authorize>
</sec:authorize>
<sec:authorize access="hasRole('WRITE_PRIVILEGE')"> <sec:authorize access="hasRole('WRITE_PRIVILEGE')">
<spring:message code="label.pages.admin.message"></spring:message> <spring:message code="label.pages.admin.message"></spring:message>
<br /> <br />
</sec:authorize> </sec:authorize>
${param.user} ${param.user}
<a href="<c:url value="/j_spring_security_logout" />"><spring:message <a class="btn btn-default" href="<c:url value="/admin.html" />"><spring:message code="label.pages.admin"></spring:message></a>
code="label.pages.logout"></spring:message></a> <a </div>
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>
</body> </body>
</html> </html>

View File

@ -2,19 +2,17 @@
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html> <html>
<head> <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> <title><spring:message code="label.pages.home.title"></spring:message></title>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<div class="span12"> <h1 class="alert alert-danger">
<h1 class="alert alert-error"> <spring:message code="message.sessionExpired"></spring:message>
<spring:message code="message.sessionExpired"></spring:message> </h1>
</h1> <a class="btn btn-primary" href="<c:url value="login.html" />"><spring:message
<a href="<c:url value="login.html" />"><spring:message code="label.form.loginLink"></spring:message></a>
code="label.form.loginLink"></spring:message></a> </div>
</div>
</div>
</body> </body>
</html> </html>

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long