← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2327: Fix bug into State Format of IdentifierType into Patient module.

 

------------------------------------------------------------
revno: 2327
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-12-10 11:02:52 +0700
message:
  Fix bug into State Format of IdentifierType into Patient module.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/style/basic.css
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.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-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2010-12-09 08:20:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml	2010-12-10 04:02:52 +0000
@@ -411,7 +411,8 @@
 				,../dhis-web-commons/javascripts/date.js				
 				,javascript/patient.js
 				,javascript/commons.js				
-			</param>			
+			</param>	
+			<param name="stylesheets">style/basic.css</param>		
 			<param name="requiredAuthorities">F_PATIENT_ADD</param>
 		</action>
 
@@ -430,7 +431,7 @@
 				,javascript/patient.js
 				,javascript/commons.js						
 			</param>
-			<param name="stylesheets">javascript/jquery/thickbox/thickbox.css,javascript/jquery/cluetip/jquery.cluetip.css</param>
+			<param name="stylesheets">javascript/jquery/thickbox/thickbox.css,javascript/jquery/cluetip/jquery.cluetip.css,style/basic.css</param>
 			<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
 		</action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm	2010-11-09 09:07:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm	2010-12-10 04:02:52 +0000
@@ -168,16 +168,16 @@
 		<td><label>$identifierType.name #if($identifierType.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
 
         #if($identifierType.format == "State Format")
-            <td style="padding-left:1.1em"><input type="hidden" id="iden$identifierType.id" name="iden$identifierType.id"/>
+            <td><input type="hidden" id="iden$identifierType.id" name="iden$identifierType.id"/>
             #if($organisationUnit.code == "null")
                 #set($organisationUnit.code = "" );
             #end
 				<table>
-					<tr align="center" valign="top">
-						<td><input type="text" id="orgunitcode" name="orgunitcode" disabled="disabled" value="$organisationUnit.code" maxlength="9" size="10"/> <br/> <font color="red">OrgUnit<br>Code</font></td>
-						<td> - <input type="text" id="progcode" name="progcode" maxlength="1" size="1" class='idfield  #validate( "default"  $identifierType.mandatory ) '/> <br/> <font color="red">Prg<br>Code</font></td>
-						<td> - <input type="text" id="yearcode" name="yearcode" maxlength="2" size="2" value="$year" class="{validate:{required:true,minlength:2}}"/> <br/> <font color="red">Year</font></td>
-						<td> - <input type="text" id="benicode" name="benicode" maxlength="4" size="4" class="{validate:{required:true,minlength:4}}"/> <br/> <font color="red">Benificiary<br>Code</font></td>
+					<tr valign="top">
+						<td><input type="text" id="orgunitcode" name="orgunitcode" disabled="disabled" value="$organisationUnit.code" maxlength="9" size="10"/> <br/> <div class='stateformat'>$i18n.getString('registering_unit')<br>$i18n.getString('code')</div></td>
+						<td> - <input type="text" id="progcode" name="progcode" maxlength="1" size="6" class='idfield  #validate( "default"  $identifierType.mandatory ) ' /> <br/> <div class='stateformat'>$i18n.getString('program')<br>$i18n.getString('code')</div></td>
+						<td> - <input type="text" id="yearcode" name="yearcode" maxlength="2" size="6" value="$year" class="{validate:{required:true,minlength:2}}"/> <br/> <div class='stateformat'>$i18n.getString('year')</div></td>
+						<td> - <input type="text" id="benicode" name="benicode" maxlength="4" size="9" class="{validate:{required:true,number:true,minlength:4}}"/> <br/> <div class='stateformat'>$i18n.getString('patient')<br>$i18n.getString('code')</div></td>
 						
 					</tr>
 				</table>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm	2010-09-01 08:32:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm	2010-12-10 04:02:52 +0000
