dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23126
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11244: Add option for program-stage data-element which allows to select date in the future.
------------------------------------------------------------
revno: 11244
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-06-21 12:12:42 +0700
message:
Add option for program-stage data-element which allows to select date in the future.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElement.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.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/addProgramStageForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.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/ProgramStageDataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElement.java 2013-05-17 03:29:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElement.java 2013-06-21 05:12:42 +0000
@@ -74,6 +74,8 @@
private Boolean displayInReports;
+ private Boolean allowDateInFuture;
+
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -101,7 +103,7 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
@JsonSerialize( as = BaseIdentifiableObject.class )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public ProgramStage getProgramStage()
{
return programStage;
@@ -115,7 +117,7 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
@JsonSerialize( as = BaseIdentifiableObject.class )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public DataElement getDataElement()
{
return dataElement;
@@ -128,7 +130,7 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public Boolean getAllowProvidedElsewhere()
{
return allowProvidedElsewhere;
@@ -141,7 +143,7 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public boolean isCompulsory()
{
return compulsory;
@@ -164,7 +166,7 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public Boolean getDisplayInReports()
{
return displayInReports;
@@ -175,6 +177,16 @@
this.displayInReports = displayInReports;
}
+ public Boolean getAllowDateInFuture()
+ {
+ return allowDateInFuture;
+ }
+
+ public void setAllowDateInFuture( Boolean allowDateInFuture )
+ {
+ this.allowDateInFuture = allowDateInFuture;
+ }
+
// -------------------------------------------------------------------------
// hashCode, equals and toString
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2013-05-29 08:36:29 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2013-06-21 05:12:42 +0000
@@ -110,7 +110,7 @@
// Inline Javascript to add to HTML before outputting
// ---------------------------------------------------------------------
- final String jQueryCalendar = "<script>datePicker(\"$PROGRAMSTAGEID-$DATAELEMENTID-val\", false, false);</script>";
+ final String jQueryCalendar = "<script>$DATAPICKER-METHOD(\"$PROGRAMSTAGEID-$DATAELEMENTID-val\", false, false);</script>";
StringBuffer sb = new StringBuffer();
@@ -135,6 +135,7 @@
String compulsory = "null";
boolean allowProvidedElsewhere = false;
+ String dateMethod = "datePickerValid";
String inputHTML = dataElementMatcher.group( 1 );
Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( inputHTML );
@@ -172,6 +173,10 @@
compulsory = BooleanUtils.toStringTrueFalse( psde.isCompulsory() );
allowProvidedElsewhere = psde.getAllowProvidedElsewhere();
+ if ( psde.getAllowDateInFuture() )
+ {
+ dateMethod = "datePicker";
+ }
}
if ( dataElement == null )
@@ -207,7 +212,7 @@
}
patientDataValue = getValue( patientDataValues, dataElementUid );
-
+
dataElementValue = patientDataValue != null ? patientDataValue.getValue() : dataElementValue;
}
else
@@ -298,6 +303,7 @@
inputHTML = inputHTML.replace( "$COMPULSORY", compulsory );
inputHTML = inputHTML.replace( "$SAVEMODE", "false" );
inputHTML = inputHTML.replace( "$TABINDEX", tabindex + "" );
+ inputHTML = inputHTML.replace( "$DATAPICKER-METHOD", dateMethod );
inputHTML = inputHTML.replaceAll( "\\$", "\\\\\\$" );
dataElementMatcher.appendReplacement( sb, inputHTML );
@@ -316,7 +322,7 @@
// Inline Javascript to add to HTML before outputting
// ---------------------------------------------------------------------
- final String jQueryCalendar = "<script>datePicker(\"$PROGRAMSTAGEID-$DATAELEMENTID-val\", false);</script>";
+ final String jQueryCalendar = "<script>$DATAPICKER-METHOD(\"$PROGRAMSTAGEID-$DATAELEMENTID-val\", false);</script>";
StringBuffer sb = new StringBuffer();
@@ -341,6 +347,7 @@
String compulsory = "null";
boolean allowProvidedElsewhere = false;
+ String dateMethod = "datePickerValid";
String inputHTML = dataElementMatcher.group( 1 );
Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( inputHTML );
@@ -378,6 +385,10 @@
compulsory = BooleanUtils.toStringTrueFalse( psde.isCompulsory() );
allowProvidedElsewhere = psde.getAllowProvidedElsewhere();
+ if ( psde.getAllowDateInFuture() )
+ {
+ dateMethod = "datePicker";
+ }
}
if ( dataElement == null )
@@ -480,6 +491,7 @@
inputHTML = inputHTML.replace( "$COMPULSORY", compulsory );
inputHTML = inputHTML.replace( "$SAVEMODE", "false" );
inputHTML = inputHTML.replace( "$TABINDEX", tabindex + "" );
+ inputHTML = inputHTML.replace( "$DATAPICKER-METHOD", dateMethod );
inputHTML = inputHTML.replaceAll( "\\$", "\\\\\\$" );
dataElementMatcher.appendReplacement( sb, inputHTML );
@@ -762,9 +774,9 @@
/**
* Replaces i18n string in the custom form code.
- *
+ *
* @param dataEntryFormCode the data entry form html.
- * @param i18n the I18n object.
+ * @param i18n the I18n object.
* @return internationalized data entry form html.
*/
private String populateI18nStrings( String dataEntryFormCode, I18n i18n )
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml 2012-11-08 04:13:48 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml 2013-06-21 05:12:42 +0000
@@ -20,6 +20,8 @@
<property name="sortOrder" column="sort_order" />
<property name="displayInReports"/>
+
+ <property name="allowDateInFuture"/>
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2013-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2013-06-21 05:12:42 +0000
@@ -219,6 +219,13 @@
this.captureCoordinates = captureCoordinates;
}
+ private List<Boolean> allowDateInFutures;
+
+ public void setAllowDateInFutures( List<Boolean> allowDateInFutures )
+ {
+ this.allowDateInFutures = allowDateInFutures;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -266,11 +273,13 @@
DataElement dataElement = dataElementService.getDataElement( selectedDataElementsValidator.get( i ) );
Boolean allowed = allowProvidedElsewhere.get( i ) == null ? false : allowProvidedElsewhere.get( i );
Boolean displayInReport = displayInReports.get( i ) == null ? false : displayInReports.get( i );
+ Boolean allowDate = allowDateInFutures.get( i ) == null ? false : allowDateInFutures.get( i );
ProgramStageDataElement programStageDataElement = new ProgramStageDataElement( programStage, dataElement,
this.compulsories.get( i ), new Integer( i ) );
programStageDataElement.setAllowProvidedElsewhere( allowed );
programStageDataElement.setDisplayInReports( displayInReport );
+ programStageDataElement.setAllowDateInFuture( allowDate );
programStageDataElementService.addProgramStageDataElement( programStageDataElement );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java 2013-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java 2013-06-21 05:12:42 +0000
@@ -212,6 +212,13 @@
this.captureCoordinates = captureCoordinates;
}
+ private List<Boolean> allowDateInFutures;
+
+ public void setAllowDateInFutures( List<Boolean> allowDateInFutures )
+ {
+ this.allowDateInFutures = allowDateInFutures;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -260,6 +267,7 @@
DataElement dataElement = dataElementService.getDataElement( selectedDataElementsValidator.get( i ) );
Boolean allowed = allowProvidedElsewhere.get( i ) == null ? false : allowProvidedElsewhere.get( i );
Boolean displayInReport = displayInReports.get( i ) == null ? false : displayInReports.get( i );
+ Boolean allowDate = allowDateInFutures.get( i ) == null ? false : allowDateInFutures.get( i );
ProgramStageDataElement programStageDataElement = programStageDataElementService.get( programStage,
dataElement );
@@ -270,6 +278,7 @@
this.compulsories.get( i ), new Integer( i ) );
programStageDataElement.setAllowProvidedElsewhere( allowed );
programStageDataElement.setDisplayInReports( displayInReport );
+ programStageDataElement.setAllowDateInFuture( allowDate );
programStageDataElementService.addProgramStageDataElement( programStageDataElement );
}
else
@@ -278,6 +287,7 @@
programStageDataElement.setSortOrder( new Integer( i ) );
programStageDataElement.setAllowProvidedElsewhere( allowed );
programStageDataElement.setDisplayInReports( displayInReport );
+ programStageDataElement.setAllowDateInFuture( allowDate );
programStageDataElementService.updateProgramStageDataElement( programStageDataElement );
programStageDataElements.remove( programStageDataElement );
=== 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-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2013-06-21 05:12:42 +0000
@@ -414,4 +414,5 @@
selected_program_stages = Selected program stages
patient = Person
orgunit_registered = Organisation unit registered
-all_users_in_orgunit_registered = All users in organisation unit registered
\ No newline at end of file
+all_users_in_orgunit_registered = All users in organisation unit registered
+date_in_future = 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/addProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2013-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2013-06-21 05:12:42 +0000
@@ -10,7 +10,7 @@
<select id='daysAllowedSendMessages' name="daysAllowedSendMessages" multiple="multiple" class="hidden"></select>
<select id='templateMessages' name="templateMessages" multiple="multiple" class="hidden"></select>
<select id='sendTo' name="sendTo" multiple="multiple" class="hidden"></select>
-
+
<table>
<thead>
<tr><th colspan="2">$i18n.getString( "program_stage_details" )</th></tr>
@@ -92,6 +92,7 @@
<select id="compulsories" name='compulsories' multiple="multiple" class="hidden"></select>
<select id="allowProvidedElsewhere" name='allowProvidedElsewhere' multiple="multiple" class="hidden"></select>
<select id="displayInReports" name='displayInReports' multiple="multiple" class="hidden"></select>
+ <select id="allowDateInFutures" name='allowDateInFutures' multiple="multiple" class="hidden"></select>
</th>
</tr>
</thead>
@@ -125,6 +126,7 @@
<th>$i18n.getString( "compulsory" )</th>
<th>$i18n.getString( "allow_provided_elsewhere" )</th>
<th>$i18n.getString( "display_in_reports" )</th>
+ <th>$i18n.getString( "date_in_future" )</th>
</thead>
<tbody id="selectedList"></tbody>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js 2013-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addProgramStageForm.js 2013-06-21 05:12:42 +0000
@@ -31,6 +31,9 @@
var daysAllowedSendMessages = jQuery( "#daysAllowedSendMessages" );
daysAllowedSendMessages.empty();
+ var allowDateInFutures = jQuery( "#allowDateInFutures" );
+ allowDateInFutures.empty();
+
var templateMessages = jQuery( "#templateMessages" );
templateMessages.empty();
@@ -55,6 +58,10 @@
var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
checked = displayInReport.attr('checked') ? true : false;
displayInReports.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+
+ var allowDateInFuture = jQuery( item ).find( "input[name='allowDateInFuture']:first");
+ checked = allowDateInFuture.attr('checked') ? true : false;
+ allowDateInFutures.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
});
jQuery(".daysAllowedSendMessage").each( function( i, item ){
daysAllowedSendMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value +"</option>" );
@@ -75,6 +82,7 @@
var option = jQuery("<option />");
option.text( item.name );
option.attr( "value", item.id );
+ option.attr( "valuetype", item.type );
return option;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2013-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2013-06-21 05:12:42 +0000
@@ -103,6 +103,12 @@
html += "<td align='center'><input type='checkbox' name='compulsory'></td>";
html += "<td align='center'><input type='checkbox' name='allowProvided'></td>";
html += "<td align='center'><input type='checkbox' name='displayInReport'></td>";
+ if( jQuery(item).attr('valuetype') =='date'){
+ html += "<td align='center'><input type='checkbox' name='allowDateInFuture'></td>";
+ }
+ else{
+ html += "<td align='center'><input type='hidden' name='allowDateInFuture'></td>";
+ }
html += "</tr>";
selectedList.append( html );
jQuery( item ).remove();
@@ -119,6 +125,12 @@
html += "<td align='center'><input type='checkbox' name='compulsory'></td>";
html += "<td align='center'><input type='checkbox' name='allowProvided'></td>";
html += "<td align='center'><input type='checkbox' name='displayInReport'></td>";
+ if( jQuery(item).attr('valuetype') =='date'){
+ html += "<td align='center'><input type='checkbox' name='allowDateInFuture'></td>";
+ }
+ else{
+ html += "<td align='center'><input type='hidden' name='allowDateInFuture'></td>";
+ }
html += "</tr>";
selectedList.append( html );
jQuery( item ).remove();
@@ -132,7 +144,7 @@
item = jQuery(item);
if( item.hasClass("selected") )
{
- availableList.append( "<option value='" + item.attr( "id" ) + "' selected='true'>" + item.find("td:first").text() + "</option>" );
+ availableList.append( "<option value='" + item.attr( "id" ) + "' selected='true' valuetype='" + item.valuetype + "'>" + item.find("td:first").text() + "</option>" );
item.remove();
}
});
@@ -144,7 +156,7 @@
var availableList = jQuery("#availableList");
jQuery("#selectedList").find("tr").each( function( i, item ){
item = jQuery(item);
- availableList.append( "<option value='" + item.attr( "id" ) + "' selected='true'>" + item.find("td:first").text() + "</option>" );
+ availableList.append( "<option value='" + item.attr( "id" ) + "' selected='true' valuetype='" + item.valuetype + "'>" + item.find("td:first").text() + "</option>" );
item.remove();
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js 2013-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js 2013-06-21 05:12:42 +0000
@@ -28,18 +28,21 @@
var displayInReports = jQuery( "#displayInReports" );
displayInReports.empty();
+ var allowDateInFutures = jQuery( "#allowDateInFutures" );
+ allowDateInFutures.empty();
+
var daysAllowedSendMessages = jQuery( "#daysAllowedSendMessages" );
daysAllowedSendMessages.empty();
var templateMessages = jQuery( "#templateMessages" );
templateMessages.empty();
+ var allowProvidedElsewhere = jQuery( "#allowProvidedElsewhere" );
+ allowProvidedElsewhere.empty();
+
var sendTo = jQuery( "#sendTo" );
sendTo.empty();
- allowProvidedElsewhere = jQuery( "#allowProvidedElsewhere" );
- allowProvidedElsewhere.empty();
-
jQuery("#selectedList").find("tr").each( function( i, item ){
selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
@@ -55,6 +58,10 @@
var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
checked = displayInReport.attr('checked') ? true : false;
displayInReports.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+
+ var allowDateInFuture = jQuery( item ).find( "input[name='allowDateInFuture']:first");
+ checked = allowDateInFuture.attr('checked') ? true : false;
+ allowDateInFutures.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
});
jQuery(".daysAllowedSendMessage").each( function( i, item ){
daysAllowedSendMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value +"</option>" );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2013-06-14 15:52:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2013-06-21 05:12:42 +0000
@@ -92,6 +92,7 @@
<select id="compulsories" name='compulsories' multiple="multiple" class="hidden"></select>
<select id="allowProvidedElsewhere" name='allowProvidedElsewhere' multiple="multiple" class="hidden"></select>
<select id="displayInReports" name='displayInReports' multiple="multiple" class="hidden"></select>
+ <select id="allowDateInFutures" name='allowDateInFutures' multiple="multiple" class="hidden"></select>
</th>
</tr>
</thead>
@@ -125,6 +126,7 @@
<th>$i18n.getString( "compulsory" )</th>
<th>$i18n.getString( "allow_provided_elsewhere" )</th>
<th>$i18n.getString( "display_in_reports" )</th>
+ <th>$i18n.getString( "date_in_future" )</th>
</tr>
</thead>
<tbody id="selectedList">
@@ -134,6 +136,13 @@
<td align="center"><input type="checkbox" name="compulsory" value="$programStageDataElement.dataElement.id" #if($programStageDataElement.compulsory == true ) checked #end /></td>
<td align="center"><input type="checkbox" name="allowProvided" value="$programStageDataElement.dataElement.id" #if($programStageDataElement.allowProvidedElsewhere == true ) checked #end /></td>
<td align="center"><input type="checkbox" name="displayInReport" value="$programStageDataElement.dataElement.id" #if($programStageDataElement.displayInReports == true ) checked #end /></td>
+ <td align="center">
+ #if($programStageDataElement.dataElement.type=='date')
+ <input type="checkbox" name="allowDateInFuture" value="$programStageDataElement.dataElement.id" #if($programStageDataElement.allowDateInFuture == true ) checked #end />
+ #else
+ <input type="hidden" name="allowDateInFuture" />
+ #end
+ </td>
</tr>
#end
</tbody>