[Mapbender-commits] r5906 - branches/3_dev/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Apr 11 05:31:30 EDT 2010


Author: marc
Date: 2010-04-11 05:31:30 -0400 (Sun, 11 Apr 2010)
New Revision: 5906

Modified:
   branches/3_dev/http/plugins/mb_forgot_password.js
   branches/3_dev/http/plugins/mb_forgot_password_html.php
Log:
validation update

Modified: branches/3_dev/http/plugins/mb_forgot_password.js
===================================================================
--- branches/3_dev/http/plugins/mb_forgot_password.js	2010-04-11 09:25:26 UTC (rev 5905)
+++ branches/3_dev/http/plugins/mb_forgot_password.js	2010-04-11 09:31:30 UTC (rev 5906)
@@ -8,11 +8,17 @@
 
 			}
 			else {
-				var $passwordDiv = $("<div title='forgotten Password'/>").hide().load("./plugins/mb_forgot_password_html.php");
+				var $passwordDiv = $("<div title='forgotten Password'/>").hide().load("./plugins/mb_forgot_password_html.php", function (){
+					$(this).find('form').validate()
+				});
 				$(this).append($passwordDiv).bind("click", function () {
 					$passwordDiv.dialog({
 						buttons: {
 							"Password": function () {
+								if (!$passwordDiv.find('form').valid()){
+									return false;
+								}
+								
 								var name = $("form", $passwordDiv).get(0).name.value;
 								var email = $("form", $passwordDiv).get(0).email.value;
 								var req = new Mapbender.Ajax.Request({
@@ -38,7 +44,6 @@
 						resizable: false,
 						draggable: false
 					});
-					$("#passwordForm").validate();
 				});
 			}
 		});

Modified: branches/3_dev/http/plugins/mb_forgot_password_html.php
===================================================================
--- branches/3_dev/http/plugins/mb_forgot_password_html.php	2010-04-11 09:25:26 UTC (rev 5905)
+++ branches/3_dev/http/plugins/mb_forgot_password_html.php	2010-04-11 09:31:30 UTC (rev 5906)
@@ -11,6 +11,5 @@
 
 		<input type="text" name="email" id="email" value="" class="required email" />
 		<br />
-		<input class="submit" type="submit" value="Submit"/>
 	</fieldset>
 </form>



More information about the Mapbender_commits mailing list