dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19604
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8622: Check validation criteria before to open single data entry form of a person.
------------------------------------------------------------
revno: 8622
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-10-22 11:18:29 +0700
message:
Check validation criteria before to open single data entry form of a person.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/singleEvent.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.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/form.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js 2012-10-06 14:57:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js 2012-10-22 04:18:29 +0000
@@ -155,7 +155,7 @@
statusSearching = 1;
setInnerHTML( 'contentDiv', html );
showById('contentDiv');
- setInnerHTML('searchInforTD', i18n_advanced_search_patients );
+ setInnerHTML('searchInforTD', i18n_search_patients );
setFieldValue('listAll',false);
jQuery( "#loaderDiv" ).hide();
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/singleEvent.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/singleEvent.js 2012-10-19 07:45:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/singleEvent.js 2012-10-22 04:18:29 +0000
@@ -277,3 +277,29 @@
}
hideById('backBtnFromEntry');
}
+
+// --------------------------------------------------------
+// Check an available person allowed to enroll a program
+// --------------------------------------------------------
+
+function validateAllowEnrollment( patientId, programId )
+{
+ jQuery('#loaderDiv').show();
+ jQuery.getJSON( "validatePatientProgramEnrollment.action",
+ {
+ patientId: patientId,
+ programId: programId
+ },
+ function( json )
+ {
+ hideById('message');
+ var type = json.response;
+ if ( type == 'success' ){
+ showSelectedDataRecoding(patientId, programId );
+ }
+ else if ( type == 'input' ){
+ setMessage( json.message );
+ }
+ jQuery('#loaderDiv').hide();
+ });
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-10-12 02:15:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2012-10-22 04:18:29 +0000
@@ -95,7 +95,7 @@
<td>$!mapPatientOrgunit.get($patient.id)</td>
#end
<td>
- <a href="javascript:setInnerHTML('addNewDiv','');unSave = false;showSelectedDataRecoding('$patient.id', getFieldValue('programIdAddPatient'));" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></a>
+ <a href="javascript:setInnerHTML('addNewDiv','');unSave = false;validateAllowEnrollment('$patient.id', getFieldValue('programIdAddPatient'));" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></a>
<a href="javascript:showPatientHistory( '$patient.id' )" title='$i18n.getString( "patient_details_and_history" )'><img src="../images/information.png" alt='$i18n.getString( "patient_details_and_history" )'></a>
</td>
</tr>
@@ -126,5 +126,5 @@
<script>
var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';
var i18n_list_all_patients = '$encoder.jsEscape( $i18n.getString( "list_all_patients" ) , "'" )';
- var i18n_advanced_search_patients = '$encoder.jsEscape( $i18n.getString( "advanced_search_patients" ) , "'" )';
+ var i18n_search_patients = '$encoder.jsEscape( $i18n.getString( "search_patients" ) , "'" )';
</script>