Mercurial > hg > LGDataverses
diff src/main/webapp/loginpage.xhtml @ 10:a50cf11e5178
Rewrite LGDataverse completely upgrading to dataverse4.0
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Tue, 08 Sep 2015 17:00:21 +0200 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/webapp/loginpage.xhtml Tue Sep 08 17:00:21 2015 +0200 @@ -0,0 +1,123 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:p="http://primefaces.org/ui" + xmlns:jsf="http://xmlns.jcp.org/jsf"> + + <h:head> + </h:head> + + <h:body> + <f:metadata> + <f:viewParam name="redirectPage" value="#{LoginPage.redirectPage}"/> + <f:viewAction action="#{LoginPage.init}"/> + </f:metadata> + <ui:composition template="/dataverse_template.xhtml"> + <ui:param name="pageTitle" value="#{bundle.login} - #{dataverseServiceBean.findRootDataverse().name} #{bundle.dataverse}"/> + <ui:param name="showDataverseHeader" value="false"/> + <ui:param name="showMessagePanel" value="#{true}"/> + <ui:param name="loginRedirectPage" value="dataverse.xhtml"/> + <ui:define name="body"> + <ui:fragment rendered="#{not LoginPage.authenticationProvidersAvailable}"> + <div class="row"> + <div class="col-sm-12"> + <div class="alert alert-danger"> + <h:outputFormat value="#{bundle['authenticationProvidersAvailable.tip']}" escape="false"> + <f:param value="<h3>"/> + <f:param value="</h3>"/> + <f:param value="<br />"/> + </h:outputFormat> + </div> + </div> + </div> + </ui:fragment> + <div id="login-container" class="row"> + <div id="builtinColumn" class="col-md-5" jsf:rendered="#{LoginPage.authenticationProvidersAvailable}"> + <h:form id="loginForm" styleClass="form-horizontal"> + <p:focus context="loginForm"/> + <ui:remove> + <ui:fragment rendered="#{LoginPage.multipleProvidersAvailable}"> + <div class="form-group"> + <label class="col-sm-3 control-label" for="loginSystemSelect"> + #{bundle['login.System']} + </label> + <div class="col-sm-8"> + <h:selectOneMenu id="loginSystemSelect" styleClass="form-control" value="#{LoginPage.credentialsAuthProviderId}"> + <f:selectItems value="#{LoginPage.listCredentialsAuthenticationProviders()}" var="ap" + itemLabel="#{ap.title}" itemValue="#{ap.id}" /> + <f:ajax render="@all" listener="#{LoginPage.resetFilledCredentials}"/> + </h:selectOneMenu> + </div> + </div> + </ui:fragment> + </ui:remove> + <ui:repeat id="credentialsContainer2" value="#{LoginPage.filledCredentials}" var="fc"> + <div class="form-group"> + <label class="col-sm-3 control-label" for="credValue"> + #{fc.credential.title} + </label> + <div class="col-sm-8"> + <h:inputText rendered="#{not fc.credential.secret}" value="#{fc.value}" id="credValue" styleClass="form-control"/> + <p:message rendered="#{not fc.credential.secret}" for="credValue" display="text"/> + <h:inputSecret rendered="#{fc.credential.secret}" value="#{fc.value}" id="sCredValue" styleClass="form-control"/> + <p:message rendered="#{not fc.credential.secret}" for="sCredValue" display="text"/> + </div> + </div> + </ui:repeat> + <div class="form-group"> + <div class="col-sm-offset-3 col-sm-9 button-block"> + <p:commandButton id="login" value="#{bundle.login}" update="@all" action="#{LoginPage.login}"/> + <p:button value="#{bundle.cancel}" outcome="/dataverse.xhtml?alias=#{dataverseServiceBean.findRootDataverse().alias}"/> + </div> + </div> + <div class="form-group"> + <div class="col-sm-offset-3 col-sm-9"> + <a href="passwordreset.xhtml"> + #{bundle['login.forgot.text']} + </a> + </div> + </div> + </h:form> + </div> + <div class="col-md-7" jsf:rendered="#{systemConfig.shibEnabled == true}"> + <div class="panel panel-default highlight"> + <div class="panel-body"> + <h2 style="margin-top:0;">#{bundle['login.institution']}</h2> + + <div id="idpSelect"></div> + + <script src="/resources/js/shib/idpselect_config.js" type="text/javascript" language="javascript"></script> + + <script src="/resources/js/shib/idpselect.js" type="text/javascript" language="javascript"></script> + + <script src="/resources/js/shib/idpselect_style.js" type="text/javascript" language="javascript"></script> + + <noscript> + <!-- If you need to care about non javascript browsers you will need to + generate a hyperlink to a non-js DS. + + To build you will need: + - URL: The base URL of the DS you use + - EI: Your entityId, URLencoded. You can get this from the line that + this page is called with. + - RET: Your return address dlib-adidp.ucs.ed.ac.uk. Again you can get + this from the page this is called with, but beware of the + target%3Dcookie%253A5269905f bit.. + + < href=${URL}?entityID=${EI}&return=${RET} + --> + + Your Browser does not support javascript. Please use + <!--FIXME not valid xhtml?--> + <!--<a href="http://federation.org/DS/DS?entityID=https%3A%2F%2FyourentityId.edu.edu%2Fshibboleth&return=https%3A%2F%2Fyourreturn.edu%2FShibboleth.sso%2FDS%3FSAMLDS%3D1%26target%3Dhttps%3A%2F%2Fyourreturn.edu%2F">this link</a>.--> + </noscript> + </div> + </div> + </div> + </div> + </ui:define> + </ui:composition> + </h:body> +</html>
