dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17681
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7128: [mobile] display yes/no values as dropdown list
------------------------------------------------------------
revno: 7128
committer: Long <thanhlongngo1988@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-06-01 13:34:08 +0700
message:
[mobile] display yes/no values as dropdown list
modified:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java
dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.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-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java 2012-05-31 09:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveProgramStageFormAction.java 2012-06-01 06:34:08 +0000
@@ -160,17 +160,17 @@
this.programStageInstanceId = programStageInstanceId;
}
- // private Integer programInstanceId;
- //
- // public Integer getProgramInstanceId()
- // {
- // return programInstanceId;
- // }
- //
- // public void setProgramInstanceId( Integer programInstanceId )
- // {
- // this.programInstanceId = programInstanceId;
- // }
+ private Integer programInstanceId;
+
+ public Integer getProgramInstanceId()
+ {
+ return programInstanceId;
+ }
+
+ public void setProgramInstanceId( Integer programInstanceId )
+ {
+ this.programInstanceId = programInstanceId;
+ }
private Integer patientId;
@@ -329,10 +329,11 @@
return ERROR;
}
-// if ( programStageService.getProgramStage( programStageId ).getIrregular() )
-// {
-// return REGISTER_NEXT_DUEDATE;
-// }
+ // if ( programStageService.getProgramStage( programStageId
+ // ).getIrregular() )
+ // {
+ // return REGISTER_NEXT_DUEDATE;
+ // }
if ( orgUnitId != 0 )
{
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-05-31 09:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-06-01 06:34:08 +0000
@@ -82,4 +82,5 @@
tracking_menu=Tracking Menu
due_date=Due Date
register_due_date_for=Register Due Date For
-register=Register
\ No newline at end of file
+register=Register
+please_select=Please Select
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.vm 2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/completedProgramStageForm.vm 2012-06-01 06:34:08 +0000
@@ -41,15 +41,23 @@
<br /><span style="color: #990000;">$prevDataValues.get($key) $i18n.getString($typeViolation)</span>
#end
- <input type=
- #if($dataElement.type=="string")
- "text"
- #elseif ($dataElement.type=="int" )
- "text"
- #else
- "$dataElement.type"
- #end
- name="$key" value="$!prevDataValues.get($key)" DISABLED/>
+ #if($dataElement.type=="bool")
+ <select name="$key" DISABLED>
+ <option value="">$i18n.getString("please_select")</option>
+ <option #if( $prevDataValues.get( $key ) == "true" ) selected="selected" #end value="true">$i18n.getString("yes")</option>
+ <option #if( $prevDataValues.get( $key ) == "false" ) selected="selected" #end value="false">$i18n.getString("no")</option>
+ </select>
+ #else
+ <input type=
+ #if($dataElement.type=="string")
+ "text"
+ #elseif ($dataElement.type=="int" )
+ "text"
+ #else
+ "$dataElement.type"
+ #end
+ name="$key" value="$!prevDataValues.get($key)" DISABLED/>
+ #end
#elseif ($dataElement.getOptionSet())
@@ -71,7 +79,7 @@
#else
"$dataElement.type"
#end
- name="$key" DISABLED/>
+ name="$key" DISABLED>
#set( $selected=false )
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm 2012-05-24 14:51:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/programStageForm.vm 2012-06-01 06:34:08 +0000
@@ -42,16 +42,24 @@
<br /><span style="color: #990000;">$prevDataValues.get($key) $i18n.getString($typeViolation)</span>
#end
- <input type=
- #if($dataElement.type=="string")
- "text"
- #elseif ($dataElement.type=="int" )
- "text"
- #else
- "$dataElement.type"
- #end
- name="$key" value="$!prevDataValues.get($key)" />
-
+ #if($dataElement.type=="bool")
+ <select name="$key">
+ <option value="">$i18n.getString("please_select")</option>
+ <option #if( $prevDataValues.get( $key ) == "true" ) selected="selected" #end value="true">$i18n.getString("yes")</option>
+ <option #if( $prevDataValues.get( $key ) == "false" ) selected="selected" #end value="false">$i18n.getString("no")</option>
+ </select>
+ #else
+ <input type=
+ #if($dataElement.type=="string")
+ "text"
+ #elseif ($dataElement.type=="int" )
+ "text"
+ #else
+ "$dataElement.type"
+ #end
+ name="$key" value="$!prevDataValues.get($key)" />
+ #end
+
#elseif ($dataElement.getOptionSet())
#set( $options = $dataElement.getOptionSet().getOptions() )