dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24696
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12149: Fix bug - Don't load option-value list of option set in entry form.
------------------------------------------------------------
revno: 12149
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-09-19 10:16:23 +0700
message:
Fix bug - Don't load option-value list of option set in entry form.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.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/programStageInstanceFlow.vm
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/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-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-09-09 13:38:36 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java 2013-09-19 03:16:23 +0000
@@ -674,7 +674,7 @@
}
else
{
- inputHTML += " class=\"optionset\" data-optionset=\"" + dataElement.getOptionSet().getUid() + "\" ";
+ inputHTML += " class=\"optionset\" optionset=\"" + dataElement.getOptionSet().getUid() + "\" data-optionset=\"" + dataElement.getOptionSet().getUid() + "\" ";
}
if ( DataElement.VALUE_TYPE_LONG_TEXT.equals( dataElement.getDetailedTextType() ) )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2013-09-18 02:45:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2013-09-19 03:16:23 +0000
@@ -70,13 +70,11 @@
#end
</script>
#elseif($hasOptionSet=='true')
- #if( $programStageDataElement.dataElement.optionSet.options.size() <= 7 && $program.dataEntryMethod =='false' )
- <input id='$id' name="entryfield" data-optionset="$!programStageDataElement.dataElement.optionSet.uid" options='$hasOptionSet' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />
- #elseif( $programStageDataElement.dataElement.optionSet.options.size() <= 7 && $program.dataEntryMethod =='true' )
+ #if( $programStageDataElement.dataElement.optionSet.options.size() <= 7 && $program.dataEntryMethod =='true' )
<table style='width:100%'>
<tr>
<td>
- <input id='$id' name="$id" options='no' type='radio'
+ <input id='$id' name="$id" options='no' type='radio' optionset='$programStageDataElement.dataElement.optionSet.uid'
data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }"
#if( $patientDataValue.value == $option) checked #end
onclick="saveRadio( '$programStageDataElement.dataElement.uid', '$option' )" tabindex="$tabIndex" />$i18n.getString("non_value")
@@ -88,8 +86,8 @@
#set($index=0)
#end
<td>
- <input id='$id' name="$id" type='radio' options='no'
- data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }"
+ <input id='$id' name="$id" type='radio' options='no' optionset='$programStageDataElement.dataElement.optionSet.uid'
+ data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }"
#if( $patientDataValue.value == $option) checked #end
onclick="saveRadio( '$programStageDataElement.dataElement.uid', '$option' )" tabindex="$tabIndex" />$encoder.htmlEncode($option)
</td>
@@ -98,7 +96,7 @@
</tr>
</table>
#else
- <input id='$id' name="entryfield" options='$hasOptionSet' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />
+ <input optionset='$programStageDataElement.dataElement.optionSet.uid' id='$id' name="entryfield" options='$hasOptionSet' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="auto-field optionset" />
#end
#elseif($programStageDataElement.dataElement.type=='username')
<input name="entryfield" username='true' class="auto-field optionset" data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" />
=== 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-09-12 05:49:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-09-19 03:16:23 +0000
@@ -1011,7 +1011,7 @@
delay: 0,
minLength: 0,
source: function( request, response ){
- searchOptionSet( input.data('optionset'), input.val(), response );
+ searchOptionSet( input.attr('optionset'), input.val(), response );
},
minLength: 0,
select: function( event, ui ) {
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2013-09-12 05:49:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2013-09-19 03:16:23 +0000
@@ -7,36 +7,6 @@
<div id='flow_$!programInstance.id' class="stage-flow">
<table class="table-flow">
<tr id='programStageIdTR_$!programInstance.id'>
- #foreach( $programStageInstance in $linkProgramStageInstances )
- <td id='arrow_$programStageInstance.id' style='font-size:25px;'>→</td>
- <td>
- #set($valueDate=$format.formatDate( $programStageInstance.dueDate ))
- #if($!programStageInstance.executionDate)
- #set($valueDate=$format.formatDate( $programStageInstance.executionDate ))
- #end
- <div class="orgunit-object" id="org_$!programStageInstance.id"> $!programStageInstance.organisationUnit.name</div>
- <input type="button" name="programStageBtn"
- id="ps_$!programStageInstance.id"
- pi="$programInstance.id"
- psid="$programStageInstance.programStage.id"
- psuid="$programStageInstance.programStage.uid"
- psname="$programStageInstance.programStage.displayName"
- status="$programStageInstance.getEventStatus()"
- programType='$programInstance.program.type'
- reportDate="$!format.formatDate( $!programStageInstance.executionDate )"
- reportDateDes="$programStageInstance.programStage.reportDateDescription"
- dueDate="$format.formatDate( $programStageInstance.dueDate )"
- class="stage-object"
- value="$programStageInstance.programStage.displayName $valueDate"
- linkedEvent='true'
- onclick="javascript:loadDataEntry( $programStageInstance.id );">
- <script>
- var status = $programStageInstance.getEventStatus();
- setEventColorStatus( $programStageInstance.id ,status);
- </script>
- </td>
- #end
-
#if( $programStageInstances)
#else
#set( $programStageInstances = $programInstance.programStageInstances)
=== 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-17 06:08:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2013-09-19 03:16:23 +0000
@@ -474,4 +474,6 @@
remind_creating_next_event_on_this_event_completed = Remind creating next event on this event completed
data_entry_method = Data entry method
local_identifier = Local Identifier
-scope = Scope
\ No newline at end of file
+scope = Scope
+drop_down_lists = drop-down lists
+radio_buttons = radio buttons
\ 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-17 09:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-09-19 03:16:23 +0000
@@ -130,7 +130,10 @@
<tr>
<td><label>$i18n.getString( "data_entry_method" ) </label></td>
<td>
- <input type='checkbox' id='dataEntryMethod' name='dataEntryMethod' value='true' >
+ <select id='dataEntryMethod' name='dataEntryMethod' >
+ <option value='false' selected>$i18n.getString('drop_down_lists')</option>
+ <option value='true'>$i18n.getString('radio_buttons')</option>
+ </select>
</td>
<td></td>
</tr>
=== 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-17 09:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-09-19 03:16:23 +0000
@@ -129,7 +129,10 @@
<tr>
<td><label>$i18n.getString( "data_entry_method" ) </label></td>
<td>
- <input type='checkbox' id='dataEntryMethod' name='dataEntryMethod' value='true' #if( $program.dataEntryMethod=='true' ) checked #end >
+ <select id='dataEntryMethod' name='dataEntryMethod' >
+ <option value='false' #if( $program.dataEntryMethod=='false' ) selected #end>$i18n.getString('drop_down_lists')</option>
+ <option value='true' #if( $program.dataEntryMethod=='true' ) selected #end>$i18n.getString('radio_buttons')</option>
+ </select>
</td>
<td></td>
</tr>