dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21132
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9921: Fix bug: Don't create expression for calculated patient attribute.
------------------------------------------------------------
revno: 9921
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-02-28 14:12:57 +0700
message:
Fix bug: Don't create expression for calculated patient attribute.
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.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/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-02-28 06:45:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-02-28 07:12:57 +0000
@@ -143,7 +143,7 @@
#foreach($attribute in $attributes )
#set($value = "")
#set($value = $patientAttributeValueMap.get($attribute.id))
- #if( $attribute.valueType != 'CALCULATED')
+ #if( $attribute.valueType != 'calculated')
<tr>
<td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory)<em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
<td class="input-column">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2013-02-20 13:46:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2013-02-28 07:12:57 +0000
@@ -41,12 +41,12 @@
<td><label for="valueType">$i18n.getString( "value_type" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
<select id="valueType" name="valueType" onchange="ATTRIBUTE_OPTION.selectValueType(this);">
- <option value="NUMBER" selected="selected">$i18n.getString( "number" )</option>
- <option value="TEXT">$i18n.getString( "text" )</option>
- <option value="YES/NO">$i18n.getString( "yes_no" )</option>
- <option value="DATE">$i18n.getString( "date" )</option>
- <option value="COMBO">$i18n.getString( "attribute_combo_type" )</option>
- <option value="CALCULATED">$i18n.getString( "calculated" )</option>
+ <option value="number" selected="selected">$i18n.getString( "number" )</option>
+ <option value="string">$i18n.getString( "text" )</option>
+ <option value="bool">$i18n.getString( "yes_no" )</option>
+ <option value="date">$i18n.getString( "date" )</option>
+ <option value="combo">$i18n.getString( "attribute_combo_type" )</option>
+ <option value="calculated">$i18n.getString( "calculated" )</option>
</select>
</td>
<td></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2012-10-30 03:46:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2013-02-28 07:12:57 +0000
@@ -51,7 +51,7 @@
<td><label for="type">$i18n.getString( "type" )</label></td>
<td>
<select style="width: 336px;" id="type" name="type" class="{validate:{required:true}}">
- <option value="text" selected="selected">$i18n.getString( "text" )</option>
+ <option value="string" selected="selected">$i18n.getString( "text" )</option>
<option value="number">$i18n.getString( "number" )</option>
<option value="letter">$i18n.getString( "letter_only" )</option>
</select>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2013-02-20 13:46:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2013-02-28 07:12:57 +0000
@@ -44,7 +44,7 @@
ATTRIBUTE_OPTION.addOption();
}
}
- else if (jQuery(this_).val() == "CALCULATED"){
+ else if (jQuery(this_).val() == "calculated"){
if( jQuery("#availableAttribute option").length == 0 )
{
jQuery.getJSON( 'getCalPatientAttributeParams.action', { },
@@ -84,7 +84,7 @@
},
checkOnSubmit : function ()
{
- if( jQuery("#valueType").val() != "COMBO" )
+ if( jQuery("#valueType").val() != "combo" )
{
jQuery("#attrOptionContainer").children().remove();
return true;
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm 2012-07-30 04:48:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/showAddCaseAggregationForm.vm 1970-01-01 00:00:00 +0000
@@ -1,94 +0,0 @@
-<script>
- var i18n_remove_option = '$encoder.jsEscape( $i18n.getString( "remove_option" ) , "'") ';
- var i18n_field_is_required = '$encoder.jsEscape( $i18n.getString( "field_is_required" ) , "'") ';
- var isSubmit = true;
- jQuery(document).ready( function(){
-
- validation( 'addPatientAttributeForm', function(form){
- if( isSubmit && ATTRIBUTE_OPTION.checkOnSubmit() ) {
- form.submit();
- }
- }, function(){
- isSubmit = true;
- jQuery.each($('#addPatientAttributeForm').serializeArray(), function(i, field) {
- if( field.value == ""){
- setInnerHTML("attrMessage", i18n_field_is_required);
- isSubmit = false;
- }
- });
- });
-
-
- jQuery("#attributeComboRow").hide();
-
- checkValueIsExist( "name", "validatePatientAttribute.action");
- });
-</script>
-
-
-<h3>$i18n.getString( "create_new_patient_attribute" )</h3>
-<form id="addPatientAttributeForm" action="addPatientAttribute.action" method="post" >
-
-<table id="attrTable">
- <thead>
- <tr>
- <th colspan="2">$i18n.getString( "patient_attribute_details" )</th>
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td width="20em"><label>$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name" style="width:30em" class="{validate:{required:true,rangelength:[2,160]}}"></td>
- <td></td>
- </tr>
-
- <tr>
- <td width="20em" ><label>$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="description" name="description" style="width:30em" class="{validate:{required:true,minlength:2}}"></td>
- <td></td>
- </tr>
-
- <tr>
- <td width="20em"><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td>
- <select id="mandatory" name="mandatory" style="min-width:30.5em">
- <option value="true" >$i18n.getString( "yes" )</option>
- <option value="false" selected="selected">$i18n.getString( "no" )</option>
- </select>
- </td>
- <td></td>
- </tr>
-
- <tr>
- <td width="20em"><label for="valueType">$i18n.getString( "value_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td>
- <select id="valueType" name="valueType" style="min-width:30.5em" onchange="ATTRIBUTE_OPTION.selectValueType(this);">
- <option value="NUMBER" selected="selected">$i18n.getString( "number" )</option>
- <option value="TEXT">$i18n.getString( "text" )</option>
- <option value="YES/NO">$i18n.getString( "yes_no" )</option>
- <option value="DATE">$i18n.getString( "date" )</option>
- <option value="COMBO">$i18n.getString( "attribute_combo_type" )</option>
- </select>
- </td>
- <td></td>
- </tr>
- <tr>
- <td width="20em"><label for="groupBy">$i18n.getString( "groupBy" )</td>
- <td><input type="checkbox" name="groupBy" value="true"></td>
- </tr>
- <tr id="attributeComboRow">
- <td width="20em"><label>$i18n.getString( "attribute_options" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td ><table id="attrOptionContainer"></table><a href="#" style="text-decoration: none;margin-top: 0.5em" onclick="ATTRIBUTE_OPTION.addOption()">[ $i18n.getString( "add_more_option" ) ]</a>
- </td>
- <td><span id="attrMessage" name="attrMessage" style="color:red;"></span></td>
- </tr>
- </tbody>
-</table>
-
-<p>
- <input type="submit" value="$i18n.getString( "add" )" style="width:10em">
- <input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='patientAttribute.action'" style="width:10em">
-</p>
-
-</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2013-02-20 13:46:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2013-02-28 07:12:57 +0000
@@ -44,12 +44,12 @@
<td>$i18n.getString( "value_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></td>
<td>
<select id="valueType" name="valueType" onchange="ATTRIBUTE_OPTION.selectValueType(this);">
- <option value="NUMBER" #if( $patientAttribute.valueType == 'NUMBER' ) selected="selected" #end>$i18n.getString( "number" )</option>
- <option value="TEXT" #if( $patientAttribute.valueType == 'TEXT' ) selected="selected" #end>$i18n.getString( "text" )</option>
- <option value="YES/NO" #if( $patientAttribute.valueType == 'YES/NO' ) selected="selected" #end>$i18n.getString( "yes_no" )</option>
- <option value="DATE" #if( $patientAttribute.valueType == 'DATE' ) selected="selected" #end>$i18n.getString( "date" )</option>
- <option value="COMBO" #if( $patientAttribute.valueType == 'COMBO' ) selected="selected" #end>$i18n.getString( "attribute_combo_type" )</option>
- <option value="CALCULATED" #if( $patientAttribute.valueType == 'CALCULATED' ) selected="selected" #end>$i18n.getString( "calculated" )</option>
+ <option value="number" #if( $patientAttribute.valueType == 'number' ) selected="selected" #end>$i18n.getString( "number" )</option>
+ <option value="string" #if( $patientAttribute.valueType == 'string' ) selected="selected" #end>$i18n.getString( "text" )</option>
+ <option value="bool" #if( $patientAttribute.valueType == 'bool' ) selected="selected" #end>$i18n.getString( "yes_no" )</option>
+ <option value="date" #if( $patientAttribute.valueType == 'date' ) selected="selected" #end>$i18n.getString( "date" )</option>
+ <option value="combo" #if( $patientAttribute.valueType == 'combo' ) selected="selected" #end>$i18n.getString( "attribute_combo_type" )</option>
+ <option value="calculated" #if( $patientAttribute.valueType == 'calculated' ) selected="selected" #end>$i18n.getString( "calculated" )</option>
</select>
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2012-10-30 03:46:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2013-02-28 07:12:57 +0000
@@ -52,7 +52,7 @@
<td><label for="type">$i18n.getString( "type" )</label></td>
<td>
<select style="width: 336px;" id="type" name="type" class="{validate:{required:true}}">
- <option value="text" #if( $patientIdentifierType.type=='text' ) selected="selected" #end>$i18n.getString( "text" )</option>
+ <option value="string" #if( $patientIdentifierType.type=='string' ) selected="selected" #end>$i18n.getString( "text" )</option>
<option value="number" #if( $patientIdentifierType.type=='number' ) selected="selected" #end>$i18n.getString( "number" )</option>
<option value="letter" #if( $patientIdentifierType.type=='letter' ) selected="selected" #end>$i18n.getString( "letter_only" )</option>
</select>