← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15408: Fixed bug - Don't display values of Date attribute in the Enrollment program form.

 

------------------------------------------------------------
revno: 15408
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-05-26 19:48:26 +0800
message:
  Fixed bug - Don't display values of Date attribute in the Enrollment program form.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/attributeFormDiv.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm
  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/attributeFormDiv.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/attributeFormDiv.vm	2014-05-22 14:02:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/attributeFormDiv.vm	2014-05-26 11:48:26 +0000
@@ -22,9 +22,10 @@
 			#elseif( $attribute.valueType == "trueOnly" )
 				<input type='checkbox' value="true" id="attr$attribute.id" name="attr$attribute.id" #if($value=='true') checked #end> 
 			#elseif( $attribute.valueType == "date" )
-				<input type="text" id="attr$attribute.id" name="attr$attribute.id" value='$!format.formatDate($value)' objectId='$attribute.id' objectType='attr' class=' #validate( "default"  $mandatory )' >
+				<input type="text" id="attr$attribute.id" style='width:240px;' name="attr$attribute.id" value='$value' objectId='$attribute.id' objectType='attr' class=' #validate( "default"  $mandatory )' >
 				<script type="text/javascript">
-					datePickerValid( 'attr$attribute.id', false );
+					var attrId = 'attr' + '$attribute.id';
+					datePickerValid( 'programEnrollmentSelectDiv [id=' + attrId + ']', false, false );
 				</script>                 
 			#elseif( $attribute.valueType == "optionSet" )
 				<select  id="attr$attribute.id" name="attr$attribute.id" class=' #validate( "default"  $mandatory )' >

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2014-05-22 02:24:43 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2014-05-26 11:48:26 +0000
@@ -1,5 +1,6 @@
 #set($noGroup = $attributeGroups.size() )
 #if( $programInstance || $hasDataEntry=='true' )
+
 <input type='hidden' id='programInstanceId' name='programInstanceId' value='$programInstance.id' />
 <input type='hidden' id='programInstanceUid' name='programInstanceUid' value='$programInstance.uid' />
 <input type='hidden' id='programStageInstanceId' name='programStageInstanceId' value='0'>

=== 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	2014-05-22 08:35:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm	2014-05-26 11:48:26 +0000
@@ -20,7 +20,7 @@
 	<table>
 		<tr>
 			<td class='text-column'><label for="programId">$i18n.getString( "program" )</label></td>
-			<td class='input-column'>
+			<td class='input-column' align='right'>
 				<select id="programId" name="programId" onchange='programOnchange(this.value);'>
 					#if($programs.size()==0)
 					<option value="">[$i18n.getString( "none_program" )]</option>
@@ -43,14 +43,14 @@
 		
 		<tr id='enrollmentDateTR' class='hidden'>
 			<td class='text-column'><label for="enrollmentDate"><span id='enrollmentDateDescription'></span><em title="$i18n.getString( "required" )" class="required"> * </em></label></td>
-			<td colspan='2' class='input-column'>
-				<input type="text" id="enrollmentDateField" name="enrollmentDateField" class="{validate:{required:true}}" >
+			<td colspan='2' class='input-column'  align='right'>
+				<input type="text" id="enrollmentDateField" name="enrollmentDateField" style='width:265px' class="{validate:{required:true}}" >
 			</td>
 		</tr>
 		
-		<tr id='dateOfIncidentTR' class='hidden'>
+		<tr id='dateOfIncidentTR' class='hidden' align='right'>
 			<td class='text-column'><label for="dateOfIncident"><span id='dateOfIncidentDescription'></span><em title="$i18n.getString( "required" )" class="required"> * </em></label></td>
-			<td colspan='2' class='input-column'><input type="text" id="dateOfIncidentField" name="dateOfIncidentField" class="{validate:{required:true}}" ></td>
+			<td colspan='2' class='input-column'><input type="text" id="dateOfIncidentField" name="dateOfIncidentField" style='width:265px' class="{validate:{required:true}}" ></td>
 		</tr>
 	
 		<tr>