/
LoginPage.xhtml
108 lines (108 loc) · 8.1 KB
/
LoginPage.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<ui:composition template="/vanilla_template.xhtml">
<ui:param name="pageTitle" value="#{bundlePageInfo.loginTitle} - #{VDCRequest.dataversePageTitle}"/>
<ui:define name="metadata">
<f:metadata>
<f:viewParam name="redirect" value="#{LoginPage.redirect}"/>
<f:viewParam name="studyId" value="#{LoginPage.studyId}"/>
<f:viewParam name="clearWorkflow" value="#{LoginPage.clearWorkflow}"/>
<f:viewParam name="tab" value="#{LoginPage.tab}"/>
<f:event type="preRenderView" listener="#{LoginPage.preRenderView}"/>
</f:metadata>
</ui:define>
<ui:define name="body">
<div id="dvnLoginPageWrap">
<div class="dvnRound">
<ice:form id="vanillaLoginForm">
<ice:inputHidden id="vdcId" value="#{VDCRequest.currentVDCId}"/>
<ice:inputHidden binding="#{LoginPage.hiddenStudyId}" value="#{LoginPage.studyId}"/>
<div id="layoutPanel1" class="dvnLoginContent">
<div class="dvnLoginInputArea">
<!-- ************ Username login section ******************* -->
<fieldset>
<legend>Dataverse Account</legend>
<div jsfc="h:panelGroup" styleClass="dvnLoginFailed" rendered="#{LoginPage.loginFailed}">
<ice:outputText styleClass="errorMessage" value="#{LoginPage.errMessage}"/>
</div>
<label for="username">Username</label>
<ice:inputText tabindex="1" id="username" value="#{LoginPage.userName}" required="true" requiredMessage="This field is required." action="#{LoginPage.login}"/>
<ice:message for="username" styleClass="errorMessage"/>
<br/>
<label for="password">Password</label>
<ice:inputSecret tabindex="2" id="password" value="#{LoginPage.password}" required="true" requiredMessage="This field is required." action="#{LoginPage.login}"/>
<ice:message for="password" styleClass="errorMessage"/>
<div class="dvnFormPadding dvnFormMargin">
<ice:commandButton tabindex="3" id="button1" value="Log in" action="#{LoginPage.login}"/>
</div>
<div class="dvnLoginLinkBlock">
<p><ice:outputLink tabindex="4" value="/dvn/faces/login/ForgotPasswordPage.xhtml" title="Link to Reset Password">Forgot your password?</ice:outputLink></p>
</div>
</fieldset>
<!-- ************* end username login section *************** -->
<!-- ************ Affiliate login section ******************* -->
<div jsfc="h:panelGroup" rendered="#{LoginPage.isAffiliates != null}">
<script type="text/javascript">
// <![CDATA[
function loginAffiliate(objId) {
var obj = eval("document.getElementById('" + objId + "')");
downloadUrl = obj.options[obj.selectedIndex].value;
if (downloadUrl != "") {
window.location.href = downloadUrl;
}
}
// ]]>
</script>
<fieldset class="dvnLoginPageAffiliate">
<legend>Affiliate</legend>
<label for="username">Affiliate Name</label>
<ice:selectOneMenu id="affiliateName">
<f:selectItems value="#{LoginPage.affiliateNames}"/>
</ice:selectOneMenu>
<ice:message for="affiliateName" styleClass="errorMessage"/>
<div class="dvnFormPadding dvnFormMargin">
<input type="button" class="iceCmdBtn" onclick="loginAffiliate('vanillaLoginForm:affiliateName')" value="Log in"/>
</div>
</fieldset>
</div>
<!-- ************* end affiliate login section *************** -->
</div>
<div class="dvnLoginContentText">
<div id="dvnLoginPageHeader">
<a name="login" title="Dataverse Network Login"><ice:outputText value="#{VDCRequest.vdcNetwork.name} Dataverse Network" styleClass="dvnLoginHeadingText" escape="false"/></a>
</div>
<div jsfc="ice:panelGroup" styleClass="dvnInformationMessage">
<div class="dvnMsgBlockContainer">
<ice:outputText value="#{bundlePageInfo.loginHelp}" escape="false" rendered="#{LoginPage.redirect == null}"/>
<ice:outputText value="#{bundlePageInfo.loginAffiliateHelp}" escape="false" rendered="#{LoginPage.isAffiliates != null}"/>
<ice:outputText value="#{bundlePageInfo.loginRestrictedHelp}" escape="false" rendered="#{LoginPage.redirect != null}"/>
<p><ice:outputText value="Don't have a Dataverse Network account? "></ice:outputText> <ice:commandLink tabindex="5" action="#{LoginWorkflowBean.beginContributorWorkflow}" title="Create an Account" immediate="true">Create an Account.</ice:commandLink></p>
</div>
</div>
<div class="dvnLoginContentAreaFooter">
<a href="http://thedata.org" target="_blank" title="Link to the Dataverse Network Project"><img alt="Powered by the Dataverse Network Project" src="/dvn/resources/images/dvnPoweredByLogo.gif"/></a>
</div>
</div>
</div>
</ice:form>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
// set initial focus to the username text field
document.getElementById('vanillaLoginForm:username').focus();
// ]]>
</script>
</ui:define>
</ui:composition>
</body>
</html>