dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29604
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14970: Fixed bug - Values of bool and trueOnly attributes are displayed as true/false instead of Yes/No.
------------------------------------------------------------
revno: 14970
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-04-25 00:30:48 +0800
message:
Fixed bug - Values of bool and trueOnly attributes are displayed as true/false instead of Yes/No.
added:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetVisitScheduleAttributesAction.java
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js
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/form.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js
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/jsonProgramAttributes.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectTrackedEntityInstance.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.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
=== added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetVisitScheduleAttributesAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetVisitScheduleAttributesAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetVisitScheduleAttributesAction.java 2014-04-24 16:30:48 +0000
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2004-2013, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis.caseentry.action.trackedentity;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
+import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
+import org.hisp.dhis.trackedentity.comparator.TrackedEntityAttributeSortOrderComparator;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ *
+ * @version $ GetVisitScheduleAttributesAction.java Apr 25, 2014 12:12:43 AM $
+ */
+public class GetVisitScheduleAttributesAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependency
+ // -------------------------------------------------------------------------
+
+ @Autowired
+ private TrackedEntityAttributeService attributeService;
+
+ // -------------------------------------------------------------------------
+ // Getter && Setter
+ // -------------------------------------------------------------------------
+
+ private List<TrackedEntityAttribute> attributes = new ArrayList<TrackedEntityAttribute>();
+
+ public List<TrackedEntityAttribute> getAttributes()
+ {
+ return attributes;
+ }
+
+ // -------------------------------------------------------------------------
+ // Implementation Action
+ // -------------------------------------------------------------------------
+
+ @Override
+ public String execute()
+ {
+ attributes = new ArrayList<TrackedEntityAttribute>(
+ attributeService.getTrackedEntityAttributesByDisplayOnVisitSchedule( true ) );
+ Collections.sort( attributes, new TrackedEntityAttributeSortOrderComparator() );
+
+ return SUCCESS;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-04-23 23:45:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-04-24 16:30:48 +0000
@@ -601,6 +601,10 @@
<bean id="org.hisp.dhis.caseentry.action.trackedentity.GetAttributesByProgramAction"
class="org.hisp.dhis.caseentry.action.trackedentity.GetAttributesByProgramAction" scope="prototype">
</bean>
+
+ <bean id="org.hisp.dhis.caseentry.action.trackedentity.GetVisitScheduleAttributesAction"
+ class="org.hisp.dhis.caseentry.action.trackedentity.GetVisitScheduleAttributesAction" scope="prototype">
+ </bean>
<!-- Relationship -->
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2014-04-23 23:45:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2014-04-24 16:30:48 +0000
@@ -644,6 +644,13 @@
</result>
</action>
+ <action name="getVisitScheduleAttributes"
+ class="org.hisp.dhis.caseentry.action.trackedentity.GetVisitScheduleAttributesAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-caseentry/jsonProgramAttributes.vm
+ </result>
+ </action>
+
<action name="getVisitSchedule"
class="org.hisp.dhis.caseentry.action.trackedentity.GetProgramInstanceAction">
<result name="success" type="velocity">/content.vm</result>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2014-04-22 00:05:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2014-04-24 16:30:48 +0000
@@ -15,6 +15,8 @@
</script>
<h3 id='mainLinkLbl'>$i18n.getString( "visit_schedule_form" ) #openHelp('visit_schedule')</h3>
+<select id='attributeIds' name='attributeIds' class='hidden'></select>
+
<form id='activityPlanForm' name='activityPlanForm'>
<input type='hidden' id='isRegistration' name= 'isRegistration' value='false'>
<input type='hidden' id='listAll' name='listAll'>
@@ -46,7 +48,7 @@
<tr>
<td>$i18n.getString('program')</td>
<td>
- <select id='program' name='program' class="{validate:{required:true}}" >
+ <select id='program' name='program' class="{validate:{required:true}}" onchange='programOnChange()'>
#if($programs.size()==0)
<option value="">[$i18n.getString( "none_program" )]</option>
#elseif($programs.size()>1)
@@ -113,7 +115,6 @@
<td></td>
<td>
<input type="submit" class='large-button' id='listEntityInstanceBtn' value="$i18n.getString( 'show_activity_list' )" onclick="setFieldValue('export', false);">
- <input type="submit" class='large-button' value="$i18n.getString( 'export_xls' )" onclick="setFieldValue('export', true);">
</td>
</tr>
</table>
@@ -226,6 +227,8 @@
var i18n_for = '$encoder.jsEscape( $i18n.getString( "for" ) , "'")';
var i18n_data_entry = '$encoder.jsEscape( $i18n.getString( "data_entry" ) , "'")';
var i18n_events = '$encoder.jsEscape( $i18n.getString( "events" ) , "'")';
+ var i18n_next = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
+ var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
var registrationProgress = false;
setDateRange();
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2014-04-23 23:45:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2014-04-24 16:30:48 +0000
@@ -82,14 +82,32 @@
table += "<p>" + i18n_no_result_found + "</p>";
}
+ var idx = 4;
+
+ // Yes/No and Yes Only attributes in result
+
+ var attList = new Array();
+ $('#attributeIds option').each(function(i, item) {
+ var valueType = $(item).attr('valueType');
+ var value = $(item).val();
+ if ( valueType == 'bool' || valueType == 'trueOnly' ) {
+ for (var i = idx; i < json.width; i++) {
+ if( value==json.headers[i].name ){
+ attList.push(i);
+ }
+ }
+ }
+ });
+
// TEI list
table += "<table class='listTable' width='100%'>";
- var idx = 4;
table += "<col width='30' />";
for (var i = idx; i < json.width; i++) {
table += "<col />";
- }
+ }
+
+
table += "<col width='200' />";
table += "<thead><tr><th>#</th>";
for (var i = idx; i < json.width; i++) {
@@ -111,6 +129,9 @@
if (j == 4) {
colVal = json.metaData.names[colVal];
}
+ if( jQuery.inArray( j, attList )>=0 && colVal!="" ){
+ colVal = (colVal=='true')? i18n_yes : i18n_no;
+ }
table += "<td onclick=\"javascript:isDashboard=true;showTrackedEntityInstanceDashboardForm( '"
+ uid
+ "' )\" title='"
@@ -445,3 +466,22 @@
var m = date.getMonth();
var y= date.getFullYear();
}
+
+
+function programOnChange() {
+ var program = getFieldValue('program');
+ if( program != '' ){
+ $.postJSON("getVisitScheduleAttributes.action", {
+ id : program
+ }, function(json) {
+ clearListById('attributeIds');
+ for ( var i in json.attributes) {
+ if(json.attributes[i].displayed=='true'){
+ jQuery('#attributeIds').append(
+ '<option value="' + json.attributes[i].id
+ + '" valueType="' + json.attributes[i].valueType + '"></option>');
+ }
+ }
+ });
+ }
+}
=== 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 2014-04-24 14:52:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2014-04-24 16:30:48 +0000
@@ -207,11 +207,9 @@
});
var p = params;
- $('#searchingAttributeIdTD [id=searchObjectId] option').each(
- function(i, item) {
- if ($(item).attr('displayed')=="true"
- && p.indexOf(item.value) < 0 ) {
- params += "&attribute=" + item.value;
+ $('#attributeIds option').each(function(i, item) {
+ if ( p.indexOf(item.value) < 0 ) {
+ params += "&attribute=" + item.value;
}
});
@@ -393,13 +391,13 @@
clearListById('attributeIds');
for ( var i in json.attributes) {
jQuery('#searchObjectId').append(
- '<option value="' + json.attributes[i].id
- + '" displayed="' + json.attributes[i].displayed + '">'
+ '<option value="' + json.attributes[i].id + '" >'
+ json.attributes[i].name + '</option>');
if(json.attributes[i].displayed=='true'){
jQuery('#attributeIds').append(
- '<option value="' + json.attributes[i].id + '"></option>');
+ '<option value="' + json.attributes[i].id
+ + '" valueType="' + json.attributes[i].valueType + '"></option>');
}
}
=== 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-04-21 16:30:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/form.js 2014-04-24 16:30:48 +0000
@@ -203,6 +203,24 @@
else if(getFieldValue('program') != '') {
idx = 5;
}
+
+ // Yes/No and Yes Only attributes in result
+
+ var attList = new Array();
+ $('#attributeIds option').each(function(i, item) {
+ var valueType = $(item).attr('valueType');
+ var value = $(item).val();
+ if ( valueType == 'bool' || valueType == 'trueOnly' ) {
+ for (var i = idx; i < json.width; i++) {
+ if( value==json.headers[i].name ){
+ attList.push(i);
+ }
+ }
+ }
+ });
+
+ // TEI List
+
table += "<col width='30' />";
for (var i = idx; i < json.width; i++) {
table += "<col />";
@@ -228,6 +246,11 @@
if (j == 4) {
colVal = json.metaData.names[colVal];
}
+
+ if( jQuery.inArray( j, attList )>=0 && colVal!="" ){
+ colVal = (colVal=='true')? i18n_yes : i18n_no;
+ }
+
table += "<td onclick=\"javascript:isDashboard=true;showTrackedEntityInstanceDashboardForm( '"
+ uid
+ "' )\" title='"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2014-04-23 23:45:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2014-04-24 16:30:48 +0000
@@ -89,7 +89,7 @@
data : params,
dataType : "json",
success : function(json) {
- setInnerHTML('listEventDiv', displayevents(json, page));
+ setInnerHTML('listEventDiv', displayEvents(json, page));
showById('listEventDiv');
jQuery('#loaderDiv').hide();
setTableStyles();
@@ -97,7 +97,7 @@
});
}
-function displayevents(json, page) {
+function displayEvents(json, page) {
var table = "";
// Header
@@ -108,7 +108,7 @@
table += "<p>" + i18n_no_result_found + "</p>";
}
- // TEI list
+
table += "<table class='listTable' width='100%'>";
var idx = 4;
@@ -118,6 +118,24 @@
else if(getFieldValue('program') != '') {
idx = 5;
}
+
+ // Yes/No and Yes Only attributes in result
+
+ var attList = new Array();
+ $('#attributeIds option').each(function(i, item) {
+ var valueType = $(item).attr('valueType');
+ var value = $(item).val();
+ if ( valueType == 'bool' || valueType == 'trueOnly' ) {
+ for (var i = idx; i < json.width; i++) {
+ if( value==json.headers[i].name ){
+ attList.push(i);
+ }
+ }
+ }
+ });
+
+ // TEI list
+
table += "<col width='30' />";
for (var i = idx; i < json.width; i++) {
table += "<col />";
@@ -143,6 +161,11 @@
if (j == 4) {
colVal = json.metaData.names[colVal];
}
+
+ if( jQuery.inArray( j, attList )>=0 && colVal!="" ){
+ colVal = (colVal=='true')? i18n_yes : i18n_no;
+ }
+
table += "<td onclick=\"javascript:isDashboard=true;showTrackedEntityInstanceDashboardForm( '"
+ uid
+ "' )\" title='"
@@ -328,7 +351,7 @@
type : "GET",
data : params,
success : function(json) {
- setInnerHTML('listEventDiv', displayevents(json, page));
+ setInnerHTML('listEventDiv', displayEvents(json, page));
showById('listEventDiv');
jQuery('#loaderDiv').hide();
setTableStyles();
=== 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-04-21 13:51:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js 2014-04-24 16:30:48 +0000
@@ -254,6 +254,9 @@
function displayTEIList(json, page) {
+
+
+
// Header
var title = "";
@@ -284,6 +287,24 @@
else if(getFieldValue('program') != '') {
idx = 5;
}
+
+ // Yes/No and Yes Only attributes in result
+
+ var attList = new Array();
+ $('#attributeIds option').each(function(i, item) {
+ var valueType = $(item).attr('valueType');
+ var value = $(item).val();
+ if ( valueType == 'bool' || valueType == 'trueOnly' ) {
+ for (var i = idx; i < json.width; i++) {
+ if( value==json.headers[i].name ){
+ attList.push(i);
+ }
+ }
+ }
+ });
+
+ // TEI List
+
table += "<col width='30' />";
for (var i = idx; i < json.width; i++) {
table += "<col />";
@@ -309,6 +330,10 @@
if (j == 4) {
colVal = json.metaData.names[colVal];
}
+ if( jQuery.inArray( j, attList )>=0 && colVal!="" ){
+ colVal = (colVal=='true')? i18n_yes : i18n_no;
+ }
+
table += "<td onclick=\"javascript:isDashboard=true;showTrackedEntityInstanceDashboardForm( '"
+ uid
+ "' )\" title='"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm 2014-04-12 12:12:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm 2014-04-24 16:30:48 +0000
@@ -21,6 +21,7 @@
{
"id": "${attribute.uid}",
"name": "$!encoder.jsonEncode( ${attribute.displayName} )",
+ "valueType": "$!attribute.valueType",
"displayed": "true"
}#if( $idx < $size ),#end
#set( $idx = $idx + 1 )
@@ -32,6 +33,7 @@
{
"id": "${attribute.uid}",
"name": "$!encoder.jsonEncode( ${attribute.displayName} )",
+ "valueType": "$!attribute.valueType",
"displayed": "true"
}#if( $idx < $size ),#end
#set( $idx = $idx + 1 )
@@ -43,6 +45,7 @@
{
"id": "${programAttribute.attribute.uid}",
"name": "$!encoder.jsonEncode( ${programAttribute.attribute.displayName} )",
+ "valueType": "$!programAttribute.attribute.valueType",
"displayed": "$programAttribute.displayInList"
}#if( $idx < $size ),#end
#set( $idx = $idx + 1 )
@@ -55,6 +58,7 @@
{
"id": "${programAttribute.attribute.uid}",
"name": "$!encoder.jsonEncode( ${programAttribute.attribute.displayName} )",
+ "valueType": "$!programAttribute.attribute.valueType",
"displayed": "$programAttribute.displayInList"
}#if( $idx < $size ),#end
#set( $idx = $idx + 1 )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2014-04-22 00:17:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2014-04-24 16:30:48 +0000
@@ -180,7 +180,9 @@
var i18n_data_values = '$encoder.jsEscape( $i18n.getString( "data_values" ) , "'")';
var i18n_complete_program_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_program_confirm_message" ) , "'")';
var i18n_events = '$encoder.jsEscape( $i18n.getString( "events" ) , "'")';
-
+ var i18n_next = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
+ var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
+
var registration = false;
// eventList - 0 : Not events
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm 2014-04-23 23:45:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm 2014-04-24 16:30:48 +0000
@@ -2,7 +2,13 @@
<input type='hidden' id='orgunitId' name='orgunitId' value='$organisationUnit.uid' >
<input type="hidden" id='hideLink' name='hideLink' value='false'>
<input type='hidden' id='isSearchByProgram' name='isSearchByProgram' value='false' >
- <select id='attributeIds' name='attributeIds' class='hidden'></select>
+<select id='attributeIds' name='attributeIds' class='hidden'>
+ #if( $auth.hasAccess( "dhis-web-caseentry", "accessAttributes" ) )
+ #foreach( $attribute in $attributes )
+ <option value="$attribute.uid" valueType='$attribute.valueType'>$encoder.htmlEncode( $attribute.displayName )</option>
+ #end
+ #end
+</select>
<table style="margin-bottom:8px" id="commonSearchDiv" name="commonSearchDiv">
<tr>
@@ -113,7 +119,7 @@
<select class='search-field' id="searchObjectId" name="searchObjectId" #if( $attributes.size() == 0 ) disabled="disabled" #end onchange="searchObjectOnChange(this)">
#if( $auth.hasAccess( "dhis-web-caseentry", "accessAttributes" ) )
#foreach( $attribute in $attributes )
- <option value="$attribute.uid" valueType='$attribute.valueType'>$encoder.htmlEncode( $attribute.displayName )</option>
+ <option value="$attribute.uid">$encoder.htmlEncode( $attribute.displayName )</option>
#end
#end
</select>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectTrackedEntityInstance.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectTrackedEntityInstance.vm 2014-04-22 00:05:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectTrackedEntityInstance.vm 2014-04-24 16:30:48 +0000
@@ -132,7 +132,9 @@
var i18n_next = '$encoder.jsEscape( $i18n.getString( "next" ) , "'")';
var i18n_last = '$encoder.jsEscape( $i18n.getString( "last" ) , "'")';
var i18n_complete_program_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_program_confirm_message" ) , "'")';
-
+ var i18n_next = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
+ var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
+
var canChangeLocation = $auth.hasAccess( "dhis-web-caseentry", "getTrackedEntityInstanceLocation" );
// -1: no search anything
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2014-04-21 16:30:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2014-04-24 16:30:48 +0000
@@ -159,6 +159,8 @@
var i18n_complete_program_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_program_confirm_message" ) , "'")';
var i18n_for = '$encoder.jsEscape( $i18n.getString( "for" ) , "'")';
var i18n_data_entry = '$encoder.jsEscape( $i18n.getString( "data_entry" ) , "'")';
+ var i18n_next = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
+ var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
datePickerValid( 'executionDateNewEvent', true );