← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10540: wip, remove need for psiid in data entry form

 

------------------------------------------------------------
revno: 10540
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-04-13 15:00:15 +0700
message:
  wip, remove need for psiid in data entry form
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.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/jsonProgramStageInstance.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/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-04-13 07:47:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-04-13 08:00:15 +0000
@@ -105,13 +105,6 @@
 	var i18n_enter_values_for_longitude_and_latitude_fields = '$encoder.jsEscape( $i18n.getString( "enter_values_for_longitude_and_latitude_fields" ) , "'" )';
 	var i18n_enter_a_valid_number = '$encoder.jsEscape( $i18n.getString( "enter_a_valid_number" ) , "'" )';
 
-	#if( $program.type == '1' && $programStageInstance.programInstance.status==1)
-		jQuery("[id=entryFormContainer] :input").prop('disabled', true);
-		jQuery("[id=entryFormContainer] :input").datepicker("destroy");
-		jQuery("[id=executionDate]").prop('disabled', true);
-		jQuery("[id=executionDate]").datepicker("destroy");
-	#end
-
 	if(getFieldValue('completed')=='true' && getFieldValue('blockEntryForm')=='true'){
 		blockEntryForm();
 	}

=== 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	2013-04-13 07:47:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-04-13 08:00:15 +0000
@@ -679,6 +679,13 @@
                 $( '#commentTB' ).append( comment )
             });
         }
+
+        if ( data.program.type == '1' && data.programInstance.status == '1' ) {
+            jQuery("[id=entryFormContainer] :input").prop('disabled', true);
+            jQuery("[id=entryFormContainer] :input").datepicker("destroy");
+            jQuery("[id=executionDate]").prop('disabled', true);
+            jQuery("[id=executionDate]").datepicker("destroy");
+        }
     } ).fail(function() {
         $('#commentInput').attr('disabled', true)
     });

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm	2013-04-13 07:47:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramStageInstance.vm	2013-04-13 08:00:15 +0000
@@ -50,6 +50,6 @@
     "programInstance": {
         "id": "$!programStageInstance.programInstance.id",
         "dateOfIncident": "$format.formatDate( $!programStageInstance.programInstance.dateOfIncident )",
-        "status": "$format.formatDate( $!programStageInstance.programInstance.status )"
+        "status": "$!programStageInstance.programInstance.status"
     }
 }