Skip to content

Commit

Permalink
Remove super tenant specific layout from error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
pavinduLakshan committed Sep 5, 2023
1 parent 220f195 commit dd30d49
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 139 deletions.
113 changes: 30 additions & 83 deletions java/apps/authentication-portal/src/main/webapp/device-success.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -66,87 +66,48 @@
<% } %>
</layout:component>
<layout:component componentName="MainSection">
<%
if (!(StringUtils.equals(tenantForTheming, IdentityManagementEndpointConstants.SUPER_TENANT))) {
%>
<% if (request.getParameter("app_name") == null) { %>
<div class="ui orange attached segment mt-3">
<h3 class="ui header text-center slogan-message mt-3 mb-6">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "authentication.error")%>
</h3>
<p class="portal-tagline-description">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,
"something.went.wrong.during.authentication")%>
</p>
<div class="ui divider hidden"></div>
<div class="ui divider hidden"></div>
</div>

<%
File trackingRefFile = new File(getServletContext().getRealPath("extensions/error-tracking-reference.jsp"));
if (trackingRefFile.exists()) {
%>
<div class="ui bottom attached warning message">
<p class="text-left mt-0">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "need.help.contact.us")%>
<a href="mailto:<%= StringEscapeUtils.escapeHtml4(supportEmail) %>" target="_blank">
<span class="orange-text-color button"><%= StringEscapeUtils.escapeHtml4(supportEmail) %></span>
</a> <%=AuthenticationEndpointUtil.i18n(resourceBundle, "with.tracking.reference.below")%>
</p>


<div class="ui divider hidden"></div>
<jsp:include page="extensions/error-tracking-reference.jsp"/>
<div class="ui divider hidden"></div>
</div>
<% } %>
<% } else { %>
<div class="ui green segment mt-3 attached">
<h3 class="ui header text-center slogan-message mt-4 mb-6">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "successful")%>
<% if (request.getParameter("app_name") == null) { %>
<div class="ui orange attached segment mt-3">
<h3 class="ui header text-center slogan-message mt-3 mb-6">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "authentication.error")%>
</h3>
<p class="portal-tagline-description">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "login.success.app")%>
<%= Encode.forHtmlAttribute(request.getParameter("app_name"))%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "close.browser")%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle,
"something.went.wrong.during.authentication")%>
</p>
</div>
<% } %>
<% } else { %>
<% if (request.getParameter("app_name") == null) { %>
<h2 class="ui header portal-logo-tagline slogan-message">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "authentication.error")%>
</h2>

<h4 class="ui header sub-tagline">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,
"something.went.wrong.during.authentication")%>
</h4>

<%
File trackingRefFile = new File(getServletContext().getRealPath("extensions/error-tracking-reference.jsp"));
if (trackingRefFile.exists()) {
%>
<p class="portal-tagline-description">
<div class="ui divider hidden"></div>
<div class="ui divider hidden"></div>
</div>

<%
File trackingRefFile = new File(getServletContext().getRealPath("extensions/error-tracking-reference.jsp"));
if (trackingRefFile.exists()) {
%>
<div class="ui bottom attached warning message">
<p class="text-left mt-0">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "need.help.contact.us")%>
<a href="mailto:<%= StringEscapeUtils.escapeHtml4(supportEmail) %>" target="_blank">
<span class="orange-text-color button"><%= StringEscapeUtils.escapeHtml4(supportEmail) %></span>
</a> <%=AuthenticationEndpointUtil.i18n(resourceBundle, "with.tracking.reference.below")%>
</p>

<jsp:include page="extensions/error-tracking-reference.jsp"/>
<% } %>

<% } else { %>
<h2 class="ui header portal-logo-tagline">

<div class="ui divider hidden"></div>
<jsp:include page="extensions/error-tracking-reference.jsp"/>
<div class="ui divider hidden"></div>
</div>
<% } %>
<% } else { %>
<div class="ui green segment mt-3 attached">
<h3 class="ui header text-center slogan-message mt-4 mb-6">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "successful")%>
</h2>
</h3>
<p class="portal-tagline-description">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "login.success.app")%>
<%= Encode.forHtmlAttribute(request.getParameter("app_name"))%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "close.browser")%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "login.success.app")%>
<%= Encode.forHtmlAttribute(request.getParameter("app_name"))%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "close.browser")%>
</p>
<% } %>
</div>
<% } %>
</layout:component>
<layout:component componentName="ProductFooter">
Expand All @@ -160,20 +121,6 @@
<jsp:include page="includes/product-footer.jsp"/>
<% } %>
</layout:component>
<layout:component componentName="ResponseImage">
<%-- illustration--%>
<% if (request.getParameter("app_name") == null) { %>
<div class="thank-you-img">
<img src="libs/themes/default/assets/images/something-went-wrong.svg">
</div>
<% } else { %>
<div>
<img class="ui centered medium image"
src='libs/themes/default/assets/images/illustrations/account-creation-success.svg'
alt="password-recovery-success-illustration"/>
</div>
<% } %>
</layout:component>
</layout:main>

