dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23703
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11540: Fix bug - Exception when create a new event in entry form.
------------------------------------------------------------
revno: 11540
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-07-30 13:16:43 +0700
message:
Fix bug - Exception when create a new event in entry form.
modified:
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/programStageInstanceFlow.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/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-07-29 09:14:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-07-30 06:16:43 +0000
@@ -592,7 +592,14 @@
function registerIrregularEncounter( programInstanceId, programStageId, programStageName, dueDate )
{
- jQuery.postJSON( "registerIrregularEncounter.action",
+ if(dueDate==''){
+ showById("spanDueDateNewEncounter_" + programInstanceId);
+ }
+ else
+ {
+ hideById("spanDueDateNewEncounter_" + programInstanceId);
+
+ jQuery.postJSON( "registerIrregularEncounter.action",
{
programInstanceId:programInstanceId,
programStageId: programStageId,
@@ -669,6 +676,7 @@
loadDataEntry( programStageInstanceId );
showSuccessMessage(i18n_create_event_success);
});
+ }
}
function disableCompletedButton( disabled )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2013-05-29 10:19:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2013-07-30 06:16:43 +0000
@@ -92,6 +92,10 @@
</tr>
<tr>
<td></td>
+ <td><span id='spanDueDateNewEncounter_$!programInstance.id' class='hidden' style='color:red' >$i18n.getString('this_field_is_required')</td>
+ </tr>
+ <tr>
+ <td></td>
<td>
<input type='button' value='$i18n.getString("create")' onclick='registerIrregularEncounter( "$!programInstance.id",getFieldValue("repeatableProgramStage_$!programInstance.id"), jQuery("#repeatableProgramStage_$!programInstance.id option:selected").text(),getFieldValue("dueDateNewEncounter_$programInstance.id" ) );' />
<input type='button' value='$i18n.getString("cancel")' onclick="closeDueDateDiv('$!programInstance.id');" />
@@ -100,7 +104,7 @@
</tr>
<tr>
<td></td>
- <td id='createEventMessage_$!programInstance.id' style='color:green'></td>
+ <td id='createEventMessage_$!programInstance.id' style='color:red'></td>
</tr>
</table>
</div>