Author: taylor
Date: Fri Feb 27 21:55:38 2015
New Revision: 1662824
URL: http://svn.apache.org/r1662824
Log:
JS2-1317: Improve core J2-Admin portlets to make use of responsive styles when
portal page is configured for responsive.
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/chgpwd/change-password.jsp
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login-prefs.jsp
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login.jsp
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/sso/sso-changepwd-view.vm
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/chgpwd/change-password.jsp
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/chgpwd/change-password.jsp?rev=1662824&r1=1662823&r2=1662824&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/chgpwd/change-password.jsp
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/chgpwd/change-password.jsp
Fri Feb 27 21:55:38 2015
@@ -29,77 +29,155 @@ limitations under the License.
<c:if test="${empty portalContextPathInUrlTag}">
<c:set var="portalContextPathInUrlTag" value="/"/>
</c:if>
-<div class="portlet-section-text">
+<c_rt:set var="responsive"
value='${requestContext.getAttribute("org.apache.jetspeed.theme.responsive")}'/>
<c:choose>
- <c:when test="${pageContext.request.userPrincipal != null}">
+ <c:when test='${responsive}'>
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
- <c:set var="whyKey"><%=ChangePasswordPortlet.WHY%></c:set>
- <c:set var="why" value="${requestScope[whyKey]}"/>
- <c:set var="requiredKey"><%=ChangePasswordPortlet.REQUIRED%></c:set>
- <c:set var="required" value="${requestScope[requiredKey]}"/>
- <c:set
var="errorMessagesKey"><%=ChangePasswordPortlet.ERROR_MESSAGES%></c:set>
- <c:set var="errorMessages" value="${requestScope[errorMessagesKey]}"/>
-
- <c:if test="${why != null}">
- <i><c:out value="${why}"/></i>
- <br/>
- </c:if>
- <c:if test="${errorMessages != null}">
- <ul>
- <c:forEach items="${errorMessages}" var="error">
- <li style="color:red"><c:out value="${error}"/></li>
- </c:forEach>
- </ul>
- </c:if>
-
- <c_rt:set var="passwordChangedKey"
value="<%=ChangePasswordPortlet.PASSWORD_CHANGED%>"/>
- <c:set var="p" value="${requestScope[passwordChangedKey]}"/>
- <c:if test="${requestScope[passwordChangedKey] != null}">
- <br>
- <i><fmt:message key="chgpwd.message.passwordChanged"/></i>
- <br><br>
- </c:if>
-
- <form method="POST" action='<portlet:actionURL/>'>
- <table border="0">
- <tr>
- <td><fmt:message key="chgpwd.label.currentPassword"/></td>
- <td><input type="password" size="30"
name="<%=ChangePasswordPortlet.CURRENT_PASSWORD%>"></td>
- </tr>
- <tr>
- <td><fmt:message key="chgpwd.label.newPassword"/></td>
- <td><input type="password" size="30"
name="<%=ChangePasswordPortlet.NEW_PASSWORD%>"></td>
- </tr>
- <tr>
- <td><fmt:message key="chgpwd.label.newPasswordAgain"/></td>
- <td><input type="password" size="30"
name="<%=ChangePasswordPortlet.NEW_PASSWORD_AGAIN%>"></td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="submit" value="<fmt:message key="chgpwd.label.save"/>">
- <c:if test="${why != null}">
- <c:choose>
- <c:when test="${required == null}">
-
- <c_rt:set var="cancelItem"
value="<%=ChangePasswordPortlet.CANCELLED%>"/>
- <input type="checkbox" style="display:none" name="<c:out
value="${cancelItem}"/>">
- <input type="submit"
- value="<fmt:message key="chgpwd.label.cancel"/>"
- onClick="this.form.<c:out
value="${cancelItem}"/>.checked=true">
- </c:when>
- <c:otherwise>
- <br/><br/>
- <a href='<c:url context="${portalContextPathInUrlTag}"
value="/login/logout"/>'><fmt:message key="chgpwd.label.Logout"/></a>
- </c:otherwise>
- </c:choose>
- </c:if>
- </td>
- </tr>
- </table>
- </form>
+ <c:set var="whyKey"><%=ChangePasswordPortlet.WHY%></c:set>
+ <c:set var="why" value="${requestScope[whyKey]}"/>
+ <c:set var="requiredKey"><%=ChangePasswordPortlet.REQUIRED%></c:set>
+ <c:set var="required" value="${requestScope[requiredKey]}"/>
+ <c:set
var="errorMeagesKey"><%=ChangePasswordPortlet.ERROR_MESSAGES%></c:set>
+ <c:set var="errorMessages" value="${requestScope[errorMessagesKey]}"/>
+
+ <c:if test="${why != null}">
+ <i><c:out value="${why}"/></i>
+ <br/>
+ </c:if>
+ <c:if test="${errorMessages != null}">
+ <ul>
+ <c:forEach items="${errorMessages}" var="error">
+ <li style="color:red"><c:out value="${error}"/></li>
+ </c:forEach>
+ </ul>
+ </c:if>
+
+ <c_rt:set var="passwordChangedKey"
value="<%=ChangePasswordPortlet.PASSWORD_CHANGED%>"/>
+ <c:set var="p" value="${requestScope[passwordChangedKey]}"/>
+ <c:if test="${requestScope[passwordChangedKey] != null}">
+ <br>
+ <i><fmt:message key="chgpwd.message.passwordChanged"/></i>
+ <br><br>
+ </c:if>
+
+ <form class="form-horizontal" method="POST"
action='<portlet:actionURL/>'>
+ <div class="form-group">
+ <label for="<%=ChangePasswordPortlet.CURRENT_PASSWORD%>"
class="col-sm-3 control-label"><fmt:message
key="chgpwd.label.currentPassword"/></label>
+ <div class="col-sm-9"><input type="password" class="form-control"
name="<%=ChangePasswordPortlet.CURRENT_PASSWORD%>"></div>
+ </div>
+ <div class="form-group">
+ <label for="<%=ChangePasswordPortlet.NEW_PASSWORD%>"
class="col-sm-3 control-label"><fmt:message
key="chgpwd.label.newPassword"/></label>
+ <div class="col-sm-9"><input type="password" class="form-control"
name="<%=ChangePasswordPortlet.NEW_PASSWORD%>"></div>
+ </div>
+ <div class="form-group">
+ <label for="<%=ChangePasswordPortlet.NEW_PASSWORD_AGAIN%>"
class="col-sm-3 control-label"><fmt:message
key="chgpwd.label.newPasswordAgain"/></label>
+ <div class="col-sm-9"><input type="password" class="form-control"
name="<%=ChangePasswordPortlet.NEW_PASSWORD_AGAIN%>"></div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> </label>
+ <div class="col-sm-9">
+ <button type="submit" class="btn btn-default"><fmt:message
key="chgpwd.label.save"/></button>
+ <c:if test="${why != null}">
+ <c:choose>
+ <c:when test="${required == null}">
+
+ <c_rt:set var="cancelItem"
value="<%=ChangePasswordPortlet.CANCELLED%>"/>
+ <input type="checkbox" style="display:none" name="<c:out
value="${cancelItem}"/>">
+ <button type="submit"
+ onClick="this.form.<c:out
value="${cancelItem}"/>.checked=true"><fmt:message key="chgpwd.label.cancel"
/></button>
+ </c:when>
+ <c:otherwise>
+ <br/><br/>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="/login/logout"/>'><fmt:message key="chgpwd.label.Logout"/></a>
+ </c:otherwise>
+ </c:choose>
+ </c:if>
+ </div>
+ </div>
+ </form>
+ </c:when>
+ <c:otherwise>
+ <fmt:message key="chgpwd.error.notLoggedOn"/><br>
+ </c:otherwise>
+ </c:choose>
</c:when>
<c:otherwise>
- <fmt:message key="chgpwd.error.notLoggedOn"/><br>
+ <div class="portlet-section-text">
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
+
+ <c:set var="whyKey"><%=ChangePasswordPortlet.WHY%></c:set>
+ <c:set var="why" value="${requestScope[whyKey]}"/>
+ <c:set var="requiredKey"><%=ChangePasswordPortlet.REQUIRED%></c:set>
+ <c:set var="required" value="${requestScope[requiredKey]}"/>
+ <c:set var="errorMe
+ agesKey"><%=ChangePasswordPortlet.ERROR_MESSAGES%></c:set>
+ <c:set var="errorMessages"
value="${requestScope[errorMessagesKey]}"/>
+
+ <c:if test="${why != null}">
+ <i><c:out value="${why}"/></i>
+ <br/>
+ </c:if>
+ <c:if test="${errorMessages != null}">
+ <ul>
+ <c:forEach items="${errorMessages}" var="error">
+ <li style="color:red"><c:out value="${error}"/></li>
+ </c:forEach>
+ </ul>
+ </c:if>
+
+ <c_rt:set var="passwordChangedKey"
value="<%=ChangePasswordPortlet.PASSWORD_CHANGED%>"/>
+ <c:set var="p" value="${requestScope[passwordChangedKey]}"/>
+ <c:if test="${requestScope[passwordChangedKey] != null}">
+ <br>
+ <i><fmt:message key="chgpwd.message.passwordChanged"/></i>
+ <br><br>
+ </c:if>
+
+ <form method="POST" action='<portlet:actionURL/>'>
+ <table border="0">
+ <tr>
+ <td><fmt:message key="chgpwd.label.currentPassword"/></td>
+ <td><input type="password" size="30"
name="<%=ChangePasswordPortlet.CURRENT_PASSWORD%>"></td>
+ </tr>
+ <tr>
+ <td><fmt:message key="chgpwd.label.newPassword"/></td>
+ <td><input type="password" size="30"
name="<%=ChangePasswordPortlet.NEW_PASSWORD%>"></td>
+ </tr>
+ <tr>
+ <td><fmt:message key="chgpwd.label.newPasswordAgain"/></td>
+ <td><input type="password" size="30"
name="<%=ChangePasswordPortlet.NEW_PASSWORD_AGAIN%>"></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type="submit" value="<fmt:message
key="chgpwd.label.save"/>">
+ <c:if test="${why != null}">
+ <c:choose>
+ <c:when test="${required == null}">
+
+ <c_rt:set var="cancelItem"
value="<%=ChangePasswordPortlet.CANCELLED%>"/>
+ <input type="checkbox" style="display:none"
name="<c:out value="${cancelItem}"/>">
+ <input type="submit"
+ value="<fmt:message key="chgpwd.label.cancel"/>"
+ onClick="this.form.<c:out
value="${cancelItem}"/>.checked=true">
+ </c:when>
+ <c:otherwise>
+ <br/><br/>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="/login/logout"/>'><fmt:message key="chgpwd.label.Logout"/></a>
+ </c:otherwise>
+ </c:choose>
+ </c:if>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </c:when>
+ <c:otherwise>
+ <fmt:message key="chgpwd.error.notLoggedOn"/><br>
+ </c:otherwise>
+ </c:choose>
+ </div>
</c:otherwise>
</c:choose>
-</div>
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp?rev=1662824&r1=1662823&r2=1662824&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/login.jsp
Fri Feb 27 21:55:38 2015
@@ -38,52 +38,110 @@ limitations under the License.
<c:set var="destLogout"
value="/login/logout?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
<c:set var="destAccount"
value="/desktop/my-account.psml?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
</c:if>
-<div class="portlet-section-text">
+<c:set var="responsive"
value='${requestContext.getAttribute("org.apache.jetspeed.theme.responsive")}'/>
<c:choose>
- <c:when test="${pageContext.request.userPrincipal != null}">
- <fmt:message key="login.label.Welcome"><fmt:param><c:out
value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
- <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destLogout}"/>'><fmt:message key="login.label.Logout"/></a>
- <br>
- <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destAccount}"/>'><fmt:message key="login.label.ChangePassword"/></a>
+ <c:when test='${responsive}'>
+ <div>
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
+ <fmt:message key="login.label.Welcome"><fmt:param><c:out
value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destLogout}"/>'><fmt:message key="login.label.Logout"/></a>
+ <br>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destAccount}"/>'><fmt:message key="login.label.ChangePassword"/></a>
+ </c:when>
+ <c:otherwise>
+ <%-- backdoor access to the portal session to get the login error
count --%>
+ <c_rt:set var="errorCode"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.ERRORCODE)%>"/>
+ <c:choose>
+ <c:when test="${not empty errorCode}">
+ <div class="portlet-msg-alert">
+ <fmt:message key="login.label.ErrorCode.${errorCode}"/>
+ </div>
+ <br>
+ </c:when>
+ <c:otherwise>
+ <c_rt:set var="retryCount"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.RETRYCOUNT)%>"/>
+ <c:if test="${not empty retryCount}">
+ <div class="portlet-msg-alert">
+ <fmt:message
key="login.label.InvalidUsernameOrPassword"><fmt:param
value="${retryCount}"/></fmt:message>
+ </div>
+ <br>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ <form class="form-horizontal" method="POST" action='<c:url
context="${portalContextPathInUrlTag}" value="${destLogin}"/>'>
+ <div class="form-group">
+ <label for="<%=LoginConstants.USERNAME%>" class="col-sm-3
control-label"><fmt:message key="login.label.Username"/></label>
+ <div class="col-sm-9">
+ <c_rt:set var="userName"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/>
+ <input type="text" class="form-control"
name="<%=LoginConstants.USERNAME%>" id="<%=LoginConstants.USERNAME%>"
value="<c:out value="${userName}"/>">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="<%=LoginConstants.PASSWORD%>" class="col-sm-3
control-label"><fmt:message key="login.label.Password"/></label>
+ <div class="col-sm-9">
+ <input type="password" class="form-control"
name="<%=LoginConstants.PASSWORD%>" id="<%=LoginConstants.PASSWORD%>"></td>
+ </div>
+ </div>
+ <div class="form-group no-margin-bottom">
+ <div class="col-sm-offset-3 col-sm-9">
+ <button type="submit" class="btn btn-default"><fmt:message
key="login.label.Login"/></button>
+ </div>
+ </div>
+ </form>
+ </c:otherwise>
+ </c:choose>
+ </div>
</c:when>
<c:otherwise>
- <%-- backdoor access to the portal session to get the login error count
--%>
- <c_rt:set var="errorCode"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.ERRORCODE)%>"/>
- <c:choose>
- <c:when test="${not empty errorCode}">
- <br>
- <div class="portlet-msg-alert">
- <fmt:message key="login.label.ErrorCode.${errorCode}"/>
- </div>
- <br>
- </c:when>
- <c:otherwise>
- <c_rt:set var="retryCount"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.RETRYCOUNT)%>"/>
- <c:if test="${not empty retryCount}">
- <br>
- <div class="portlet-msg-alert">
- <fmt:message
key="login.label.InvalidUsernameOrPassword"><fmt:param
value="${retryCount}"/></fmt:message>
- </div>
+ <div class="portlet-section-text">
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
+ <fmt:message key="login.label.Welcome"><fmt:param><c:out
value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destLogout}"/>'><fmt:message key="login.label.Logout"/></a>
<br>
- </c:if>
- </c:otherwise>
- </c:choose>
- <form method="POST" action='<c:url context="${portalContextPathInUrlTag}"
value="${destLogin}"/>'>
- <table border="0">
- <tr>
- <td><div class="portlet-form-field-label"><fmt:message
key="login.label.Username"/></div></td>
- <c_rt:set var="userName"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/>
- <td><input type="text" class="portlet-form-field" size="30"
name="<%=LoginConstants.USERNAME%>" value="<c:out value="${userName}"/>"></td>
- </tr>
- <tr>
- <td><div class="portlet-form-field-label"><fmt:message
key="login.label.Password"/></div></td>
- <td><input type="password" class="portlet-form-field" size="30"
name="<%=LoginConstants.PASSWORD%>"></td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" class="portlet-form-button"
value="<fmt:message key="login.label.Login"/>"></td>
- </tr>
- </table>
- </form>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destAccount}"/>'><fmt:message key="login.label.ChangePassword"/></a>
+ </c:when>
+ <c:otherwise>
+ <%-- backdoor access to the portal session to get the login error
count --%>
+ <c_rt:set var="errorCode"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.ERRORCODE)%>"/>
+ <c:choose>
+ <c:when test="${not empty errorCode}">
+ <br>
+ <div class="portlet-msg-alert">
+ <fmt:message key="login.label.ErrorCode.${errorCode}"/>
+ </div>
+ <br>
+ </c:when>
+ <c:otherwise>
+ <c_rt:set var="retryCount"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.RETRYCOUNT)%>"/>
+ <c:if test="${not empty retryCount}">
+ <br>
+ <div class="portlet-msg-alert">
+ <fmt:message
key="login.label.InvalidUsernameOrPassword"><fmt:param
value="${retryCount}"/></fmt:message>
+ </div>
+ <br>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ <form method="POST" action='<c:url
context="${portalContextPathInUrlTag}" value="${destLogin}"/>'>
+ <table border="0">
+ <tr>
+ <td><div class="portlet-form-field-label"><fmt:message
key="login.label.Username"/></div></td>
+ <c_rt:set var="userName"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/>
+ <td><input type="text" class="portlet-form-field" size="30"
name="<%=LoginConstants.USERNAME%>" value="<c:out value="${userName}"/>"></td>
+ </tr>
+ <tr>
+ <td><div class="portlet-form-field-label"><fmt:message
key="login.label.Password"/></div></td>
+ <td><input type="password" class="portlet-form-field"
size="30" name="<%=LoginConstants.PASSWORD%>"></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit"
class="portlet-form-button" value="<fmt:message key="login.label.Login"/>"></td>
+ </tr>
+ </table>
+ </form>
+ </c:otherwise>
+ </c:choose>
+ </div>
</c:otherwise>
-</c:choose>
-</div>
\ No newline at end of file
+ </c:choose>
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login-prefs.jsp
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login-prefs.jsp?rev=1662824&r1=1662823&r2=1662824&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login-prefs.jsp
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login-prefs.jsp
Fri Feb 27 21:55:38 2015
@@ -116,7 +116,7 @@ limitations under the License.
</td>
</tr>
<tr>
- <td colspan="2"><input type="submit" name="${saveAction}"
value="Save"/><input type="submit" value="Cancel"/></td>
+ <td colspan="2"><input type="submit" class="btn btn-default"
name="${saveAction}" value="Save"/><input type="submit" class="btn btn-default"
value="Cancel"/></td>
</tr>
</table>
</form>
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login.jsp
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login.jsp?rev=1662824&r1=1662823&r2=1662824&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login.jsp
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/openid-login.jsp
Fri Feb 27 21:55:38 2015
@@ -21,10 +21,12 @@ limitations under the License.
<%@page import="org.apache.jetspeed.openid.OpenIDConstants"%>
<%@page import="org.apache.jetspeed.portlets.openid.OpenIDLoginPortlet"%>
+<%@page import="org.apache.jetspeed.request.RequestContext"%>
<fmt:setBundle
basename="org.apache.jetspeed.portlets.security.resources.OpenIDLoginResources"/>
<portlet:defineObjects/>
+<c_rt:set var="requestContext"
value="<%=request.getAttribute(RequestContext.REQUEST_PORTALENV)%>"/>
<c_rt:set var="openIDReturn" value="<%=OpenIDConstants.OPEN_ID_RETURN%>"/>
<c_rt:set var="openIDDiscovery"
value="<%=OpenIDConstants.OPEN_ID_DISCOVERY%>"/>
<c_rt:set var="openIDProvider" value="<%=OpenIDConstants.OPEN_ID_PROVIDER%>"/>
@@ -35,35 +37,82 @@ limitations under the License.
<c_rt:set var="providerButtons"
value="<%=renderRequest.getAttribute(OpenIDLoginPortlet.PROVIDER_BUTTONS_ATTR_NAME)%>"/>
<c_rt:set var="enableOpenIDEntry"
value="<%=renderRequest.getAttribute(OpenIDLoginPortlet.ENABLE_OPEN_ID_ENTRY_ATTR_NAME)%>"/>
+<c_rt:set var="responsive"
value='${requestContext.getAttribute("org.apache.jetspeed.theme.responsive")}'/>
-<div class="portlet-section-text">
- <c:choose>
- <c:when test="${pageContext.request.userPrincipal != null}">
- <fmt:message key="openid-login.label.Welcome"><fmt:param><c:out
value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message>
- <form method="POST" action='<portlet:actionURL/>'>
- <input type="submit" value='<fmt:message
key="openid-login.label.Logout"/>'/>
- <input type="hidden" name="${openIDRequest}"
value="${openIDLogoutRequest}"/>
- </form>
- </c:when>
- <c:otherwise>
- <c:if test="${openIDError != null}"><div
class="portlet-msg-alert"><fmt:message
key="openid-login.label.${openIDError}"/></div><br/></c:if>
- <c:if test="${not empty providerButtons}">
- <form method="POST" action='<portlet:actionURL/>'>
- <input type="hidden" name="${openIDProvider}"/>
- <c:forEach var="providerButton" items="${providerButtons}">
- <input type="submit" value='<fmt:message
key="openid-login.label.ProviderLogin"><fmt:param><c:out
value="${providerButton.value}"/></fmt:param></fmt:message>'
onclick="this.form.elements[0].value='${providerButton.key}'; true"/>
- </c:forEach>
- <input type="hidden" name="${openIDRequest}"
value="${openIDLoginRequest}"/>
- </form>
- </c:if>
- <c:if test="${enableOpenIDEntry == 'true'}">
- <form method="POST" action='<portlet:actionURL/>'>
- <span class="portlet-form-field-label"><fmt:message
key="openid-login.label.OpenID"/></span>
- <input type="text" class="portlet-form-field" size="30"
name="${openIDDiscovery}"/>
- <input type="submit" class="portlet-form-button" value='<fmt:message
key="openid-login.label.Login"/>'/>
- <input type="hidden" name="${openIDRequest}"
value="${openIDLoginRequest}"/>
- </form>
- </c:if>
- </c:otherwise>
- </c:choose>
-</div>
+<c:choose>
+ <c:when test='${responsive}'>
+ <div >
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
+ <fmt:message key="openid-login.label.Welcome"><fmt:param><c:out
value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message>
+ <form method="POST" action='<portlet:actionURL/>'>
+ <input type="submit" class="btn btn-default" value='<fmt:message
key="openid-login.label.Logout"/>'/>
+ <input type="hidden" name="${openIDRequest}"
value="${openIDLogoutRequest}"/>
+ </form>
+ </c:when>
+ <c:otherwise>
+ <c:if test="${openIDError != null}"><div
class="portlet-msg-alert"><fmt:message
key="openid-login.label.${openIDError}"/></div><br/></c:if>
+ <c:if test="${not empty providerButtons}">
+ <form class="form-horizontal" method="POST"
action='<portlet:actionURL/>'>
+ <div class="form-group">
+ <div class="col-xs-12 col-sm-12">
+ <c:forEach var="providerButton" items="${providerButtons}">
+ <input class="btn btn-default" type="submit"
value='<fmt:message key="openid-login.label.ProviderLogin"><fmt:param><c:out
value="${providerButton.value}"/></fmt:param></fmt:message>'
onclick="this.form.elements[0].value='${providerButton.key}'; true"/>
+ </c:forEach>
+ </div>
+ </div>
+ <input type="hidden" name="${openIDProvider}"/>
+ <input type="hidden" id="${openIDRequest}
name="${openIDRequest}" value="${openIDLoginRequest}"/>
+ </form>
+ </c:if>
+ <c:if test="${enableOpenIDEntry == 'true'}">
+ <form class='form-horizontal' method="POST"
action='<portlet:actionURL/>'>
+ <label for="${openIDDiscovery}" class="control-label
text-left"><fmt:message key="openid-login.label.OpenID"/>:</label>
+ <div class="input-group col-xs-12">
+ <input type="text" class="form-control"
name="${openIDDiscovery}"/>
+ <span class="input-group-btn">
+ <input type="submit" class="btn btn-default"
value='<fmt:message key="openid-login.label.Login"/>'/>
+ </span>
+ </div>
+ <input type="hidden" name="${openIDRequest}"
value="${openIDLoginRequest}"/>
+ </form>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ </div>
+ </c:when>
+ <c:otherwise>
+ <div class="portlet-section-text">
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
+ <fmt:message key="openid-login.label.Welcome"><fmt:param><c:out
value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message>
+ <form method="POST" action='<portlet:actionURL/>'>
+ <input type="submit" value='<fmt:message
key="openid-login.label.Logout"/>'/>
+ <input type="hidden" name="${openIDRequest}"
value="${openIDLogoutRequest}"/>
+ </form>
+ </c:when>
+ <c:otherwise>
+ <c:if test="${openIDError != null}"><div
class="portlet-msg-alert"><fmt:message
key="openid-login.label.${openIDError}"/></div><br/></c:if>
+ <c:if test="${not empty providerButtons}">
+ <form method="POST" action='<portlet:actionURL/>'>
+ <input type="hidden" name="${openIDProvider}"/>
+ <c:forEach var="providerButton" items="${providerButtons}">
+ <input type="submit" value='<fmt:message
key="openid-login.label.ProviderLogin"><fmt:param><c:out
value="${providerButton.value}"/></fmt:param></fmt:message>'
onclick="this.form.elements[0].value='${providerButton.key}'; true"/>
+ </c:forEach>
+ <input type="hidden" name="${openIDRequest}"
value="${openIDLoginRequest}"/>
+ </form>
+ </c:if>
+ <c:if test="${enableOpenIDEntry == 'true'}">
+ <form method="POST" action='<portlet:actionURL/>'>
+ <br/>
+ <span class="portlet-form-field-label"><fmt:message
key="openid-login.label.OpenID"/></span>
+ <input type="text" class="portlet-form-field" size="30"
name="${openIDDiscovery}"/>
+ <input type="submit" class="portlet-form-button"
value='<fmt:message key="openid-login.label.Login"/>'/>
+ <input type="hidden" name="${openIDRequest}"
value="${openIDLoginRequest}"/>
+ </form>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ </div>
+ </c:otherwise>
+</c:choose>
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp?rev=1662824&r1=1662823&r2=1662824&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/login/portal-login.jsp
Fri Feb 27 21:55:38 2015
@@ -39,8 +39,11 @@ limitations under the License.
<c:set var="destLogout"
value="/login/logout?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
<c:set var="destAccount"
value="/desktop/my-account.psml?${loginDestination}=${requestContext.request.contextPath}/desktop"/>
</c:if>
-
<c_rt:set var="contentType"
value="<%=renderRequest.getResponseContentType()%>"/>
+
+<c:set var="responsive"
value='${requestContext.getAttribute("org.apache.jetspeed.theme.responsive")}'/>
+<c:choose>
+<c:when test='${responsive}'>
<c:choose>
<c:when test="${contentType == 'text/vnd.wap.wml'}">
<c:choose>
@@ -101,23 +104,113 @@ limitations under the License.
</c:if>
</c:otherwise>
</c:choose>
- <form method="POST" action='<c:url context="${portalContextPathInUrlTag}"
value="${destLogin}"/>'>
- <table border="0">
- <tr>
- <td><fmt:message key="login.label.Username"/></td>
+ <form class="form-horizontal" method="POST" action='<c:url
context="${portalContextPathInUrlTag}" value="${destLogin}"/>'>
<c_rt:set var="userName"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/>
- <td><input type="text" size="30" name="<%=LoginConstants.USERNAME%>"
value="<c:out value="${userName}"/>"></td>
- </tr>
- <tr>
- <td><fmt:message key="login.label.Password"/></td>
- <td><input type="password" size="30"
name="<%=LoginConstants.PASSWORD%>"></td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" value="<fmt:message
key="login.label.Login"/>"></td>
- </tr>
- </table>
+
+ <div class="form-group">
+ <label for="<%=LoginConstants.USERNAME%>" class="col-sm-3
control-label"><fmt:message key="login.label.Username"/></label>
+ <div class="col-sm-9">
+ <c_rt:set var="userName"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/>
+ <input type="text" class="form-control"
name="<%=LoginConstants.USERNAME%>" id="<%=LoginConstants.USERNAME%>"
value="<c:out value="${userName}"/>">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="<%=LoginConstants.PASSWORD%>" class="col-sm-3
control-label"><fmt:message key="login.label.Password"/></label>
+ <div class="col-sm-9">
+ <input type="password" class="form-control"
name="<%=LoginConstants.PASSWORD%>" id="<%=LoginConstants.PASSWORD%>"></td>
+ </div>
+ </div>
+ <div class="form-group no-margin-bottom">
+ <div class="col-sm-offset-3 col-sm-9">
+ <button type="submit" class="btn btn-default"><fmt:message
key="login.label.Login"/></button>
+ </div>
+ </div>
</form>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
+</c:when>
+<c:otherwise>
+ <c:choose>
+ <c:when test="${contentType == 'text/vnd.wap.wml'}">
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
+ <p>Logged on... </p>
+ </c:when>
+ <c:otherwise>
+ <c_rt:set var="errorCode"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.ERRORCODE)%>"/>
+ <c:choose>
+ <c:when test="${not empty errorCode}">
+ <br>
+ <p><fmt:message
key="login.label.ErrorCode.${errorCode}"/></p>
+ <br>
+ </c:when>
+ <c:otherwise>
+ <c_rt:set var="retryCount"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.RETRYCOUNT)%>"/>
+ <c:if test="${not empty retryCount}">
+ <br>
+ <p><fmt:message
key="login.label.InvalidUsernameOrPassword"><fmt:param
value="${retryCount}"/></fmt:message></p>
+ <br>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ <p>Username: <input name="username" value='admin'/></p>
+ <p>Password: <input name="password" value='blue'/></p>
+ <do type="accept" label="login">
+ <go href="<c:url
context="${portalContextPathInUrlTag}" value="/portal"/>" method="post">
+ <postfield
name="org.apache.jetspeed.login.username" value="$(username)"/>
+ <postfield
name="org.apache.jetspeed.login.password" value="$(password)"/>
+ </go>
+ </do>
+ </c:otherwise>
+ </c:choose>
+ </c:when>
+ <c:otherwise>
+ <c:choose>
+ <c:when test="${pageContext.request.userPrincipal != null}">
+ <fmt:message key="login.label.Welcome"><fmt:param><c:out
value="${pageContext.request.userPrincipal.name}"/></fmt:param></fmt:message><br>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destLogout}"/>'><fmt:message key="login.label.Logout"/></a>
+ <br>
+ <a href='<c:url context="${portalContextPathInUrlTag}"
value="${destAccount}"/>'><fmt:message key="login.label.ChangePassword"/></a>
+ </c:when>
+ <c:otherwise>
+ <%-- backdoor access to the portal session to get the
login error count --%>
+ <c_rt:set var="errorCode"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.ERRORCODE)%>"/>
+ <c:choose>
+ <c:when test="${not empty errorCode}">
+ <br>
+ <i><fmt:message
key="login.label.ErrorCode.${errorCode}"/></i>
+ <br>
+ </c:when>
+ <c:otherwise>
+ <c_rt:set var="retryCount"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.RETRYCOUNT)%>"/>
+ <c:if test="${not empty retryCount}">
+ <br>
+ <i><fmt:message
key="login.label.InvalidUsernameOrPassword"><fmt:param
value="${retryCount}"/></fmt:message></i>
+ <br>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ <form method="POST" action='<c:url
context="${portalContextPathInUrlTag}" value="${destLogin}"/>'>
+ <table border="0">
+ <tr>
+ <td><fmt:message
key="login.label.Username"/></td>
+ <c_rt:set var="userName"
value="<%=((RequestContext)request.getAttribute(RequestContext.REQUEST_PORTALENV)).getSessionAttribute(LoginConstants.USERNAME)%>"/>
+ <td><input type="text" size="30"
name="<%=LoginConstants.USERNAME%>" value="<c:out value="${userName}"/>"></td>
+ </tr>
+ <tr>
+ <td><fmt:message
key="login.label.Password"/></td>
+ <td><input type="password" size="30"
name="<%=LoginConstants.PASSWORD%>"></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit"
value="<fmt:message key="login.label.Login"/>"></td>
+ </tr>
+ </table>
+ </form>
+ </c:otherwise>
+ </c:choose>
+ </c:otherwise>
+ </c:choose>
+</c:otherwise>
+</c:choose>
\ No newline at end of file
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/sso/sso-changepwd-view.vm
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/sso/sso-changepwd-view.vm?rev=1662824&r1=1662823&r2=1662824&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/sso/sso-changepwd-view.vm
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/security/sso/sso-changepwd-view.vm
Fri Feb 27 21:55:38 2015
@@ -22,11 +22,89 @@ limitations under the License.
*#
#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set($rc =
$renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
+#set ($responsive = $rc.getAttribute("org.apache.jetspeed.theme.responsive"))
#if ($statusMsg)
#parse ('/WEB-INF/view/status-include.vm')
#end
+#if ($responsive)
+<div class="row">
+ <div class="col-sm-2 col-md-2 col-lg-2"></div>
+ #set ($column = $title.get(1))
+ #set ($columnLink = $renderResponse.createRenderURL())
+ $columnLink.setParameter("js_dbcolumn",$column)
+ <div class="col-sm-9 col-md-9 col-lg-9 text-center">
+ $column
+ </div>
+ <div class="col-sm-1 col-md-1 col-lg-1"></div>
+</div>
+ #foreach ( $ssoItem in $table )
+ <div class="row">
+ #set ($ssoName = $ssoItem.get(1))
+ #set ($ssoUrl = $ssoItem.get(0))
+ #if ($velocityCount % 2 == 0)
+ #set($rowstyle = "portlet-section-body")
+ #else
+ #set($rowstyle = "portlet-section-alternate")
+ #end
+
+ #if ($ssoName == $currentName)
+ <div class="col-sm-2 col-md-2 col-lg-2 $rowstyle">
+ <img src="/j2-admin/images/selected.gif" />
+ </div>
+ #else
+ <div class="col-sm-2 col-md-2 col-lg-2 $rowstyle">
+
+ </div>
+ #end
+ <div class="col-sm-9 col-md-9 col-lg-9 text-center $rowstyle">
+ #set ($action = $renderResponse.createActionURL())
+ $action.setParameter('ssoSite', $ssoName)
+ <div align="center"><a href='$action'>$ssoName</a></div>
+ </div>
+ <div class="col-sm-1 col-md-1 col-lg-1"></div>
+ </div>
+ #end
+<br/>
+<form class="form-horizontal" name='ssoForm'
action="$renderResponse.createActionURL()" method="post">
+ <div class="form-group">
+ <label for="site.name" class="col-sm-3
control-label">$MESSAGES.getString('sitename')</label>
+ <div class="col-sm-9">
+ $!currentName
+ <input type="hidden" name="site.name" value="$!currentName" />
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="site.url" class="col-sm-3
control-label">$MESSAGES.getString('siteurl')</label>
+ <div class="col-sm-9">
+ $!currentUrl
+ <input type="hidden" name="site.url" value="$!currentUrl" />
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="ssoUsername" class="col-sm-3
control-label">$MESSAGES.getString('sso_username')</label>
+ <div class="col-sm-9">
+ <input type="text" name="ssoUsername" value="$!ssoUsername"
class="form-control" />
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="ssoPassword" class="col-sm-3
control-label">$MESSAGES.getString('sso_password')</label>
+ <div class="col-sm-9">
+ <input type="password" name="ssoPassword" class="form-control" />
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-xs-12 col-sm-9 col-md-9 col-lg-9 col-sm-offset-3
col-md-offset-3 col-lg-offset-3">
+ <button name='sso.save' class="btn btn-default" type="submit"
class="portlet-form-button">$MESSAGES.getString('save')</button>
+ <button name='sso.refresh' class="btn btn-default"
type="submit">$MESSAGES.getString('refresh')</button>
+ <button name='sso.delete' class="btn btn-default"
type="submit">$MESSAGES.getString('delete')</button>
+ </div>
+ </div>
+</form>
+#else
<table cellpadding=0 cellspacing=1 border=0 width='100%' >
<tr>
<td width='12' class="portlet-section-header"></td>
@@ -102,4 +180,5 @@ limitations under the License.
<input name='sso.refresh' class="portlet-form-button" type="submit"
value="$MESSAGES.getString('refresh')" />
<input name='sso.delete' class="portlet-form-button" type="submit"
value="$MESSAGES.getString('delete')" />
</form>
+#end
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]