dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15617
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5703: (patient) Hide enrollment-date and incident-date when no selected program in Enrollment form.
------------------------------------------------------------
revno: 5703
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-01-11 15:47:32 +0700
message:
(patient) Hide enrollment-date and incident-date when no selected program in Enrollment form.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.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/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-01-11 07:19:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-01-11 08:47:32 +0000
@@ -479,6 +479,7 @@
setInnerHTML('dateOfIncidentDescription', '');
hideById('programEnrollmentDiv');
+ hideEnrolmentField();
return;
}
@@ -491,6 +492,7 @@
}, function()
{
showById('programEnrollmentDiv');
+ showEnrolmentField();
var singleEvent = jQuery('#programId option:selected').attr('singleevent');
if(singleEvent=='true')
@@ -895,3 +897,17 @@
height: 300
});
}
+
+function hideEnrolmentField()
+{
+ hideById('enrollmentDateTR');
+ hideById('dateOfIncidentTR');
+ hideById('enrollBtn');
+}
+
+function showEnrolmentField()
+{
+ showById('enrollmentDateTR');
+ showById('dateOfIncidentTR');
+ showById('enrollBtn');
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-01-11 07:19:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-01-11 08:47:32 +0000
@@ -55,11 +55,11 @@
<td></td>
</td></td>
</tr>
- <tr>
+ <tr id='enrollmentDateTR' style='display:none;'>
<td><label for="enrollmentDate"><span id='enrollmentDateDescription'></span><em title="$i18n.getString( "required" )" class="required"> * </em></label></td>
<td colspan='2' align='left'><input type="text" id="enrollmentDate" name="enrollmentDate" style='width:30em' disabled="disabled" class="{validate:{required:true}}"></td>
</tr>
- <tr>
+ <tr id='dateOfIncidentTR' style='display:none;'>
<td><label for="dateOfIncident"><span id='dateOfIncidentDescription'></span><em title="$i18n.getString( "required" )" class="required"> * </em></label></td>
<td colspan='2'><input type="text" id="dateOfIncident" name="dateOfIncident" style='width:30em' disabled="disabled" class="{validate:{required:true}}"></td>
</tr>
@@ -72,7 +72,7 @@
<tr>
<td style="width:180px"></td>
<td colspan='2'>
- <input type="submit" id='enrollBtn' name='enrollBtn' value="$i18n.getString( 'enroll_to_program' )" style='width:10em' disabled='disabled'/>
+ <input type="submit" id='enrollBtn' name='enrollBtn' value="$i18n.getString( 'enroll_to_program' )" style='width:12em; display:none;' disabled='disabled'/>
</td>
</tr>
<tr>