← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12545: Hide Search by ids field in multiple case entry form.

 

------------------------------------------------------------
revno: 12545
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-10-10 12:29:57 +0700
message:
  Hide Search by ids field in multiple case entry form.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.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/i18n.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm	2013-10-08 03:23:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/i18n.vm	2013-10-10 05:29:57 +0000
@@ -213,4 +213,5 @@
 male: '$encoder.jsEscape($i18n.getString( 'male' ) , "'")',
 transgender: '$encoder.jsEscape($i18n.getString( 'transgender' ) , "'")',
 immediate_children: '$encoder.jsEscape($i18n.getString( 'immediate_children' ) , "'")',
+delete: '$encoder.jsEscape($i18n.getString( 'delete' ) , "'")',
 };
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-10-10 00:04:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-10-10 05:29:57 +0000
@@ -2393,11 +2393,14 @@
 function advancedSearchOnclick()
 {
 	jQuery('#advanced-search').toggle();
-	if(jQuery('#advanced-search').is(':visible')){
-		hideById('searchByIdTR');
-	}
-	else{
-		showById('searchByIdTR');
+	if( getFieldValue('showSearchIdField')=='true' )
+	{
+		if(jQuery('#advanced-search').is(':visible')){
+			hideById('searchByIdTR');
+		}
+		else{
+			showById('searchByIdTR');
+		}
 	}
 }
 
@@ -2417,7 +2420,10 @@
 function hideSearchCriteria()
 {
 	hideById('advanced-search');
-	showById('showSearchCriteriaDiv');
+	if( getFieldValue('showSearchIdField')=='true' )
+	{
+		showById('showSearchCriteriaDiv');
+	}
 }
 
 function showSearchCriteria()

=== 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	2013-10-08 17:16:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2013-10-10 05:29:57 +0000
@@ -7,9 +7,10 @@
 	
 <h3 id='mainLinkLbl'>$i18n.getString( "patient_management" ) #openHelp( "patient" )</a></h3>
 
-<input type='hidden' id='isRegistration' name= 'isRegistration' value='false'>
-<input type='hidden' id='isShowPatientList' name= 'isShowPatientList' >
-<input type='hidden' id='listAll' name= 'listAll'>
+<input type='hidden' id='isRegistration' name='isRegistration' value='false'>
+<input type='hidden' id='isShowPatientList' name='isShowPatientList' >
+<input type='hidden' id='listAll' name='listAll'>
+<input type='hidden' id='showSearchIdField' name='showSearchIdField' value='true'>
 
 <div id='searchDiv'>
 	#parse( "dhis-web-caseentry/searchPatientCriteria.vm" )