Skip to content
Snippets Groups Projects
Commit 0cde9033 authored by Barbara B. Frosik's avatar Barbara B. Frosik
Browse files

No commit message

No commit message
parent 0feed84b
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,7 @@ public class LoginController implements Serializable
user = userInfoFacade.findByUsername(username);
if (user == null) {
SessionUtility.addErrorMessage("Unknown User", "Username " + username + " is not registered.");
SessionUtility.addErrorMessage("Unknown User", "Username " + username + " is not registered. Contact administrator.");
return (username = password = null);
}
......@@ -131,7 +131,7 @@ public class LoginController implements Serializable
}
}
public String getLandingPage() {
String landingPage = SessionUtility.getCurrentViewId() + "?faces-redirect=true";
if (landingPage.contains("login")) {
......@@ -150,6 +150,14 @@ public class LoginController implements Serializable
}
}
// public void forwardIfNotLoggedIn() throws IOException {
// if (!loggedIn) {
// ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
// ec.redirect(ec.getRequestContextPath() + "/views/login.");
//
// }
// }
public String displayRole() {
return "User";
}
......
......@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<meta http-equiv="Refresh" content="0; URL=views/home.xhtml"/>
<meta http-equiv="Refresh" content="0; URL=views/login.xhtml"/>
</h:body>
</html>
......@@ -39,12 +39,35 @@ a:link:hover, a:visited:hover {
height: 75px;
}
#bottom {
#middle {
position: relative;
background-color: #f2f4f7;
padding: 5px;
margin: 0px 0px 0px 0px;
height: 100%
height: 100%;
}
#bottom {
position: relative;
background-color: #f2f4f7;
padding: 5px;
margin: 10px 0px 0px 10px;
height: 100%;
float: left;
}
.middleLeftContent {
float: left;
margin-left: 35px;
vertical-align: central;
text-align: center;
}
.middleRightContent {
font-size: 14px;
font-weight: normal;
vertical-align: central;
margin-top: 100px;
}
.topLeftContent {
......@@ -79,12 +102,12 @@ a:link:hover, a:visited:hover {
padding: 100px;
}
input {
background: #6da5d8;
box-shadow: 0px 3px 5px #d5d5d5;
}
h1 {
font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
font-size: 24px;
......@@ -94,3 +117,32 @@ h1 {
color: #f2f4f7;
vertical-align: middle;
}
.sectionText {
font-size: 14px;
font-weight: normal;
color: #4e80b6;
}
.ui-messages-info, .ui-message-info {
background-color: #f2f4f7;
color: saddlebrown;
border: #f2f4f7;
size: auto;
}
.ui-messages-warn, .ui-message-warn {
background-color: #f2f4f7;
color: saddlebrown;
border: #f2f4f7;
size: auto;
tab-size: calc;
drop-initial-size: auto;
}
.ui-messages-error, .ui-message-error {
background-color: #f2f4f7;
color: saddlebrown;
border: #f2f4f7;
size: auto;
}
......@@ -333,12 +333,12 @@ h1 {
vertical-align: middle;
}
.homePage {
/*.homePage {
background-image: url(../../resources/images/ApsStorageRing.png);
background-repeat: no-repeat;
background-position: center;
background-size: auto 100%;
}
}*/
.pageTitle h1 {
font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
......
......@@ -5,11 +5,36 @@
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../resources/css/login.css" rel="stylesheet" type="text/css" />
<title>Data Management System Login</title>
</h:head>
<h:body>
<ui:composition template="../templates/loginViewTemplate.xhtml">
<ui:define name="bottom">
<div id="top" class="topContent">
<div id="topLeft" class="topLeftContent">
<ui:insert name="topLeft">
<h:graphicImage alt="ANL Logo" url="../resources/images/AnlLogo167x75.png"/>
</ui:insert>
</div>
<div>
<div id="topRight" class="topRightContent">
<ui:insert name="topRight"/>
</div>
<div id="topCenter" class="topCenterContent">
<ui:insert name="topCenter">
<h1>Data Management System Portal</h1>
</ui:insert>
</div>
</div>
</div>
<div id="middle" class="middleContent">
<div id="middleLeft" class="middleLeftContent">
<h:form id="loginForm">
<p:growl id="messages" showDetail="true" autoUpdate="true"/>
<!-- <p:growl id="messages" showDetail="true" autoUpdate="true"/>-->
<div class="login">
<div>
<p:inputText id="username" value="#{loginController.username}" title="Username"/>
......@@ -19,13 +44,25 @@
<p:password id="password" value="#{loginController.password}" title="Password"/>
<p:watermark for="password" value="Password"/>
</div>
<p/>
<div>
<p:commandButton value="Login" action="#{loginController.login()}" />
</div>
</div>
</h:form>
</ui:define>
</ui:composition>
</div>
<div id="middleRight" class="middleRightContent" >
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="false" showIcon="false" />
</div>
</div>
<div id="bottom" class="sectionText">
<p>
Welcome to the Advanced Photon Source’s prototype data management portal. Registered users can view and set access permissions for their experiment data using this system.
</p>
</div>
</h:body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment