← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11881: Add selectIncidentDatesInFuture property for the program.

 

------------------------------------------------------------
revno: 11881
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-09-03 21:59:12 +0700
message:
  Add selectIncidentDatesInFuture property for the program.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm
  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/patientForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.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-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2013-09-02 21:20:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2013-09-03 14:59:12 +0000
@@ -131,6 +131,8 @@
     private Boolean useBirthDateAsEnrollmentDate;
 
     private Boolean selectEnrollmentDatesInFuture;
+    
+    private Boolean selectIncidentDatesInFuture;
 
     // -------------------------------------------------------------------------
     // Constructors
@@ -573,4 +575,17 @@
         this.selectEnrollmentDatesInFuture = selectEnrollmentDatesInFuture;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+    public Boolean getSelectIncidentDatesInFuture()
+    {
+        return selectIncidentDatesInFuture;
+    }
+
+    public void setSelectIncidentDatesInFuture( Boolean selectIncidentDatesInFuture )
+    {
+        this.selectIncidentDatesInFuture = selectIncidentDatesInFuture;
+    }
+
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientRegistrationFormService.java	2013-09-03 14:59:12 +0000
@@ -55,6 +55,10 @@
 
     private static final String TAG_CLOSE = "/>";
 
+    private static final String PROGRAM_INCIDENT_DATE = "dateOfIncident";
+
+    private static final String PROGRAM_ENROLLMENT_DATE = "enrollmentDate";
+
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -141,8 +145,8 @@
     }
 
     @Override
-    public String prepareDataEntryFormForAdd( String htmlCode, Program program, Collection<User> healthWorkers, Patient patient,
-        ProgramInstance programInstance, I18n i18n, I18nFormat format )
+    public String prepareDataEntryFormForAdd( String htmlCode, Program program, Collection<User> healthWorkers,
+        Patient patient, ProgramInstance programInstance, I18n i18n, I18nFormat format )
     {
         int index = 1;
 
@@ -292,13 +296,27 @@
 
                 inputHtml = "<input id=\"" + property + "\" name=\"" + property + "\" tabindex=\"" + index
                     + "\" value=\"" + value + "\" " + TAG_CLOSE;
-                if ( program != null && program.getSelectEnrollmentDatesInFuture() )
+                if ( property.equals( PROGRAM_ENROLLMENT_DATE ) )
                 {
-                    inputHtml += "<script>datePicker(\"" + property + "\", true);</script>";
+                    if ( program != null && program.getSelectEnrollmentDatesInFuture() )
+                    {
+                        inputHtml += "<script>datePicker(\"" + property + "\", true);</script>";
+                    }
+                    else
+                    {
+                        inputHtml += "<script>datePickerValid(\"" + property + "\", true);</script>";
+                    }
                 }
-                else
+                else if ( property.equals( PROGRAM_INCIDENT_DATE ) )
                 {
-                    inputHtml += "<script>datePickerValid(\"" + property + "\", true);</script>";
+                    if ( program != null && program.getSelectIncidentDatesInFuture() )
+                    {
+                        inputHtml += "<script>datePicker(\"" + property + "\", true);</script>";
+                    }
+                    else
+                    {
+                        inputHtml += "<script>datePickerValid(\"" + property + "\", true);</script>";
+                    }
                 }
             }
 

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2013-09-03 14:59:12 +0000
@@ -229,6 +229,7 @@
         executeSql( "update programstage set blockEntryForm = false where blockEntryForm is null ");
         executeSql( "update programstage set remindCompleted = false where remindCompleted is null ");
         executeSql( "update programstage set displayProvidedOtherFacility = false where displayProvidedOtherFacility is null ");
+        executeSql( "update programstage set selectIncidentDatesInFuture = false where selectIncidentDatesInFuture is null ");
         executeSql( "ALTER TABLE program DROP COLUMN generatedByEnrollmentDate" );
         executeSql( "ALTER TABLE program DROP COLUMN blockEntryForm" );
         executeSql( "ALTER TABLE program DROP COLUMN remindCompleted" );

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2013-09-02 21:20:47 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2013-09-03 14:59:12 +0000
@@ -85,6 +85,8 @@
 	
     <property name="selectEnrollmentDatesInFuture" />
     
+    <property name="selectIncidentDatesInFuture" />
+    
 	<!-- Access properties -->
 	
     <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_program_userid" />

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm	2013-07-25 02:32:32 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm	2013-09-03 14:59:12 +0000
@@ -200,7 +200,7 @@
 			<td colspan='2' class='input-column'><input type="text" id="dateOfIncident" name="dateOfIncident"  class="{validate:{required:true}}"></td>
 		</tr>
 		<script>
-			#if($program.selectEnrollmentDatesInFuture=='true')
+			#if($program.selectEnrollmentDatesInFuture=='true' || $program.selectIncidentDatesInFuture=='true'  )
 				datePickerInRange( 'dateOfIncident' , 'enrollmentDate', false, true );
 			#else
 				datePickerInRangeValid( 'dateOfIncident' , 'enrollmentDate', false, true );

=== 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-09-03 03:58:32 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-09-03 14:59:12 +0000
@@ -1315,7 +1315,7 @@
 			
 			jQuery("#dateOfIncidentField").datepicker("destroy");
 			jQuery("#enrollmentDateField").datepicker("destroy");
-			if(program.attr("selectEnrollmentDatesInFuture")=='true'){
+			if(program.attr("selectEnrollmentDatesInFuture")=='true' || program.attr("selectIncidentDatesInFuture")=='true' ){
 				datePickerInRange( 'dateOfIncidentField' , 'enrollmentDateField', false, true );
 			}
 			else{

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2013-08-06 03:10:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm	2013-09-03 14:59:12 +0000
@@ -256,7 +256,7 @@
 				<td colspan='2' class='input-column'><input type="text" id="dateOfIncident" name="dateOfIncident"  class="{validate:{required:true}}"></td>
 			</tr>
 			<script>
-				#if($program.selectEnrollmentDatesInFuture=='true')
+				#if($program.selectEnrollmentDatesInFuture=='true' || $program.selectIncidentDatesInFuture=='true' )
 					datePickerInRange( 'dateOfIncident' , 'enrollmentDate', false, true );
 				#else
 					datePickerInRangeValid( 'dateOfIncident' , 'enrollmentDate', false, true );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm	2013-07-25 02:32:32 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm	2013-09-03 14:59:12 +0000
@@ -31,7 +31,8 @@
 						displayIncidentDate='$!program.displayIncidentDate'
 						dateOfEnrollmentDescription='$!program.dateOfEnrollmentDescription'
 						dateOfIncidentDescription='$!program.dateOfIncidentDescription'
-						selectEnrollmentDatesInFuture='$!program.selectEnrollmentDatesInFuture'>$encoder.htmlEncode( $program.displayName )</option>
+						selectEnrollmentDatesInFuture='$!program.selectEnrollmentDatesInFuture'
+						selectIncidentDatesInFuture='$program.selectIncidentDatesInFuture'>$encoder.htmlEncode( $program.displayName )</option>
 					#end
 				</select>
 			</td>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm	2013-09-03 14:59:12 +0000
@@ -15,6 +15,7 @@
 	"displayOnAllOrgunit": "$!program.displayOnAllOrgunit",
 	"useBirthDateAsIncidentDate": "$!program.useBirthDateAsIncidentDate",
 	"useBirthDateAsEnrollmentDate": "$!program.useBirthDateAsEnrollmentDate",
-	"selectEnrollmentDatesInFuture": "$!program.selectEnrollmentDatesInFuture"
+	"selectEnrollmentDatesInFuture": "$!program.selectEnrollmentDatesInFuture",
+	"selectIncidentDatesInFuture": "$!program.selectIncidentDatesInFuture"
   }
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java	2013-09-02 21:20:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java	2013-09-03 14:59:12 +0000
@@ -252,6 +252,13 @@
         this.selectEnrollmentDatesInFuture = selectEnrollmentDatesInFuture;
     }
 