<%-- footer --%>
Expand Down
66 changes: 16 additions & 50 deletions java/apps/authentication-portal/src/main/webapp/mau_over_usage.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,21 @@
<% } %>
</layout:component>
<layout:component componentName="MainSection">
<div class="ui orange attached segment mt-3">
<h3 class="ui header text-center slogan-message mt-3 mb-6">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,"mau.error.msg")%>
</h3>
<p class="portal-tagline-description">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,"mau.error.description")%>
</p>
<div class="ui divider hidden"></div>
<div class="ui divider hidden"></div>
</div>

<%
if (!(StringUtils.equals(tenantForTheming, IdentityManagementEndpointConstants.SUPER_TENANT))) {
File trackingRefFile = new File(getServletContext().getRealPath("extensions/error-tracking-reference.jsp"));
if (trackingRefFile.exists()) {
%>
<div class="ui orange attached segment mt-3">
<h3 class="ui header text-center slogan-message mt-3 mb-6">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,"mau.error.msg")%>
</h3>
<p class="portal-tagline-description">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,"mau.error.description")%>
</p>
<div class="ui divider hidden"></div>
<div class="ui divider hidden"></div>
</div>

<%
File trackingRefFile = new File(getServletContext().getRealPath("extensions/error-tracking-reference.jsp"));
if (trackingRefFile.exists()) {
%>
<div class="ui bottom attached warning message">
<p class="text-left mt-0">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "need.help.contact.us")%>
Expand All @@ -83,35 +80,10 @@
</p>


<div class="ui divider hidden"></div>
<jsp:include page="extensions/error-tracking-reference.jsp"/>
<div class="ui divider hidden"></div>

<div class="ui divider hidden"></div>
<jsp:include page="extensions/error-tracking-reference.jsp"/>
<div class="ui divider hidden"></div>
</div>
<% } %>
<% } else { %>
<h2 class="ui header portal-logo-tagline slogan-message">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,"mau.error.msg")%>
</h2>

<h4 class="ui header sub-tagline">
<%=AuthenticationEndpointUtil.i18n(resourceBundle,"mau.error.description")%>
</h4>

<p class="portal-tagline-description">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "need.help.contact.us")%>
<a href="mailto:<%= StringEscapeUtils.escapeHtml4(supportEmail) %>" target="_blank">
<span class="orange-text-color button"><%= StringEscapeUtils.escapeHtml4(supportEmail) %></span>
</a> <%=AuthenticationEndpointUtil.i18n(resourceBundle, "with.tracking.reference.below")%>
</p>

<%
File trackingRefFile = new File(getServletContext().getRealPath("extensions/error-tracking-reference.jsp"));
if (trackingRefFile.exists()) {
%>
<jsp:include page="extensions/error-tracking-reference.jsp"/>
<% } %>

<% } %>
</layout:component>
<layout:component componentName="ProductFooter">
Expand All @@ -125,12 +97,6 @@
<jsp:include page="includes/product-footer.jsp"/>
<% } %>
</layout:component>
<layout:component componentName="ResponseImage">
<%-- illustration--%>
<div class="thank-you-img">
<img src="libs/themes/default/assets/images/something-went-wrong.svg">
</div>
</layout:component>
</layout:main>

<%-- footer --%>
Expand Down
6 changes: 0 additions & 6 deletions java/apps/authentication-portal/src/main/webapp/retry.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,6 @@
<jsp:include page="includes/product-footer.jsp"/>
<% } %>
</layout:component>
<layout:component componentName="ResponseImage">
<%-- illustration--%>
<div class="thank-you-img">
<img src="libs/themes/default/assets/images/something-went-wrong.svg">
</div>
</layout:component>
</layout:main>

<%-- footer --%>
Expand Down

0 comments on commit dd30d49

Please sign in to comment.