dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15799
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5831: (patient) Don't show single data-entry form in Register Event.
------------------------------------------------------------
revno: 5831
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-01-31 12:43:59 +0700
message:
(patient) Don't show single data-entry form in Register Event.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.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/dataRecordingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2012-01-31 05:11:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2012-01-31 05:43:59 +0000
@@ -1,4 +1,4 @@
-<form id='dataRecordingSelectForm' name='dataRecordingSelectForm'>
+<form id='dataRecordingSelectForm' name='dataRecordingSelectForm' method='post'>
<table class="mainPageTable" id='patientInfoDiv'>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-01-31 05:11:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-01-31 05:43:59 +0000
@@ -32,30 +32,8 @@
addOptionById( 'programStageId', json.programStages[i].id, json.programStages[i].name );
}
- // show history / plan
- setInnerHTML( 'currentSelection', '' );
- var history = '<h4>' + i18n_program_stages_history_plan + '</h4>';
- history += '<table class="history">';
- history += '<tr>';
- history += '<td class="bold row">' + i18n_program_stage + '</td>';
- history += '<td class="bold row">' + i18n_scheduled_for + '</td>';
- history += '</tr>';
- for ( i in json.programStageInstances )
- {
- history += '<tr bgcolor=' + json.programStageInstances[i].colorMap + '>';
- history += '<td>';
- history += '<span>' + json.programStageInstances[i].name + '</span>';
- history += '</td>';
- history += '<td class="cent">';
- history += json.programStageInstances[i].infor;
- history += '</td>';
- history += '</tr>';
- }
- history += '</table>';
- setInnerHTML( 'currentSelection', history );
- showById('currentSelection');
-
var singleEvent = jQuery('#dataRecordingSelectDiv [name=programId] option:selected').attr('singleevent');
+
if(singleEvent=='true')
{
byId('programStageId').selectedIndex = 1;
@@ -66,9 +44,34 @@
}
else
{
+
+ // show history / plan
+ setInnerHTML( 'currentSelection', '' );
+ var history = '<h4>' + i18n_program_stages_history_plan + '</h4>';
+ history += '<table class="history">';
+ history += '<tr>';
+ history += '<td class="bold row">' + i18n_program_stage + '</td>';
+ history += '<td class="bold row">' + i18n_scheduled_for + '</td>';
+ history += '</tr>';
+ for ( i in json.programStageInstances )
+ {
+ history += '<tr bgcolor=' + json.programStageInstances[i].colorMap + '>';
+ history += '<td>';
+ history += '<span>' + json.programStageInstances[i].name + '</span>';
+ history += '</td>';
+ history += '<td class="cent">';
+ history += json.programStageInstances[i].infor;
+ history += '</td>';
+ history += '</tr>';
+ }
+ history += '</table>';
+ setInnerHTML( 'currentSelection', history );
+ showById('currentSelection');
+
disable('completeBtn');
disable('validationBtn');
}
+
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-01-11 08:47:32 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-01-31 05:43:59 +0000
@@ -1,8 +1,6 @@
<h3>$i18n.getString( "patient_registered" )</h3>
-<form id='programEnrollmentSelectDiv' method='POST'>
-
- <input type="hidden" id="patientId" name="patientId" value="$patient.id">
+<div >
<table width='100%'>
<tr>
@@ -41,7 +39,10 @@
<!-- Enroll program TAB -->
<div id="tab-1">
- <table width='100%'>
+ <form id='programEnrollmentSelectDiv' name='programEnrollmentSelectDiv' method='POST'>
+ <input type="hidden" id="patientId" name="patientId" value="$patient.id">
+
+ <table width='100%'>
<tr>
<td style="width:180px"><label for="programId">$i18n.getString( "program" )</label></td>
<td>
@@ -81,6 +82,7 @@
</table>
<div id='programEnrollmentDiv' style='display:none;'></div>
+ </form>
</div>
<!-- register-event TAB -->
@@ -89,7 +91,7 @@
<div id='dataEntryFormDiv' style='display:none;'></div>
</div>
-</form>
+</div>
<script>
var i18n_enroll_to_program = '$encoder.jsEscape( $i18n.getString( "enroll_to_program" ) , "'")';
@@ -99,7 +101,9 @@
validation( 'programEnrollmentSelectDiv', function(form){
validateProgramEnrollment();
});
-
+ });
+
+
jQuery("#tabs").tabs();
datePickerValid( 'enrollmentDate' );
datePickerValid( 'dateOfIncident' );
@@ -115,6 +119,4 @@
#else
$("#tabs").tabs("option", "disabled", [1]);
#end
- });
-
</script>