added extensio to support oAuth2 requesting applications
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/liferay62-plugins/login-hook@142010 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
117dc919cd
commit
fb75255689
|
@ -50,9 +50,6 @@
|
|||
this application's request to access your member data and interact
|
||||
with D4Science on your behalf.
|
||||
<p>
|
||||
<p>
|
||||
<button class="btn" onClick="location.href='<%=context.getGatewayURL(request)%>'">Cancel</button>
|
||||
</p>
|
||||
</div>
|
||||
<%
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
<script>
|
||||
window.jQuery
|
||||
|| document
|
||||
.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"><\/script>')
|
||||
.write(
|
||||
'<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"><\/script>')
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="/html/portlet/login/js/bootstrap-collapse.js"></script>
|
||||
|
@ -32,7 +33,6 @@
|
|||
<link rel="stylesheet" href="/html/portlet/login/css/login-hook.css">
|
||||
|
||||
<%
|
||||
|
||||
String[] socials = PropsUtil.getArray("login.form.navigation.socials");
|
||||
|
||||
PortalContext context = PortalContext.getConfiguration();
|
||||
|
@ -52,19 +52,24 @@ boolean hideCreateAccountAndForgotPassword = false;
|
|||
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=\"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>";
|
||||
signedInAs = "<a class=\"signed-in\" href=\"" + HtmlUtil.escape(myAccountURL) + "\">"
|
||||
+ signedInAs + "</a>";
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<%
|
||||
String siteMarkUp = "<a href=\"" + HtmlUtil.escape(siteUrl) + "\">" + themeDisplay.getSiteGroupName() +"</a>";
|
||||
String workSpaceMarkUp = "<a href=\"" + HtmlUtil.escape(workspaceUrl) + "\">" + LanguageUtil.get(pageContext, "shared-workspace") +"</a>";
|
||||
String siteMarkUp = "<a href=\"" + HtmlUtil.escape(siteUrl) + "\">"
|
||||
+ themeDisplay.getSiteGroupName() + "</a>";
|
||||
String workSpaceMarkUp = "<a href=\"" + HtmlUtil.escape(workspaceUrl) + "\">"
|
||||
+ LanguageUtil.get(pageContext, "shared-workspace") + "</a>";
|
||||
%>
|
||||
|
||||
<%=LanguageUtil.format(pageContext, "you-are-signed-in-as-x", signedInAs, false)%>
|
||||
|
@ -76,7 +81,8 @@ boolean hideCreateAccountAndForgotPassword = false;
|
|||
</c:when>
|
||||
<c:otherwise>
|
||||
<%
|
||||
String redirect = ParamUtil.getString(request, "redirect");%>
|
||||
String redirect = ParamUtil.getString(request, "redirect");
|
||||
%>
|
||||
|
||||
<!-- include for recongnizing requesting apps-->
|
||||
<%@ include file="/html/portlet/login/RequestingApplication.jsp"%>
|
||||
|
@ -124,11 +130,15 @@ boolean hideCreateAccountAndForgotPassword = false;
|
|||
<%=LanguageUtil.get(pageContext, "thank-you-for-creating-an-account")%>
|
||||
|
||||
<c:if test="<%=company.isStrangersVerify()%>">
|
||||
<%= LanguageUtil.format(pageContext, "your-email-verification-code-has-been-sent-to-x", userEmailAddress) %>
|
||||
<%=LanguageUtil.format(pageContext,
|
||||
"your-email-verification-code-has-been-sent-to-x",
|
||||
userEmailAddress)%>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<%= LanguageUtil.format(pageContext, "thank-you-for-creating-an-account.-your-password-is-x", userPassword, false) %>
|
||||
<%=LanguageUtil.format(pageContext,
|
||||
"thank-you-for-creating-an-account.-your-password-is-x", userPassword,
|
||||
false)%>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
|
@ -145,7 +155,9 @@ boolean hideCreateAccountAndForgotPassword = false;
|
|||
%>
|
||||
|
||||
<div class="alert alert-success">
|
||||
<%= LanguageUtil.format(pageContext, "thank-you-for-creating-an-account.-you-will-be-notified-via-email-at-x-when-your-account-has-been-approved", userEmailAddress) %>
|
||||
<%=LanguageUtil.format(pageContext,
|
||||
"thank-you-for-creating-an-account.-you-will-be-notified-via-email-at-x-when-your-account-has-been-approved",
|
||||
userEmailAddress)%>
|
||||
</div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
|
@ -177,17 +189,16 @@ boolean hideCreateAccountAndForgotPassword = false;
|
|||
|
||||
if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) {
|
||||
loginLabel = "email-address";
|
||||
}
|
||||
else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
|
||||
} else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
|
||||
loginLabel = "screen-name";
|
||||
}
|
||||
else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
|
||||
} else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
|
||||
loginLabel = "id";
|
||||
}
|
||||
%>
|
||||
<div class="custom-form-login-wrapper">
|
||||
<aui:input
|
||||
autoFocus="<%= windowState.equals(LiferayWindowState.EXCLUSIVE) || windowState.equals(WindowState.MAXIMIZED) %>"
|
||||
autoFocus="<%=windowState.equals(LiferayWindowState.EXCLUSIVE)
|
||||
|| windowState.equals(WindowState.MAXIMIZED)%>"
|
||||
cssClass="clearable login-identifier input-xlarge"
|
||||
placeholder="<%=loginLabel%>" label="" name="login"
|
||||
showRequiredLabel="<%=false%>" type="text">
|
||||
|
@ -219,7 +230,12 @@ boolean hideCreateAccountAndForgotPassword = false;
|
|||
</aui:fieldset>
|
||||
|
||||
</aui:form>
|
||||
|
||||
<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>
|
||||
<liferay-util:include page="/html/portlet/login/navigation.jsp" />
|
||||
|
||||
<c:if test="<%=socials.length > 0%>">
|
||||
|
|
Loading…
Reference in New Issue