dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14227
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4754: Automatically display default form if no
------------------------------------------------------------
revno: 4754
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-09-29 12:30:18 +0700
message:
Automatically display default form if no
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.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/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2011-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2011-09-29 05:30:18 +0000
@@ -23,23 +23,19 @@
<input type='hidden' name='programStageInstanceId' id='programStageInstanceId' value='$!programStageInstance.id'>
<hr style="clear:both">
-<span id="startMsg" style="font-style:italic; color:blue; display: #if($programStageInstance.executionDate) none #else block #end">$i18n.getString( "report_date_warning" )</span>
+<span id="startMsg" style="font-style:italic; color:blue; display: #if($!programStageInstance.executionDate!='') none #else block #end;">$i18n.getString( "report_date_warning" )</span>
-<div id='entryForm' style="display: #if($programStageInstance.executionDate) block #else none #end;">
- #if( !$useDefaultForm)
+<div id='entryForm' style="display: #if($!programStageInstance.executionDate) block #else none #end;">
+ #if( !$useDefaultForm && $customDataEntryFormCode )
<div id="customEntryScreenContainer">
- #if( $customDataEntryFormCode )
- <div id="dragDiv">
- <table id="listInfo">
- <tr><td style="text-align:left"><strong>$i18n.getString("org_unit_name") :</strong></td> <td id="orgUnitNameField" style="text-align:right"></td></tr>
- <tr><td style="text-align:left"><strong>$i18n.getString("program_stage_name") :</strong></td> <td id="programStageName" style="text-align:right">$programStageInstance.programStage.name</td></tr>
- <tr><td style="text-align:left"><strong>$i18n.getString("datae_element_name") :</strong></td> <td id="dataelementName" style="text-align:right"></td></tr>
- </table>
- </div>
- $customDataEntryFormCode
- #else
- <span style="font-style:italic; color:blue"> $i18n.getString( "no_custom_data_entry_exist" )</span>
- #end
+ <div id="dragDiv">
+ <table id="listInfo">
+ <tr><td style="text-align:left"><strong>$i18n.getString("org_unit_name") :</strong></td> <td id="orgUnitNameField" style="text-align:right"></td></tr>
+ <tr><td style="text-align:left"><strong>$i18n.getString("program_stage_name") :</strong></td> <td id="programStageName" style="text-align:right">$programStageInstance.programStage.name</td></tr>
+ <tr><td style="text-align:left"><strong>$i18n.getString("datae_element_name") :</strong></td> <td id="dataelementName" style="text-align:right"></td></tr>
+ </table>
+ </div>
+ $customDataEntryFormCode
<script type="text/javascript">
initCustomCheckboxes();
@@ -138,4 +134,12 @@
#end
</div>
-</div>
\ No newline at end of file
+</div>
+
+<script>
+ #if (!$useDefaultForm && $!customDataEntryFormCode )
+ showById('useDefaultTD');
+ #else
+ hideById('useDefaultTD');
+ #end
+</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2011-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm 2011-09-29 05:30:18 +0000
@@ -59,7 +59,7 @@
<td></td>
<td></td>
<td></td>
- <td>
+ <td id='useDefaultTD'>
<input type="radio" id="useDefaultForm" name="useDefaultForm" value="true" onclick="loadDataEntry();" /><label>$i18n.getString( "use_default_form" )</label><br>
<input type="radio" id="useDefaultForm" name="useDefaultForm" value="false" onclick="loadDataEntry();" checked /><label>$i18n.getString( "use_custom_form" )</label>
</td>