dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21627
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10282: Only allow to delete program-enrollment which no stage have both datavalues and reminder messages.
------------------------------------------------------------
revno: 10282
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-18 13:58:52 +0700
message:
Only allow to delete program-enrollment which no stage have both datavalues and reminder messages.
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/visitSchedule.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-03-15 14:43:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-03-18 06:58:52 +0000
@@ -1793,6 +1793,10 @@
+ "<td>" + field.value + "</td></tr>");
field.value="";
field.style.backgroundColor = SUCCESS_COLOR;
+
+ jQuery('#enrollmentDate').width('270');
+ jQuery('#dateOfIncident').width('270');
+ jQuery('#removeProgram').remove();
}
else {
showSuccessMessage( json.message );
@@ -1855,6 +1859,9 @@
else{
commentDivToggle(false);
}
+ jQuery('#enrollmentDate').width('270');
+ jQuery('#dateOfIncident').width('270');
+ jQuery('#removeProgram').remove();
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm 2013-03-15 14:43:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm 2013-03-18 06:58:52 +0000
@@ -17,11 +17,17 @@
<input type="button" class='large-button' id='completeProgram' value="$i18n.getString( 'complete_quit' )" onclick='unenrollmentForm($programInstance.id)' />
<input type="button" style='width:80px' id='incompleteProgram' value="$i18n.getString( 're_enrol' )" onclick='reenrollmentForm($programInstance.id)' />
#set($allowRemove = 'true')
+
+
#foreach( $programStageInstance in $programStageInstances )
- #if( $programStageInstance.executionDate )
+ #if( $!programStageInstance.executionDate
+ || $!programStageInstance.outboundSms.size() > 0
+ || $!programStageInstance.patientComments.size() > 0 )
+
#set($allowRemove = 'false')
#end
#end
+
#if($allowRemove == 'true')
<input type="button" style='width:80px' id='removeProgram' value="$i18n.getString( 'remove' )" onclick='removeProgramInstance($programInstance.id)' />
<script>