@@ -4,20 +4,20 @@
 <table>    
     <tr>
         <td><label>$i18n.getString( "registering_unit" )</label></td>
-        <td><input type="text" readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( "please_select_village" )]" #end style="min-width:350px"></td>
+        <td><input type="text" readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( "please_select_village" )]" #end style="min-width:22em"></td>
         <td>&nbsp;</td>
         <td><input type="button" value="$i18n.getString( "list_all_patients" )" onclick="window.location.href='listAllPatients.action'"></td>
     </tr>
-    <tr>
-        <td align="right"><label>$i18n.getString( "sort_by" )</label></td>
-	<td>
-	<select id="patientAttributeId" name="patientAttributeId" style="min-width:350px" onchange="javascript:selectPatientAttribute()" #if( $programs.size() == 0 ) disabled="disabled" #end>
-            <option value="0">[$i18n.getString( "select" )]</option>
-            #foreach( $patientAttribute in $patientAttributes )
-                <option value="$patientAttribute.id" #if( $sortPatientAttributeId && $patientAttribute.id == $sortPatientAttributeId ) selected="selected" #end>$encoder.htmlEncode( $patientAttribute.name )</option>
-            #end
-        </select>
-	</td>
+	<tr>
+		<td>$i18n.getString( "sort_by" )</td>
+        <td>
+		<select id="patientAttributeId" name="patientAttributeId" maxlength="30" style="width:22.2em" onchange="javascript:selectPatientAttribute()" #if( $programs.size() == 0 ) disabled="disabled" #end>
+				<option value="0">[$i18n.getString( "select" )]</option>
+				#foreach( $patientAttribute in $patientAttributes )
+					<option value="$patientAttribute.id" #if( $sortPatientAttributeId && $patientAttribute.id == $sortPatientAttributeId ) selected="selected" #end>$encoder.htmlEncode( $patientAttribute.name )</option>
+				#end
+			</select>
+		</td>
     </tr>
 </table>
 
@@ -28,7 +28,7 @@
 <table>	
 	<tr>	       
 		<td>
-		  <select id="searchingAttributeId" name="searchingAttributeId" style="min-width:300px"  #if( $patientAttributes.size() == 0 ) disabled="disabled" #end>
+		  <select id="searchingAttributeId" name="searchingAttributeId" style="min-width:20.2em"  #if( $patientAttributes.size() == 0 ) disabled="disabled" #end>
             <option value="">$i18n.getString( "search_by_name_identifier" )</option>
                 #foreach( $attribute in $patientAttributes )
                     <option value="$attribute.id" #if( $searchingAttributeId && $attribute.id == $searchingAttributeId ) selected="selected" #end>$encoder.htmlEncode( $attribute.name )</option>
@@ -42,11 +42,12 @@
 		<td><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientForm.action'"></td>
 		
 	</tr>
-	
-	<tr></tr>
-  	  	
 </table>
 
+<p></p>
+<p></p>
+<p></p>
+
 </form>
 
 <span id="message"></span>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/style/basic.css'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/style/basic.css	2010-01-29 03:08:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/style/basic.css	2010-12-10 04:02:52 +0000
@@ -5,4 +5,9 @@
 	z-index: 100000;
 	display: none;
 	position:absolute;
+}
+
+.stateformat {
+	color:red;
+	text-align:center;
 }
\ 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/updatePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm	2010-12-10 04:02:52 +0000
@@ -31,7 +31,7 @@
 	
 	<tr>
 		<td><label>$i18n.getString( "identifier_format" ) </label></td> 
-		<td><input type="checkbox" name="formater" id="formater" value="State Format" #if($!patientIdentifierType.format) checked="checked" #end >$i18n.getString('state_format')</td>
+		<td><input type="checkbox" name="formater" id="formater" value="State Format" #if(!$!patientIdentifierType.format.isEmpty()) checked="checked" #end >$i18n.getString('state_format')</td>
 		<td></td>
 	</tr>