From 55b1419bc0b81646222b6814777bc3fbe384ffb4 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Thu, 25 Oct 2018 14:31:01 +0000 Subject: [PATCH] git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/liferay62-plugins/login-hook@173823 82a268e6-3cf1-43bd-a215-b396298e98cf --- distro/changelog.xml | 3 + pom.xml | 2 +- src/main/resources/portal.properties | 2 +- .../html/portlet/login/css/login-hook.css | 54 ++- .../custom_jsps/html/portlet/login/login.jsp | 353 +++++++++--------- .../login/navigation/create_account.jsp | 35 ++ .../login/navigation/forgot_password.jsp | 39 ++ .../WEB-INF/liferay-plugin-package.properties | 2 +- 8 files changed, 303 insertions(+), 187 deletions(-) create mode 100644 src/main/webapp/META-INF/custom_jsps/html/portlet/login/navigation/create_account.jsp create mode 100644 src/main/webapp/META-INF/custom_jsps/html/portlet/login/navigation/forgot_password.jsp diff --git a/distro/changelog.xml b/distro/changelog.xml index b39752f..9a8ca3f 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,7 @@ + + Restyled login page + Implemented support for oAuth 2 diff --git a/pom.xml b/pom.xml index c9e3f70..45ae1b6 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ login-hook war login-hook Hook - 1.3.1-SNAPSHOT + 1.4.0-SNAPSHOT scm:svn:https://svn.d4science.research-infrastructures.eu/gcube/branches/portal/login-hook/1.2 diff --git a/src/main/resources/portal.properties b/src/main/resources/portal.properties index 49f963e..d1b9ee5 100644 --- a/src/main/resources/portal.properties +++ b/src/main/resources/portal.properties @@ -10,4 +10,4 @@ ## ## ########################################################################################################################### -login.form.navigation.socials=google, linkedIn \ No newline at end of file +login.form.navigation.socials=google, linkedIn, shibboleth \ No newline at end of file diff --git a/src/main/webapp/META-INF/custom_jsps/html/portlet/login/css/login-hook.css b/src/main/webapp/META-INF/custom_jsps/html/portlet/login/css/login-hook.css index 88be589..2fce9b2 100644 --- a/src/main/webapp/META-INF/custom_jsps/html/portlet/login/css/login-hook.css +++ b/src/main/webapp/META-INF/custom_jsps/html/portlet/login/css/login-hook.css @@ -1,3 +1,21 @@ +.aui .portlet { + background-color: transparent; + border: none; +} +.aui .portlet-topper { + background-color: transparent; + display: none; +} + +.portlet-login .accordion { + margin-top: 40px; +} + +.portlet-login div.navigation, #signinmodal div.navigation { + background: none; + background-color: transparent; +} + .portlet-login .accordion .accordion-heading > a, #signinmodal .accordion .accordion-heading > a{ display: block; text-align: center; @@ -11,11 +29,21 @@ border-top: none; } -.portlet-login div.navigation, #signinmodal div.navigation { - background: white; - border-top: none; +.portlet-login #d4s-signin-form { + background-color: transparent; + padding: 5px; + border-radius: 6px; } +.portlet-login input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { + background-color: white !important; +} + +/* .portlet-login div.navigation, #signinmodal div.navigation { */ +/* background: white; */ +/* border-top: none; */ +/* } */ + .portlet-login input.login-identifier, .portlet-login input.login-password, #signinmodal input.login-identifier, #signinmodal input.login-password { border-radius: 5px; @@ -38,7 +66,12 @@ } .portlet-login .portlet-content-container .login-sign-in { - display:none; + font-size: 16px; + font-weight: 400; + line-height: 2.2; + color: #01497C; + text-align: left; + padding: 0 10px 10px; } .portlet-login .login-remember-me, #signinmodal .login-remember-me { @@ -51,10 +84,11 @@ } .portlet-login .navigation li[role=presentation] > a, -#signinmodal .navigation li[role=presentation] > a, -.portlet-login .login-remember-me label, -#signinmodal .login-remember-me label { - color: #9E9696; +#signinmodal .navigation li[role=presentation] > a { + color: #01497C; + font-size: 1.2em; + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + line-height: 20px; } .portlet-login form, #signinmodal form{ @@ -66,7 +100,7 @@ } .portlet-login .navigation, #signinmodal .navigation{ - padding : 0px 10px 10px 10px; + padding : 10px; } .portlet-login .custom-form-login-wrapper, #signinmodal .custom-form-login-wrapper{ @@ -86,5 +120,5 @@ .portlet-login .social, #signinmodal .social { - margin-bottom: 5px; + margin-bottom: 15px; } \ No newline at end of file diff --git a/src/main/webapp/META-INF/custom_jsps/html/portlet/login/login.jsp b/src/main/webapp/META-INF/custom_jsps/html/portlet/login/login.jsp index 77dcf9b..4ca99c9 100644 --- a/src/main/webapp/META-INF/custom_jsps/html/portlet/login/login.jsp +++ b/src/main/webapp/META-INF/custom_jsps/html/portlet/login/login.jsp @@ -47,7 +47,7 @@ %> - + <% String signedInAs = HtmlUtil.escape(user.getFullName()); @@ -74,204 +74,209 @@ String workSpaceMarkUp = "" + LanguageUtil.get(pageContext, "shared-workspace") + ""; %> - +
<%=LanguageUtil.format(pageContext, "you-are-signed-in-as-x", signedInAs, false)%>
+
<%=LanguageUtil.format(pageContext, "go-to-x", siteMarkUp, false)%>
+
<%=LanguageUtil.format(pageContext, "go-to-x", workSpaceMarkUp, false)%> - +
- <% - String redirect = ParamUtil.getString(request, "redirect"); - %> +
+
+ <% + String redirect = ParamUtil.getString(request, "redirect"); + %> - - <%@ include file="/html/portlet/login/RequestingApplication.jsp"%> - + + <%@ include file="/html/portlet/login/RequestingApplication.jsp"%> + - - - <% - String login = LoginUtil.getLogin(request, "login", company); - String password = StringPool.BLANK; - boolean rememberMe = ParamUtil.getBoolean(request, "rememberMe"); - - if (Validator.isNull(authType)) { - authType = company.getAuthType(); - } - %> - - - - - - - - - - - - - - - <% - String userEmailAddress = (String) SessionMessages.get(request, "userAdded"); - String userPassword = (String) SessionMessages.get(request, "userAddedPassword"); - %> - -
- - - <%=LanguageUtil.get(pageContext, "thank-you-for-creating-an-account")%> - - - <%=LanguageUtil.format(pageContext, - "your-email-verification-code-has-been-sent-to-x", - userEmailAddress)%> - - - - <%=LanguageUtil.get(pageContext, "thank-you-for-creating-an-account")%> Please login now. - - - - <%-- - <%= LanguageUtil.format(pageContext, "your-password-has-been-sent-to-x", userEmailAddress) %> - --%> -
-
- - - <% - String userEmailAddress = (String) SessionMessages.get(request, "userPending"); - %> - -
- <%=LanguageUtil.format(pageContext, - "thank-you-for-creating-an-account.-you-will-be-notified-via-email-at-x-when-your-account-has-been-approved", - userEmailAddress)%> -
-
-
- - - - - - - - - - - - + <% - String loginLabel = null; + String login = LoginUtil.getLogin(request, "login", company); + String password = StringPool.BLANK; + boolean rememberMe = ParamUtil.getBoolean(request, "rememberMe"); - 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"; - } + if (Validator.isNull(authType)) { + authType = company.getAuthType(); + } %> -