← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9180: Disable the buttons until the org unit is loaded in person management form.

 

------------------------------------------------------------
revno: 9180
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-12-05 23:33:38 +0700
message:
  Disable the buttons until the org unit is loaded in person management form.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.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-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-12-01 05:26:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-12-05 16:33:38 +0000
@@ -246,19 +246,19 @@
 	hideById('listDiv');
 	
 	var params = '';
+	jQuery( '#displayInReports option' ).each( function( i, item ){
+		var input = jQuery( item );
+		params += '&searchingValues=de_' + input.val() + '_false_';
+	});
 	
 	if(listAll){	
-		params  = 'startDate=';
+		params += '&startDate=';
 		params += '&endDate=';
-		jQuery( '#displayInReports option' ).each( function( i, item ){
-			var input = jQuery( item );
-			params += '&searchingValues=de_' + input.val() + '_false_';
-		});
 	}
 	else{
 		var value = '';
 		var searchingValue = '';
-		params  = '&startDate=' + getFieldValue('startDate');
+		params += '&startDate=' + getFieldValue('startDate');
 		params += '&endDate=' + getFieldValue('endDate');
 		if(byId("incompleted").checked)
 		{
@@ -472,7 +472,7 @@
 
 function removeEmptyEvents()
 {	
-	var result = window.confirm( i18n_confirm_delete );
+	var result = window.confirm( i18n_confirm_remove_empty_events );
     
     if ( result )
     {

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-11-09 14:20:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-12-05 16:33:38 +0000
@@ -15,7 +15,7 @@
 		<td rowspan='2' valign='bottom'>
 			<input type="button" class='large-button' id='listPatientBtn' value="$i18n.getString( 'list_all_patients' )" onclick="javascript:listAllPatient();" disabled >
 			<input type="button" class='large-button' id='addPatientBtn' name='addPatientBtn' class='large-button' value='$i18n.getString( "add_new" )' onclick="showAddPatientForm();" disabled >
-			<input type="button" class='large-button' id='advancedSearchBtn' value='$i18n.getString( "search" )' onclick="jQuery('#advanced-search').toggle();" #if( $organisationUnit ) #else disabled #end>
+			<input type="button" class='large-button' id='advancedSearchBtn' value='$i18n.getString( "search" )' onclick="jQuery('#advanced-search').toggle();" disabled>
 		</td>
 	</tr> 
 	<tr id='programAddPatientTR' class='hidden'>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2012-11-14 09:07:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2012-12-05 16:33:38 +0000
@@ -1,17 +1,3 @@
-<script>
-	jQuery(document).ready(	function(){
-		#if($organisationUnit)
-			enable('listPatientBtn');
-			enable('addPatientBtn');
-			enable('advancedSearchBtn');
-			enable('searchObjectId');
-		#else
-			disable('listPatientBtn');
-			disable('addPatientBtn');
-			disable('advancedSearchBtn');
-		#end
-	});
-</script>
 <h3 id='mainLinkLbl'>$i18n.getString( "patient_management" ) #openHelp( "patient" )</a></h3>
 
 <input type='hidden' id='isRegistration' name= 'isRegistration' value='false'>
@@ -132,7 +118,14 @@
 		showById('searchDiv');
 	#end
 	
-	enable('addPatientBtn');
-	enable('listPatientBtn');
-	
+	#if($organisationUnit)
+		enable('listPatientBtn');
+		enable('addPatientBtn');
+		enable('advancedSearchBtn');
+		enable('searchObjectId');
+	#else
+		disable('listPatientBtn');
+		disable('addPatientBtn');
+		disable('advancedSearchBtn');
+	#end
 </script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.vm	2012-11-14 09:37:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.vm	2012-12-05 16:33:38 +0000
@@ -26,12 +26,14 @@
 			</thead>
 			#set( $mark = false )	    
 			<tbody>
+				#set($validate = "")
 				#foreach( $result in $programValidationResults )
 					<tr #alternate( $mark )>	    
 						#set ( $id = $result.programValidation.id )
 						#set ( $leftFormula = $leftsideFormulaMap.get( $id ) )
 						#set ( $rightFormula = $rightsideFormulaMap.get( $id ) )
 						<tr>
+							<input type="hidden" name='validateFormulas' value="$result.programValidation.leftSide $result.programValidation.rightSide" name="$!encoder.htmlEncode($result.programValidation.name)">
 							#set($leftsideValue = "NULL")
 							#if($result.leftsideValue) #set($leftsideValue = $result.leftsideValue) #end
 							#set($rightsideValue = "NULL")