Migrate UserRegitration to MVC 3.0.

wisemapping-servlet.xml is not used anymore.
This commit is contained in:
Paulo Gustavo Veiga
2012-06-16 19:27:22 -03:00
parent ea2bff60f7
commit 33131d4e9e
14 changed files with 116 additions and 76 deletions

View File

@@ -58,12 +58,12 @@ mail.supportEmail=root@localhost
registration.email.enabled = false
# Enable captcha confirmation
registration.recaptcha.enabled = false
registration.recaptcha.enabled = true
# ReCaptcha is the default captcha. Public and private keys are required.
# More Info: http://www.google.com/recaptcha
registration.recaptcha.privateKey =
registration.recaptcha.publicKey =
# More Info: http://www.google.com/recaptcha .
registration.recaptcha.privateKey = 6LeQ4tISAAAAAMfHMPRKyHupTfA-KE4QeTCnLXhK
registration.recaptcha.publicKey = 6LeQ4tISAAAAALzCGKNgRv8UqsDx7Cb0vq4wbJBr
##################################################################################
# Site configuration

View File

@@ -77,9 +77,9 @@
<put-attribute name="body" value="/jsp/userRegistration.jsp"/>
</definition>
<definition name="userRegistrationConfirmation" extends="pageTemplate">
<definition name="userRegistrationSuccess" extends="pageTemplate">
<put-attribute name="title" value="USER_REGISTRATION"/>
<put-attribute name="body" value="/jsp/userRegistrationConfirmation.jsp"/>
<put-attribute name="body" value="/jsp/userRegistrationSuccess.jsp"/>
</definition>
<definition name="login" extends="pageTemplate">

View File

@@ -74,7 +74,7 @@
<value>/index.jsp</value>
<value>/c/home</value>
<value>/c/login</value>
<value>/c/userRegistration</value>
<value>/c/user/registration</value>
<value>/c/captcha</value>
<value>/c/publicView</value>
<value>/service/*</value>

View File

@@ -23,7 +23,7 @@
<sec:http pattern="/favicon.ico" security="none"/>
<sec:http pattern="/c/login" security="none"/>
<sec:http pattern="/c/userregistration" security="none"/>
<sec:http pattern="/c/user/registration" security="none"/>
<sec:http pattern="/c/user/resetpassword" security="none"/>
<sec:http pattern="/c/home" security="none"/>
<sec:http pattern="/c/maps/*/embed" security="none"/>

View File

@@ -3,24 +3,6 @@
<beans>
<bean id="userValidator" class="com.wisemapping.validator.UserValidator">
<property name="userService" ref="userService"/>
<property name="captchaService" ref="reCaptcha"/>
</bean>
<bean id="userController" class="com.wisemapping.controller.UserRegistrationController">
<property name="sessionForm" value="false"/>
<property name="commandName" value="user"/>
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
<property name="validator" ref="userValidator"/>
<property name="formView" value="userRegistration"/>
<property name="successView" value="userRegistrationConfirmation"/>
<property name="userService" ref="userService"/>
<property name="emailConfirmEnabled" value="${registration.email.enabled}"/>
<property name="captchaEnabled" value="${registration.recaptcha.enabled}"/>
<property name="captchaService" ref="reCaptcha"/>
</bean>
<bean id="settingResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
<property name="mappings">
<props>
@@ -61,24 +43,4 @@
<bean id="activationController" class="com.wisemapping.controller.ActivationController">
<property name="userService" ref="userService"/>
</bean>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref bean="browserSupportInterceptor"/>
<ref bean="localeChangeInterceptor"/>
</list>
</property>
<property name="mappings">
<props>
<!-- Forms based -->
<prop key="userRegistration">usersController</prop>
<prop key="login">loginController</prop>
<prop key="activation">activationController</prop>
<prop key="changePassword">changePasswordController</prop>
<prop key="settings">settingsController</prop>
<prop key="editProfile">editProfileController</prop>
</props>
</property>
</bean>
</beans>
ans>

View File

@@ -196,7 +196,7 @@ function updateStatusToolbar() {
// Can be executed by the owner ?
var rowData = tableElem.dataTable().fnGetData(selectedRows[0]);
if (rowData.role != 'owner') {
$("#buttonsToolbar").find('#publishBtn').hide().end().find('#shareBtn').hide();
$("#buttonsToolbar").find('#publishBtn').hide().end().find('#shareBtn').hide().end().find('#renameBtn').hide();
}
} else {
$("#buttonsToolbar .act-multiple").show();

View File

@@ -62,7 +62,7 @@
<div id="register">
<b><spring:message code="NOT_READY_A_USER"/></b>
<spring:message code="NOT_READY_A_USER_MESSAGE"/>
<a href="c/userRegistration">
<a href="c/user/registration">
<spring:message code="JOIN_NOW"/>
</a>
</div>

View File

@@ -33,7 +33,7 @@
<spring:message code="NOT_READY_A_USER"/>
</b>
<spring:message code="NOT_READY_A_USER_MESSAGE"/>
<a href="c/userRegistration">
<a href="c/user/registration">
<spring:message code="JOIN_NOW"/>
</a>
</div>

View File

@@ -1,6 +1,4 @@
<%@ include file="/jsp/init.jsp" %>
<div>
<div class="fform">
@@ -35,23 +33,28 @@
<form:errors path="retypePassword" cssClass="errorMsg"/>
<c:if test="${requestScope.captchaEnabled}">
<form:errors path="captcha" cssClass="errorMsg"/>
${requestScope.captchaHtml}
<p>
<form:errors path="captcha" cssClass="errorMsg"/>
</p>
</c:if>
<div>
<p>
<spring:message code="TERM_OF_THE_SERVICE"/>
<spring:message code="WISEMAPPING_ACCOUNT_MESSAGE"/> <a href="c/termsOfUse"><spring:message
code="HERE"/></a>
code="HERE"/></a>.
<spring:message code="REGISTRATION_CLICK_ADVICE"/>
</p>
</div>
<input type="submit" value="<spring:message code="REGISTER" />" id="submitButton"
<input type="submit" value="<spring:message code="REGISTER"/>"
data-loading-text="<spring:message code="REGISTER"/> ..." id="submitButton"
class="btn btn-primary">
<input type="button" value="<spring:message code="CANCEL"/>"
onclick="window.location='c/<c:url value="maps/"/>'" class="btn">
</form:form>
</div>
</div>

View File

@@ -1,30 +1,29 @@
<%@ include file="/jsp/init.jsp" %>
<div>
<h1>
<spring:message code="USER_REGISTRATION"/>
</h1>
<h2 style="font-weight:bold;">Thanks for signing up!</h2>
<c:if test="${confirmByEmail==true}">
<p>
You will receive a confirmation message shortly from WiseMapping. This message will ask you to activate your WiseMapping account.
You will receive a confirmation message shortly from WiseMapping. This message will ask you to activate your
WiseMapping account.
Please select the link to activate and start creating and sharing maps.
</p>
<br/>
<p>
Thanks so much for your interest in WiseMapping.
</p>
<br/>
<p>
If you have any questions or have any feedback, please don't hesitate to use the on line form.
We'd love to hear from you.
</p>
</c:if>
<c:if test="${confirmByEmail==false}">
<c:if test="${confirmByEmail==false}">
<p>
Your account has been created successfully, click <a href="c/login">here</a> to sign in and start enjoying WiseMapping.
Your account has been created successfully, click <a href="c/login">here</a> to sign in and start enjoying
WiseMapping.
</p>
</c:if>
</div>