2017-02-01 17:40:57 +01:00
|
|
|
<%--
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or modify it under
|
|
|
|
* the terms of the GNU Lesser General Public License as published by the Free
|
|
|
|
* Software Foundation; either version 2.1 of the License, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
--%>
|
|
|
|
|
|
|
|
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
|
|
|
|
<%@ include file="/html/portlet/login/init.jsp"%>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
window.jQuery
|
|
|
|
|| document
|
2017-02-01 18:00:12 +01:00
|
|
|
.write(
|
|
|
|
'<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"><\/script>')
|
2017-02-01 17:40:57 +01:00
|
|
|
</script>
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="/html/portlet/login/js/bootstrap-collapse.js"></script>
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="/html/portlet/login/js/bootstrap-transition.js"></script>
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="/html/portlet/login/js/login-hook.js"></script>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="/html/portlet/login/css/login-hook.css">
|
|
|
|
|
|
|
|
<%
|
2017-02-01 18:00:12 +01:00
|
|
|
String[] socials = PropsUtil.getArray("login.form.navigation.socials");
|
|
|
|
|
|
|
|
PortalContext context = PortalContext.getConfiguration();
|
|
|
|
String siteUrl = context.getSiteLandingPagePath(request);
|
|
|
|
String workspaceUrl = siteUrl + GCubePortalConstants.USER_WORKSPACE_FRIENDLY_URL;
|
|
|
|
final String GET_CLIENT_ID_PARAMETER = "client_id";
|
|
|
|
final String GET_SCOPE_PARAMETER = "scope";
|
|
|
|
boolean hideCreateAccountAndForgotPassword = false;
|
2017-02-01 18:12:45 +01:00
|
|
|
boolean clientNotAuthorised = false;
|
2017-02-01 17:40:57 +01:00
|
|
|
%>
|
|
|
|
<c:choose>
|
2017-02-01 18:00:12 +01:00
|
|
|
<c:when test="<%=themeDisplay.isSignedIn()%>">
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<%
|
2017-02-01 18:00:12 +01:00
|
|
|
String signedInAs = HtmlUtil.escape(user.getFullName());
|
|
|
|
|
|
|
|
if (themeDisplay.isShowMyAccountIcon() && (themeDisplay.getURLMyAccount() != null)) {
|
|
|
|
String myAccountURL = String.valueOf(themeDisplay.getURLMyAccount());
|
|
|
|
|
|
|
|
if (PropsValues.DOCKBAR_ADMINISTRATIVE_LINKS_SHOW_IN_POP_UP) {
|
|
|
|
signedInAs = "<a class=\"signed-in\" href=\"javascript:Liferay.Util.openWindow({dialog: {destroyOnHide: true}, title: '"
|
|
|
|
+ HtmlUtil.escapeJS(LanguageUtil.get(pageContext, "my-account")) + "', uri: '"
|
|
|
|
+ HtmlUtil.escapeJS(myAccountURL) + "'});\">" + signedInAs + "</a>";
|
|
|
|
} else {
|
|
|
|
myAccountURL = HttpUtil.setParameter(myAccountURL, "controlPanelCategory",
|
|
|
|
PortletCategoryKeys.MY);
|
|
|
|
|
|
|
|
signedInAs = "<a class=\"signed-in\" href=\"" + HtmlUtil.escape(myAccountURL) + "\">"
|
|
|
|
+ signedInAs + "</a>";
|
|
|
|
}
|
|
|
|
}
|
2017-02-01 17:40:57 +01:00
|
|
|
%>
|
|
|
|
|
|
|
|
<%
|
2017-02-01 18:00:12 +01:00
|
|
|
String siteMarkUp = "<a href=\"" + HtmlUtil.escape(siteUrl) + "\">"
|
|
|
|
+ themeDisplay.getSiteGroupName() + "</a>";
|
|
|
|
String workSpaceMarkUp = "<a href=\"" + HtmlUtil.escape(workspaceUrl) + "\">"
|
|
|
|
+ LanguageUtil.get(pageContext, "shared-workspace") + "</a>";
|
2017-02-01 17:40:57 +01:00
|
|
|
%>
|
|
|
|
|
2017-02-01 18:00:12 +01:00
|
|
|
<%=LanguageUtil.format(pageContext, "you-are-signed-in-as-x", signedInAs, false)%>
|
2017-02-01 17:40:57 +01:00
|
|
|
<br>
|
2017-02-01 18:00:12 +01:00
|
|
|
<%=LanguageUtil.format(pageContext, "go-to-x", siteMarkUp, false)%>
|
2017-02-01 17:40:57 +01:00
|
|
|
<br>
|
2017-02-01 18:00:12 +01:00
|
|
|
<%=LanguageUtil.format(pageContext, "go-to-x", workSpaceMarkUp, false)%>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
</c:when>
|
|
|
|
<c:otherwise>
|
2017-02-01 18:00:12 +01:00
|
|
|
<%
|
|
|
|
String redirect = ParamUtil.getString(request, "redirect");
|
|
|
|
%>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<!-- include for recongnizing requesting apps-->
|
|
|
|
<%@ include file="/html/portlet/login/RequestingApplication.jsp"%>
|
|
|
|
<!-- end include for recongnizing requesting apps-->
|
|
|
|
|
|
|
|
|
2017-02-01 18:00:12 +01:00
|
|
|
<h4 class="login-sign-in"><%=LanguageUtil.get(pageContext, "sign-in")%></h4>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<%
|
2017-02-01 18:00:12 +01:00
|
|
|
String login = LoginUtil.getLogin(request, "login", company);
|
|
|
|
String password = StringPool.BLANK;
|
|
|
|
boolean rememberMe = ParamUtil.getBoolean(request, "rememberMe");
|
2017-02-01 17:40:57 +01:00
|
|
|
|
2017-02-01 18:00:12 +01:00
|
|
|
if (Validator.isNull(authType)) {
|
|
|
|
authType = company.getAuthType();
|
|
|
|
}
|
2017-02-01 17:40:57 +01:00
|
|
|
%>
|
|
|
|
<portlet:actionURL
|
2017-02-01 18:00:12 +01:00
|
|
|
secure="<%=PropsValues.COMPANY_SECURITY_AUTH_REQUIRES_HTTPS || request.isSecure()%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
var="loginURL">
|
|
|
|
<portlet:param name="struts_action" value="/login/login" />
|
|
|
|
</portlet:actionURL>
|
2017-02-01 18:12:45 +01:00
|
|
|
<!-- START CLIENT NOT AUTHORISED -->
|
|
|
|
<c:if test="<%=clientNotAuthorised == false%>">
|
|
|
|
|
2017-02-01 18:00:12 +01:00
|
|
|
<aui:form action="<%=loginURL%>"
|
|
|
|
autocomplete='<%=PropsValues.COMPANY_SECURITY_LOGIN_FORM_AUTOCOMPLETE ? "on" : "off"%>'
|
2017-02-01 17:40:57 +01:00
|
|
|
cssClass="sign-in-form" method="post" name="fm">
|
2017-02-01 18:00:12 +01:00
|
|
|
<aui:input name="saveLastPath" type="hidden" value="<%=false%>" />
|
|
|
|
<aui:input name="redirect" type="hidden" value="<%=redirect%>" />
|
2017-02-01 17:40:57 +01:00
|
|
|
<aui:input name="doActionAfterLogin" type="hidden"
|
2017-02-01 18:00:12 +01:00
|
|
|
value="<%=portletName.equals(PortletKeys.FAST_LOGIN) ? true : false%>" />
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<c:choose>
|
2017-02-01 18:00:12 +01:00
|
|
|
<c:when test='<%=SessionMessages.contains(request, "userAdded")%>'>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<%
|
2017-02-01 18:00:12 +01:00
|
|
|
String userEmailAddress = (String) SessionMessages.get(request, "userAdded");
|
|
|
|
String userPassword = (String) SessionMessages.get(request, "userAddedPassword");
|
|
|
|
%>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<div class="alert alert-success">
|
|
|
|
<c:choose>
|
|
|
|
<c:when
|
2017-02-01 18:00:12 +01:00
|
|
|
test="<%=company.isStrangersVerify() || Validator.isNull(userPassword)%>">
|
|
|
|
<%=LanguageUtil.get(pageContext, "thank-you-for-creating-an-account")%>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
2017-02-01 18:00:12 +01:00
|
|
|
<c:if test="<%=company.isStrangersVerify()%>">
|
|
|
|
<%=LanguageUtil.format(pageContext,
|
|
|
|
"your-email-verification-code-has-been-sent-to-x",
|
|
|
|
userEmailAddress)%>
|
2017-02-01 17:40:57 +01:00
|
|
|
</c:if>
|
|
|
|
</c:when>
|
|
|
|
<c:otherwise>
|
2017-02-01 18:00:12 +01:00
|
|
|
<%=LanguageUtil.format(pageContext,
|
|
|
|
"thank-you-for-creating-an-account.-your-password-is-x", userPassword,
|
|
|
|
false)%>
|
2017-02-01 17:40:57 +01:00
|
|
|
</c:otherwise>
|
|
|
|
</c:choose>
|
|
|
|
|
|
|
|
<%-- <c:if test="<%= PrefsPropsUtil.getBoolean(company.getCompanyId(), PropsKeys.ADMIN_EMAIL_USER_ADDED_ENABLED) %>">
|
|
|
|
<%= LanguageUtil.format(pageContext, "your-password-has-been-sent-to-x", userEmailAddress) %>
|
|
|
|
</c:if> --%>
|
|
|
|
</div>
|
|
|
|
</c:when>
|
|
|
|
<c:when
|
2017-02-01 18:00:12 +01:00
|
|
|
test='<%=SessionMessages.contains(request, "userPending")%>'>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<%
|
2017-02-01 18:00:12 +01:00
|
|
|
String userEmailAddress = (String) SessionMessages.get(request, "userPending");
|
|
|
|
%>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<div class="alert alert-success">
|
2017-02-01 18:00:12 +01:00
|
|
|
<%=LanguageUtil.format(pageContext,
|
|
|
|
"thank-you-for-creating-an-account.-you-will-be-notified-via-email-at-x-when-your-account-has-been-approved",
|
|
|
|
userEmailAddress)%>
|
2017-02-01 17:40:57 +01:00
|
|
|
</div>
|
|
|
|
</c:when>
|
|
|
|
</c:choose>
|
|
|
|
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=AuthException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="authentication-failed" />
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=CompanyMaxUsersException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="unable-to-login-because-the-maximum-number-of-users-has-been-reached" />
|
|
|
|
<liferay-ui:error
|
2017-02-01 18:00:12 +01:00
|
|
|
exception="<%=CookieNotSupportedException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="authentication-failed-please-enable-browser-cookies" />
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=NoSuchUserException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="authentication-failed" />
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=PasswordExpiredException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="your-password-has-expired" />
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=UserEmailAddressException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="authentication-failed" />
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=UserLockoutException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="this-account-has-been-locked" />
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=UserPasswordException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="authentication-failed" />
|
2017-02-01 18:00:12 +01:00
|
|
|
<liferay-ui:error exception="<%=UserScreenNameException.class%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
message="authentication-failed" />
|
|
|
|
|
|
|
|
<aui:fieldset>
|
|
|
|
|
|
|
|
<%
|
|
|
|
String loginLabel = null;
|
2017-02-01 18:00:12 +01:00
|
|
|
|
|
|
|
if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) {
|
|
|
|
loginLabel = "email-address";
|
|
|
|
} else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
|
|
|
|
loginLabel = "screen-name";
|
|
|
|
} else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
|
|
|
|
loginLabel = "id";
|
|
|
|
}
|
|
|
|
%>
|
2017-02-01 17:40:57 +01:00
|
|
|
<div class="custom-form-login-wrapper">
|
|
|
|
<aui:input
|
2017-02-01 18:00:12 +01:00
|
|
|
autoFocus="<%=windowState.equals(LiferayWindowState.EXCLUSIVE)
|
|
|
|
|| windowState.equals(WindowState.MAXIMIZED)%>"
|
2017-02-01 17:40:57 +01:00
|
|
|
cssClass="clearable login-identifier input-xlarge"
|
2017-02-01 18:00:12 +01:00
|
|
|
placeholder="<%=loginLabel%>" label="" name="login"
|
|
|
|
showRequiredLabel="<%=false%>" type="text">
|
2017-02-01 17:40:57 +01:00
|
|
|
<aui:validator name="required" />
|
|
|
|
</aui:input>
|
|
|
|
|
|
|
|
<aui:input name="password" placeholder="password"
|
|
|
|
cssClass="login-password input-xlarge" label=""
|
2017-02-01 18:00:12 +01:00
|
|
|
showRequiredLabel="<%=false%>" type="password"
|
|
|
|
value="<%=password%>">
|
2017-02-01 17:40:57 +01:00
|
|
|
<aui:validator name="required" />
|
|
|
|
</aui:input>
|
|
|
|
|
|
|
|
<aui:button type="submit"
|
|
|
|
cssClass="login-sign-in-button input-xlarge" value="sign-in" />
|
|
|
|
|
|
|
|
<span id="<portlet:namespace />passwordCapsLockSpan"
|
|
|
|
style="display: none;"><liferay-ui:message
|
|
|
|
key="caps-lock-is-on" /></span>
|
|
|
|
|
|
|
|
<c:if
|
2017-02-01 18:00:12 +01:00
|
|
|
test="<%=company.isAutoLogin() && !PropsValues.SESSION_DISABLED%>">
|
2017-02-01 17:40:57 +01:00
|
|
|
<div class="login-remember-me">
|
2017-02-01 18:00:12 +01:00
|
|
|
<aui:input checked="<%=rememberMe%>" name="rememberMe"
|
2017-02-01 17:40:57 +01:00
|
|
|
type="checkbox" />
|
|
|
|
</div>
|
|
|
|
</c:if>
|
|
|
|
</div>
|
|
|
|
</aui:fieldset>
|
|
|
|
|
|
|
|
</aui:form>
|
2017-02-01 18:00:12 +01:00
|
|
|
<c:if test="<%=hideCreateAccountAndForgotPassword == true%>">
|
|
|
|
<div style="text-align: center;">
|
|
|
|
<button class="btn input-xlarge"
|
|
|
|
onClick="location.href='<%=context.getGatewayURL(request)%>'">Cancel</button>
|
|
|
|
</div>
|
|
|
|
</c:if>
|
2017-02-01 17:40:57 +01:00
|
|
|
<liferay-util:include page="/html/portlet/login/navigation.jsp" />
|
|
|
|
|
2017-02-01 18:00:12 +01:00
|
|
|
<c:if test="<%=socials.length > 0%>">
|
2017-02-01 17:40:57 +01:00
|
|
|
<div class="accordion" id="accordion" role="tablist">
|
|
|
|
<div class="accordion-group">
|
|
|
|
<div class="accordion-heading">
|
|
|
|
<a data-toggle="collapse" data-parent="#accordion"
|
|
|
|
href="#collapseMe" aria-expanded="true"
|
|
|
|
aria-controls="collapseMe">
|
|
|
|
<h4>
|
|
|
|
<i class="icon-double-angle-up"></i>
|
|
|
|
</h4>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div id="collapseMe" class="accordion-body collapse in">
|
|
|
|
<div class="accordion-inner">
|
|
|
|
<liferay-util:include page="/html/portlet/login/social.jsp" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</c:if>
|
2017-02-01 18:12:45 +01:00
|
|
|
<!-- END CLIENT NOT AUTHORISED -->
|
|
|
|
</c:if>
|
2017-02-01 17:40:57 +01:00
|
|
|
|
|
|
|
<aui:script use="aui-base">
|
|
|
|
var password = A.one('#<portlet:namespace />password');
|
|
|
|
|
|
|
|
if (password) {
|
|
|
|
password.on(
|
|
|
|
'keypress',
|
|
|
|
function(event) {
|
|
|
|
Liferay.Util.showCapsLock(event, '<portlet:namespace />passwordCapsLockSpan');
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
</aui:script>
|
|
|
|
</c:otherwise>
|
|
|
|
</c:choose>
|
2017-02-01 18:00:12 +01:00
|
|
|
<c:if test="<%=hideCreateAccountAndForgotPassword == true%>">
|
2017-02-01 17:40:57 +01:00
|
|
|
<script>
|
2017-02-01 18:00:12 +01:00
|
|
|
$(".taglib-icon-list").hide();
|
|
|
|
</script>
|
2017-02-01 17:40:57 +01:00
|
|
|
</c:if>
|