← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8672: Minor

 

------------------------------------------------------------
revno: 8672
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-10-23 17:01:19 +0200
message:
  Minor
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/account.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js	2012-10-23 14:15:55 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js	2012-10-23 15:01:19 +0000
@@ -47,7 +47,7 @@
 } );
 
 function accountSubmitHandler()
-{
+{	
 	if ( $.trim( $( "#recaptcha_challenge_field" ).val() ).length == 0 ||
 		$.trim( $( "#recaptcha_response_field" ).val() ).length == 0 )
 	{
@@ -55,6 +55,8 @@
 		return false;
 	}
 	
+	$( "#submitButton" ).attr( "disabled", "disabled" );
+	
 	$.ajax( {
 		url: "../../api/account",
 		data: $( "#accountForm" ).serialize(),
@@ -63,8 +65,9 @@
 			window.location.href = "../../dhis-web-commons-about/redirect.action";
 		},
 		error: function( jqXHR, textStatus, errorThrown ) {
-			$( "#messageSpan" ).show().text( jqXHR.responseText );
+			$( "#messageSpan" ).show().text( jqXHR.responseText );			
 			Recaptcha.reload();
+			$( "#submitButton" ).removeAttr( "disabled" );
 		}
 	} );
 }

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/account.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/account.vm	2012-10-22 16:02:20 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/account.vm	2012-10-23 15:01:19 +0000
@@ -64,7 +64,7 @@
 	</tr>
     <tr>
     	<td></td>
-    	<td><input type="submit" value="$i18n.getString( 'create' )" style="width:10em"></td>
+    	<td><input id="submitButton" type="submit" value="$i18n.getString( 'create' )" style="width:10em"></td>
     </tr>
 </table>