Author: raminder
Date: Sun Dec  2 00:49:26 2012
New Revision: 1416091

URL: http://svn.apache.org/viewvc?rev=1416091&view=rev
Log:
appling patch for RAVE-749

Modified:
    
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
    rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_forms.js

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp?rev=1416091&r1=1416090&r2=1416091&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
 Sun Dec  2 00:49:26 2012
@@ -130,7 +130,7 @@
                                     <div class="control-group">
                                         <label for="emailField" 
class="control-label"><fmt:message key="page.profile.email"/></label>
                                         <div class="controls">
-                                            <form:input id="emailField" 
path="email" class="span5" value="${userProfile.email}" />
+                                            <form:input id="emailField" 
name="email" required="required" path="email" class="span5" 
value="${userProfile.email}" />
                                         </div>
                                     </div>
                                 </div>
@@ -215,6 +215,7 @@
                 username: "<c:out value="${userProfile.username}"/>",
                 id: "<c:out value="${userProfile.id}"/>"
             });
+            rave.forms.validateEditAccountForm();
         });
     </script>
 </portal:register-init-script>

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_forms.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_forms.js?rev=1416091&r1=1416090&r2=1416091&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_forms.js 
(original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/rave_forms.js 
Sun Dec  2 00:49:26 2012
@@ -37,7 +37,8 @@ rave.forms = rave.forms || (function() {
                     equalTo: "#passwordField"
                 },
                 email : {
-                    required: true
+                    required: true,
+                    email: true
                 }
             },
             messages: {
@@ -69,6 +70,17 @@ rave.forms = rave.forms || (function() {
         });
     }
     
+    function validateEditAccountForm() {
+        $("#editAccountForm").validate({
+            rules: {
+                email : {
+                     required: true,
+                     email: true
+                 }
+            }            
+        });
+    }
+    
     function validatePageForm() {
         $("#pageForm").validate({
             rules: {
@@ -82,6 +94,7 @@ rave.forms = rave.forms || (function() {
     return {
         validateNewAccountForm : validateNewAccountForm,
            validateUserProfileForm: validateUserProfileForm,
+           validateEditAccountForm: validateEditAccountForm,
         validatePageForm: validatePageForm
     };
 })();


Reply via email to