dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21565
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10232: Enable re-enroll button when to click completed program in Dashboard.
------------------------------------------------------------
revno: 10232
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-15 10:30:15 +0700
message:
Enable re-enroll button when to click completed program in Dashboard.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm
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/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2013-03-14 08:30:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2013-03-15 03:30:15 +0000
@@ -99,7 +99,7 @@
• <a href='javascript:showProgramEnrollmentForm( "$patient.id" )'>$i18n.getString("enroll")</a>
</p>
<div class="contentProviderTable">
- <table id='activeTB' name='activeTB'>
+ <table id='activeTB' name='activeTB' style='cursor:pointer;'>
#foreach( $programInstance in $activeProgramInstances )
#set($programStageInstanceId = '')
#if($programInstance.program.type==1)
@@ -150,7 +150,7 @@
• <a href='javascript:showProgramEnrollmentForm( "$patient.id" )'>$i18n.getString("enroll")</a>
</p>
<div class="contentProviderTable">
- <table id='completedTB' name='completedTB'>
+ <table id='completedTB' name='completedTB' style='cursor:pointer;'>
#foreach($programInstance in $completedProgramInstances)
#set($programStageInstanceId = '')
#if($programInstance.program.type==2)
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2013-03-14 08:30:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2013-03-15 03:30:15 +0000
@@ -150,6 +150,12 @@
jQuery("[id=tab-4] :input").prop('disabled', true);
jQuery("[id=tab-5] :input").prop('disabled', true);
jQuery("[id=tab-3] :input").datepicker("destroy");
+ jQuery("#completeProgram").attr('disabled', true);
+ jQuery("#incompleteProgram").attr('disabled', false);
+ jQuery("img").removeAttr("onclick");
+ #else
+ jQuery("#completeProgram").attr('disabled', false);
+ jQuery("#incompleteProgram").attr('disabled', true);
#end
});
=== 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-14 09:12:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm 2013-03-15 03:30:15 +0000
@@ -13,8 +13,8 @@
<td></td>
<td>
<input type="button" class='large-button' value="$i18n.getString( 'update' )" onclick='updateEnrollment($programInstance.patient.id, $programInstance.program.id, $programInstance.id, "$programInstance.program.displayName")'/>
- <input type="button" class='large-button' id='completeProgram' value="$i18n.getString( 'complete_quit' )" onclick='unenrollmentForm($programInstance.id)' #if( $programInstance.completed=='true') disabled #end />
- <input type="button" class='large-button' id='incompleteProgram' value="$i18n.getString( 're_enrol' )" onclick='reenrollmentForm($programInstance.id)' #if( $programInstance.completed=='false') disabled #end/>
+ <input type="button" class='large-button' id='completeProgram' value="$i18n.getString( 'complete_quit' )" onclick='unenrollmentForm($programInstance.id)' />
+ <input type="button" class='large-button' id='incompleteProgram' value="$i18n.getString( 're_enrol' )" onclick='reenrollmentForm($programInstance.id)' />
</td>
</tr>
</table>
@@ -103,16 +103,5 @@
#end
<script>
- #if( $!programInstance )
- showById('unenrollBtn');
- #end
- #if( $programInstance.completed=='false')
- datePickerInRangeValid( 'dateOfIncident' , 'enrollmentDate' );
- #else
- jQuery(":input").attr('disabled', true);
- jQuery("#incompleteProgram").attr('disabled', false);
- jQuery("img").removeAttr("onclick");
- #end
-
var i18n_insert_a_due_date = '$encoder.jsEscape( $i18n.getString( "insert_a_due_date" ) , "'")';
</script>
\ No newline at end of file