← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15906: Fixed bug - The Incompleted button in case entry form should be disabled when an incompleted even...

 

------------------------------------------------------------
revno: 15906
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-06-30 16:02:26 +0800
message:
  Fixed bug - The Incompleted button in case entry form should be disabled when an incompleted event is opened.
modified:
  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/form.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js
  tools/dhis2-tools-deb/install_12.04.sh*


--
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/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2014-06-24 12:38:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2014-06-30 08:02:26 +0000
@@ -882,6 +882,8 @@
 				}
 			}
 
+			disableCompletedButton(eval(data.completed));
+			
 			if(data.executionDate) {
 				$( '#executionDate' ).val(data.executionDate);
 				$( '#entryForm' ).removeClass( 'hidden' ).addClass( 'visible' );

=== 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	2014-06-24 10:12:20 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js	2014-06-30 08:02:26 +0000
@@ -26,8 +26,6 @@
 	showById('programNameDiv');
 	setFieldValue( 'dueDate', '' );
 	setFieldValue( 'executionDate', '' );
-	disableCompletedButton(true);
-	disable('uncompleteBtn');
 	jQuery( 'input[id=programStageInstanceId]').val(programStageInstanceId );
 			
 	showLoader();	
@@ -39,7 +37,7 @@
 			var programName = $('#program option:selected').text();
 			setInnerHTML( 'programNameDiv', '<h3>' + programName + '</h3>');
 			var completed = jQuery('#entryFormContainer input[id=completed]').val();
-			var irregular = jQuery('#entryFormContainer input[id=irregular]').val();
+			disableCompletedButton(completed);
 			showById('inputCriteriaDiv');
 			showById('entryForm');
 			hideLoader();

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js	2014-06-16 05:46:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js	2014-06-30 08:02:26 +0000
@@ -583,15 +583,12 @@
 					if (executionDate == '') {
 						disable('validationBtn');
 					} else if (executionDate != '') {
-						if (completed == 'false') {
-							disableCompletedButton(false);
-						} else if (completed == 'true') {
-							disableCompletedButton(true);
-						}
+						disableCompletedButton(completed);
 					}
 					$(window).scrollTop(200);
 				} else {
 					blockEntryForm();
+					disableCompletedButton(completed);
 					disable('executionDate');
 					hideById('inputCriteriaDiv');
 				}

=== modified file 'tools/dhis2-tools-deb/install_12.04.sh' (properties changed: +x to -x)