+    private Boolean selectIncidentDatesInFuture;
+
+    public void setSelectIncidentDatesInFuture( Boolean selectIncidentDatesInFuture )
+    {
+        this.selectIncidentDatesInFuture = selectIncidentDatesInFuture;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -266,6 +273,7 @@
         useBirthDateAsIncidentDate = (useBirthDateAsIncidentDate == null) ? false : useBirthDateAsIncidentDate;
         useBirthDateAsEnrollmentDate = (useBirthDateAsEnrollmentDate == null) ? false : useBirthDateAsEnrollmentDate;
         selectEnrollmentDatesInFuture = (selectEnrollmentDatesInFuture == null) ? false : selectEnrollmentDatesInFuture;
+        selectIncidentDatesInFuture = (selectIncidentDatesInFuture == null) ? false : selectIncidentDatesInFuture;
 
         Program program = new Program();
 
@@ -281,6 +289,7 @@
         program.setUseBirthDateAsIncidentDate( useBirthDateAsIncidentDate );
         program.setUseBirthDateAsEnrollmentDate( useBirthDateAsEnrollmentDate );
         program.setSelectEnrollmentDatesInFuture( selectEnrollmentDatesInFuture );
+        program.setSelectIncidentDatesInFuture( selectIncidentDatesInFuture );
 
         if ( type == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java	2013-09-02 21:20:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java	2013-09-03 14:59:12 +0000
@@ -276,6 +276,13 @@
         this.selectEnrollmentDatesInFuture = selectEnrollmentDatesInFuture;
     }
 
+    private Boolean selectIncidentDatesInFuture;
+
+    public void setSelectIncidentDatesInFuture( Boolean selectIncidentDatesInFuture )
+    {
+        this.selectIncidentDatesInFuture = selectIncidentDatesInFuture;
+    }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -293,6 +300,7 @@
         useBirthDateAsIncidentDate = (useBirthDateAsIncidentDate == null) ? false : useBirthDateAsIncidentDate;
         useBirthDateAsEnrollmentDate = (useBirthDateAsEnrollmentDate == null) ? false : useBirthDateAsEnrollmentDate;
         selectEnrollmentDatesInFuture = (selectEnrollmentDatesInFuture == null) ? false : selectEnrollmentDatesInFuture;
+        selectIncidentDatesInFuture = (selectIncidentDatesInFuture == null) ? false : selectIncidentDatesInFuture;
 
         Program program = programService.getProgram( id );
         program.setName( name );
@@ -307,6 +315,7 @@
         program.setUseBirthDateAsIncidentDate( useBirthDateAsIncidentDate );
         program.setUseBirthDateAsEnrollmentDate( useBirthDateAsEnrollmentDate );
         program.setSelectEnrollmentDatesInFuture( selectEnrollmentDatesInFuture );
+        program.setSelectIncidentDatesInFuture( selectIncidentDatesInFuture );
 
         if ( type == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2013-09-03 14:59:12 +0000
@@ -450,4 +450,5 @@
 custom_form_name = Custom form name
 allow_select_enrollment_dates_in_future = Allow seleting enrollment dates in future
 related_patient = Related person
-allow_select_enrollment_date_in_future = Allow select enrollment date in future
\ No newline at end of file
+allow_select_enrollment_date_in_future = Allow to select enrollment date in future
+allow_select_incident_date_in_future = Allow to select incident date in future
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm	2013-09-03 14:59:12 +0000
@@ -145,6 +145,12 @@
 		</tr>
 		
 		<tr name='nonAnonymous'>
+			<td><label>$i18n.getString( "allow_select_incident_date_in_future" )</label></td>
+			<td><input type="checkbox" id="selectIncidentDatesInFuture" name="selectIncidentDatesInFuture" value='true' ></td>
+			<td></td>
+		</tr>
+		
+		<tr name='nonAnonymous'>
 			<td><label>$i18n.getString( "skip_to_generate_overdue_events" )</label></td>
 			<td><input type="checkbox" id="ignoreOverdueEvents" name="ignoreOverdueEvents" value='true'></td>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js	2013-09-03 14:59:12 +0000
@@ -35,9 +35,12 @@
 		var useBirthDateAsEnrollmentDate = ( json.program.useBirthDateAsEnrollmentDate == 'true') ? i18n_yes : i18n_no;
 		setInnerHTML( 'useBirthDateAsEnrollmentDateField', useBirthDateAsEnrollmentDate );   	
 		
-		var displayOnAllOrgunit= ( json.program.selectEnrollmentDatesInFuture == 'true') ? i18n_yes : i18n_no;
+		var selectEnrollmentDatesInFuture= ( json.program.selectEnrollmentDatesInFuture == 'true') ? i18n_yes : i18n_no;
 		setInnerHTML( 'selectEnrollmentDatesInFutureField', selectEnrollmentDatesInFuture );   	
 		
+		var selectIncidentDatesInFuture= ( json.program.selectIncidentDatesInFuture == 'true') ? i18n_yes : i18n_no;
+		setInnerHTML( 'selectIncidentDatesInFutureField', selectIncidentDatesInFuture );   	
+		
 		setInnerHTML( 'dateOfEnrollmentDescriptionField', json.program.dateOfEnrollmentDescription );   
 		setInnerHTML( 'dateOfIncidentDescriptionField', json.program.dateOfIncidentDescription );   		
 		setInnerHTML( 'programStageCountField',  json.program.programStageCount );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm	2013-09-03 14:59:12 +0000
@@ -89,6 +89,7 @@
 				<p><label class="bold">$i18n.getString( "type" ):</label><br><span id="typeField"></span></p>                           
 				<p><label class="bold">$i18n.getString( "display_date_of_incident" ):</label><br><span id="displayIncidentDateField"></span></p>
 				<p><label class="bold">$i18n.getString( "allow_select_enrollment_date_in_future" ):</label><br><span id="selectEnrollmentDatesInFutureField"></span></p>
+				<p><label class="bold">$i18n.getString( "allow_select_incident_date_in_future" ):</label><br><span id="selectIncidentDatesInFutureField"></span></p>
 				<p><label class="bold">$i18n.getString( "skip_to_generate_overdue_events" ):</label><br><span id="ignoreOverdueEventsField"></span></p>
 				<p><label class="bold">$i18n.getString( "only_enroll_once" ):</label><br><span id="onlyEnrollOnceField"></span></p>
 				<p><label class="bold">$i18n.getString( "used_by_all_orgunits" ):</label><br><span id="displayOnAllOrgunitField"></span></p>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm	2013-09-03 06:39:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm	2013-09-03 14:59:12 +0000
@@ -158,6 +158,12 @@
 		</tr>
 		
 		<tr name='nonAnonymous'>
+			<td><label>$i18n.getString( "allow_select_incident_date_in_future" )</label></td>
+			<td><input type="checkbox" id="selectIncidentDatesInFuture" name="selectIncidentDatesInFuture" value='true' #if($program.selectIncidentDatesInFuture=='true') checked #end ></td>
+			<td></td>
+		</tr>
+		
+		<tr name='nonAnonymous'>
 			<td><label>$i18n.getString( "skip_to_generate_overdue_events" )</label></td>
 			<td><input type="checkbox" id="ignoreOverdueEvents" name="ignoreOverdueEvents" value='true' #if($program.ignoreOverdueEvents=='true') checked #end #if( $program.type!='1' ) disabled #end ></td>
 			<td></td>