[Mapbender-commits] r5890 - in branches/3_dev/http: . plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sat Apr 10 10:04:04 EDT 2010


Author: marc
Date: 2010-04-10 10:04:04 -0400 (Sat, 10 Apr 2010)
New Revision: 5890

Modified:
   branches/3_dev/http/index.php
   branches/3_dev/http/plugins/mb_forgot_password.js
   branches/3_dev/http/plugins/mb_forgot_password_html.php
Log:
index.php with passwordButton

Modified: branches/3_dev/http/index.php
===================================================================
--- branches/3_dev/http/index.php	2010-04-10 13:55:51 UTC (rev 5889)
+++ branches/3_dev/http/index.php	2010-04-10 14:04:04 UTC (rev 5890)
@@ -29,15 +29,23 @@
 	<script type="text/javascript" src="./extensions/jquery-ui-1.8.custom/development-bundle/ui/jquery.ui.position.js"></script>
 	<script type="text/javascript" src="./extensions/jquery-ui-1.8.custom/development-bundle/ui/jquery.ui.resizable.js"></script>
 	<script type="text/javascript" src="./extensions/jquery-ui-1.8.custom/development-bundle/ui/jquery.ui.dialog.js"></script>
+	<script type="text/javascript" src="./extensions/jquery-validate/jquery.validate.js"></script>
+
 	<script type="text/javascript" src="./plugins/mb_login.js"></script>
+	<script type="text/javascript" src="./plugins/mb_forgot_password.js"></script>
+
 	<script type="text/javascript">
 	$(function() {
 		$("#login, #mylink").login();
+		$("#forgotPassword").forgotPassword();
+		$("#passwordForm").validate();
 	});
 	</script>
 
 <body>
 <p><a href="#" id="mylink">Anmelden</a></p>
+<p><a href="#" id="forgotPassword">Password</a></p>
+
 <table  BGCOLOR="#ffffff" width="70%" height="70%" ALIGN="top" CELLSPACING="0" CELLPADDING="10" STYLE="-moz-border-radius:8px; border:0px #000000 solid;">
 	<tr>
 		<td COLSPAN="2">

Modified: branches/3_dev/http/plugins/mb_forgot_password.js
===================================================================
--- branches/3_dev/http/plugins/mb_forgot_password.js	2010-04-10 13:55:51 UTC (rev 5889)
+++ branches/3_dev/http/plugins/mb_forgot_password.js	2010-04-10 14:04:04 UTC (rev 5890)
@@ -1,9 +1,25 @@
 (function ($) {
-	$.fn.login = function () {
+	$.fn.forgotPassword = function () {
 		return this.each(function () {
 			//alert(this.id);
-			//if($(this).is('div')
-					$(this).load("./plugins/mb_forgot_password_html.php");
+			if ($(this).is('div')) {
+				$(this).load("./plugins/mb_forgot_password_html.php");
+			}
+			else {
+				var $passwordDiv = $("<div title='forgotten Password'/>").hide().load("./plugins/mb_forgot_password_html.php");
+				$(this).append($passwordDiv).bind("click", function () {
+					$passwordDiv.dialog({
+						buttons: {
+							"order New": function () {
+								$("form", $passwordDiv).get(0).submit();
+							}
+						},
+						modal: true,
+						resizable: false,
+						draggable: false
+					});
+				});
+			}
 		});
 	};
 })(jQuery);

Modified: branches/3_dev/http/plugins/mb_forgot_password_html.php
===================================================================
--- branches/3_dev/http/plugins/mb_forgot_password_html.php	2010-04-10 13:55:51 UTC (rev 5889)
+++ branches/3_dev/http/plugins/mb_forgot_password_html.php	2010-04-10 14:04:04 UTC (rev 5890)
@@ -1,14 +1,13 @@
 <?php 	
 	require_once dirname(__FILE__) . "/../../core/globalSettings.php";
-#	echo "<form name='loginForm' action ='" . $PHP_SELF . "' method='POST'>";
-	echo "<form name='loginForm' action ='./frames/login.php' method='POST'>";
-	echo "<table>";
-	echo "<tr><td>" . _mb("Name") . ": </td><td><input type='text' name='name' class='login_text' value=''></td></tr>";
-	echo "<tr><td>" . _mb("Password") . ": </td><td><input type='password' name='password' class='login_text'></td></tr>";
-	echo "<tr><td></td><td><input type='submit' class='myButton' value='login' title='anmelden'>";
-	echo "&nbsp;&nbsp;<a href='../frames/forgottenPassword.php' title='" . 
-		_mb("Forgot your password?") . "' target='_blank'>" . 
-		_mb("Forgot your password?") . "</a>";
-	echo "</td></tr></table>";
-	echo "</form>";
-?>
\ No newline at end of file
+
+?>
+<form name='passwordForm' id='passwordForm' action ='./frames/forgottenPassword.php' method='POST'>
+	<fieldset>
+		<label for="name">Name</label>
+		<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
+		<label for="email">Email</label>
+
+		<input type="text" name="email" id="email" value="" class="required" />
+	</fieldset>
+</form>



More information about the Mapbender_commits mailing list