rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject svn commit: r1226463 - /incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newaccount.jsp
Date Mon, 02 Jan 2012 16:32:36 GMT
Author: raminder
Date: Mon Jan  2 16:32:35 2012
New Revision: 1226463

URL: http://svn.apache.org/viewvc?rev=1226463&view=rev
Log:
Updated the page with Tiles of basic layout. Back button of browser can be used to go back.
Do not want to introduce history back in spring web flow. Rave-401

Modified:
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newaccount.jsp

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newaccount.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newaccount.jsp?rev=1226463&r1=1226462&r2=1226463&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newaccount.jsp
(original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/newaccount.jsp
Mon Jan  2 16:32:35 2012
@@ -19,53 +19,75 @@
 <%@ page language="java" trimDirectiveWhitespaces="true" %>
 <%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
 <fmt:setBundle basename="messages"/>
-<div id="content">
-    <h1>${pagetitle}</h1>
-    <form:form id="newAccountForm" commandName="newUser" action="newaccount" method="POST">
-        <fieldset>
-            <p><fmt:message key="form.all.fields.required"/></p>
-            <p><form:errors cssClass="error"/></p>
-            <p>
-                <label for="userNameField"><fmt:message key="page.general.username"/></label>
-                <form:input id="userNameField" path="username" required="required" autofocus="autofocus"/>
-                <form:errors path="username" cssClass="error" />
-            </p>
-            <p>
-                <label for="passwordField"><fmt:message key="page.general.password"/></label>
-                <form:password id="passwordField" path="password" required="required"/>
-                <form:errors path="password" cssClass="error" />
-            </p>
-            <p>
-                <label for="passwordConfirmField"><fmt:message key="page.general.confirmpassword"/></label>
-                <form:password id="passwordConfirmField" path="confirmPassword" required="required"/>
-                <form:errors path="confirmPassword" cssClass="error" />
-            </p>
-            <p>
-              <label for="emailField"><fmt:message key="page.general.email"/></label>
-              <spring:bind path="email">
-                <input type="email" name="email" id="emailField" required="required"/>
-              </spring:bind>
-              <form:errors path="email" cssClass="error"/>
-            </p>
-            <p>
-              <label for="pageLayoutField"><fmt:message key="page.general.addpage.selectlayout"/></label>
-              <form:select path="pageLayout" id="pageLayoutField">
-                <form:option value="columns_1" id="columns_1_id"><fmt:message key="page.general.addpage.layout.columns_1"/></form:option>
-                <form:option value="columns_2" id="columns_2_id"><fmt:message key="page.general.addpage.layout.columns_2"/></form:option>
-                <form:option value="columns_2wn" id="columns_2wn_id"><fmt:message
key="page.general.addpage.layout.columns_2wn"/></form:option>
-                <form:option value="columns_3" id="columns_3_id"><fmt:message key="page.general.addpage.layout.columns_3"/></form:option>
-                <form:option value="columns_3nwn" id="columns_3nwn_id"><fmt:message
key="page.general.addpage.layout.columns_3nwn"/></form:option>
-                <form:option value="columns_4" id="columns_4_id"><fmt:message key="page.general.addpage.layout.columns_4"/></form:option>
-                <form:option value="columns_3nwn_1_bottom" id="columns_3nwn_1_bottom"><fmt:message
key="page.general.addpage.layout.columns_3nwn_1_bottom"/></form:option>
-              </form:select>
-            </p>
-        </fieldset>
-        <fieldset>
-          <fmt:message key="page.newaccount.button" var="submitButtonText"/>
-           <input type="submit" value="${submitButtonText}" />
-        </fieldset>
-    </form:form>
-</div>
+<%-- Note: This page has the body definition embedded so we can reference it directly
from the security config file. --%>
+<tiles:insertDefinition name="templates.base">
+    <%-- Override the default pageTitleKey and then export it to the request scope for
use later on this page --%>
+    <tiles:putAttribute name="pageTitleKey" value="page.newaccount.title"/>
+    <tiles:importAttribute name="pageTitleKey" scope="request"/>
+
+    <tiles:putAttribute name="body">
+        <div id="content">
+            <h1>${pagetitle}</h1>
+            <form:form id="newAccountForm" commandName="newUser" action="newaccount" method="POST">
+                <fieldset>
+                    <p><fmt:message key="form.all.fields.required"/></p>
+
+                    <p><form:errors cssClass="error"/></p>
+
+                    <p>
+                        <label for="userNameField"><fmt:message key="page.general.username"/></label>
+                        <form:input id="userNameField" path="username" required="required"
autofocus="autofocus"/>
+                        <form:errors path="username" cssClass="error"/>
+                    </p>
+
+                    <p>
+                        <label for="passwordField"><fmt:message key="page.general.password"/></label>
+                        <form:password id="passwordField" path="password" required="required"/>
+                        <form:errors path="password" cssClass="error"/>
+                    </p>
+
+                    <p>
+                        <label for="passwordConfirmField"><fmt:message key="page.general.confirmpassword"/></label>
+                        <form:password id="passwordConfirmField" path="confirmPassword"
required="required"/>
+                        <form:errors path="confirmPassword" cssClass="error"/>
+                    </p>
+
+                    <p>
+                        <label for="emailField"><fmt:message key="page.general.email"/></label>
+                        <spring:bind path="email">
+                            <input type="email" name="email" id="emailField" required="required"/>
+                        </spring:bind>
+                        <form:errors path="email" cssClass="error"/>
+                    </p>
+
+                    <p>
+                        <label for="pageLayoutField"><fmt:message key="page.general.addpage.selectlayout"/></label>
+                        <form:select path="pageLayout" id="pageLayoutField">
+                            <form:option value="columns_1" id="columns_1_id"><fmt:message
+                                    key="page.general.addpage.layout.columns_1"/></form:option>
+                            <form:option value="columns_2" id="columns_2_id"><fmt:message
+                                    key="page.general.addpage.layout.columns_2"/></form:option>
+                            <form:option value="columns_2wn" id="columns_2wn_id"><fmt:message
+                                    key="page.general.addpage.layout.columns_2wn"/></form:option>
+                            <form:option value="columns_3" id="columns_3_id"><fmt:message
+                                    key="page.general.addpage.layout.columns_3"/></form:option>
+                            <form:option value="columns_3nwn" id="columns_3nwn_id"><fmt:message
+                                    key="page.general.addpage.layout.columns_3nwn"/></form:option>
+                            <form:option value="columns_4" id="columns_4_id"><fmt:message
+                                    key="page.general.addpage.layout.columns_4"/></form:option>
+                            <form:option value="columns_3nwn_1_bottom" id="columns_3nwn_1_bottom"><fmt:message
+                                    key="page.general.addpage.layout.columns_3nwn_1_bottom"/></form:option>
+                        </form:select>
+                    </p>
+                </fieldset>
+                <fieldset>
+                    <fmt:message key="page.newaccount.button" var="submitButtonText"/>
+                    <input type="submit" value="${submitButtonText}"/>
+                </fieldset>
+            </form:form>
+        </div>
+    </tiles:putAttribute>
+</tiles:insertDefinition>
 <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.4.min.js"></script>
 <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
 <script src="<spring:url value="/script/rave.js"/>"></script>



Mime
View raw message