dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07818
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2305: Fix bug: Save format property of patient Identifier Type is wrong.
------------------------------------------------------------
revno: 2305
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-10-04 18:11:25 +0700
message:
Fix bug: Save format property of patient Identifier Type is wrong.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java
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/addPatientIdentifierTypeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm
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/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java 2010-09-27 07:33:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java 2010-10-04 11:11:25 +0000
@@ -51,7 +51,7 @@
private String name;
- private String format;
+ private String formater;
private String description;
@@ -69,7 +69,7 @@
PatientIdentifierType patientIdentifierType = new PatientIdentifierType();
patientIdentifierType.setName( name );
patientIdentifierType.setDescription( description );
- patientIdentifierType.setFormat( format );
+ patientIdentifierType.setFormat( formater );
patientIdentifierType.setRelated( related.booleanValue() );
patientIdentifierType.setMandatory( mandatory.booleanValue() );
@@ -82,9 +82,9 @@
// Getters && Setters
// -------------------------------------------------------------------------
- public void setFormat( String format )
+ public void setFormater( String formater )
{
- this.format = format;
+ this.formater = formater;
}
public void setName( String name )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java 2010-09-27 07:33:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java 2010-10-04 11:11:25 +0000
@@ -55,7 +55,7 @@
private String description;
- private String format;
+ private String formater;
private Boolean mandatory;
@@ -75,7 +75,7 @@
identifierType.setName( name );
identifierType.setDescription( description );
- identifierType.setFormat( format );
+ identifierType.setFormat( formater );
identifierType.setMandatory( mandatory.booleanValue() );
identifierType.setRelated( related.booleanValue() );
patientIdentifierTypeService.updatePatientIdentifierType( identifierType );
@@ -108,9 +108,9 @@
this.id = id;
}
- public void setFormat( String format )
+ public void setFormater( String formater )
{
- this.format = format;
+ this.formater = formater;
}
public void setMandatory( Boolean mandatory )
=== 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-09-29 08:48:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2010-10-04 11:11:25 +0000
@@ -166,6 +166,7 @@
<tr><td> </td></tr>
<tr><th colspan="2" class="heading-column">$attributeGroup.name</th></tr>
#foreach($attribute in $attributeGroup.attributes )
+ #if($!attribute)
<tr>
<td><label>$attribute.name #if($attribute.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
<td class="input-column">
@@ -192,6 +193,7 @@
#end
</td>
</tr>
+ #end
#end
#end
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2010-09-27 09:48:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2010-10-04 11:11:25 +0000
@@ -32,7 +32,7 @@
<tr>
<td><label>$i18n.getString( "identifier_format" ) </label></td>
- <td><input type="text" id="format" name="format" style="width:30em" ></td>
+ <td><input type="text" id="formater" name="formater" style="width:30em" ></td>
<td></td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js 2010-10-04 10:59:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js 2010-10-04 11:11:25 +0000
@@ -193,35 +193,9 @@
// -----------------------------------------------------------------------------
// Remove patient
// -----------------------------------------------------------------------------
-
function removePatient( patientId, fullName )
{
- var result = window.confirm( i18n_confirm_delete + '\n\n' + fullName );
-
- if ( result )
- {
- var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( removePatientCompleted );
- window.location.href = 'removePatient.action?id=' + patientId;
- }
-}
-
-function removePatientCompleted( messageElement )
-{
- var type = messageElement.getAttribute( 'type' );
- var message = messageElement.firstChild.nodeValue;
-
- if ( type == 'success' )
- {
- window.location.href = 'patientform.action';
- }
- else if ( type = 'error' )
- {
- setInnerHTML( 'warningField', message );
-
- showWarning();
- }
+ removeItem( patientId, fullName, i18n_confirm_delete, 'removePatient.action' );
}
//-----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.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/listPatient.vm 2010-10-04 11:11:25 +0000
@@ -6,14 +6,10 @@
#set ($sText = "" )
#end
-
-
<style>
tr.relationship-row{background-color: #BFFFC2; display : none}
</style>
-
-
<table>
<tr>
<td>$i18n.getString( "search_result_matching_the_search_criteria" )</td>
@@ -83,11 +79,9 @@
</tr>
<tbody id="list">
- #set( $mark = false )
-
+
#foreach( $patient in $patients )
- ##set( $mark = !$mark)
- <tr #alternate( $mark )>
+ <tr id="tr${patient.id}">
<td>
#set( $nr = ( ( $pagingUtil.currentPage - 1 ) * $pagingUtil.pageSize ) + $velocityCount )
$nr
@@ -124,11 +118,7 @@
<td style="text-align:center"#alternate( $mark )>
<a href="showUpdatePatientForm.action?id=$patient.id" title="$i18n.getString( "edit_profile" )"><img src="../images/edit.png" alt="$i18n.getString( "edit_profile" )"></a>
</td>
- <!--
- <td style="text-align:center"#alternate( $mark )>
- <a href="showUpdatePatientAttributeValueForm.action?id=$patient.id" title="$i18n.getString( "edit_attribute_values" )"><img src="../images/attribute.png" alt="$i18n.getString( "edit_attribute_values" )"></a>
- </td>
- -->
+
<td style="text-align:center"#alternate( $mark )>
<a href="showRelationshipList.action?id=$patient.id" title="$i18n.getString( "manage_relationship" )"><img src="../images/relationship.png" alt="$i18n.getString( "manage_relationship" )"></a>
</td>
@@ -213,11 +203,6 @@
</td>
</tr>
#end
- #if( $mark )
- #set( $mark = false )
- #else
- #set( $mark = true )
- #end
#end
</tbody>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm 2010-09-26 11:49:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm 2010-10-04 11:11:25 +0000
@@ -63,7 +63,9 @@
</td>
<td><select multiple id="selectedAttributes" name="selectedAttributes" size="15" style="width:25em " ondblclick="moveSelectedById( 'selectedAttributes', 'availableAttributes' )">
#foreach($patientAttribute in $patientAttributeGroup.attributes)
- <option value='$patientAttribute.id'>$patientAttribute.name</option>
+ #if($!patientAttribute)
+ <option value='$patientAttribute.id'>$patientAttribute.name</option>
+ #end
#end
</select></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2010-09-28 09:30:46 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2010-10-04 11:11:25 +0000
@@ -124,35 +124,37 @@
#foreach ($attributeGroup in $attributeGroups )
<tr><td> </td></tr>
<tr><th colspan="2">$attributeGroup.name</th></tr>
- #foreach($attribute in $attributeGroup.attributes )
- #set( $attributeValue = "" )
- #set( $attributeValue = $patientAttributeValueMap.get( $attribute.id ) )
- <tr>
- <td><label>$attribute.name #if($attribute.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
- <td>
- #if( $attribute.valueType == "YES/NO" )
- <select id="attr$attribute.id" name="attr$attribute.id" style="width:30em" >
- <option value="">[$i18n.getString( "please_select" )]</option>
- <option value="true" #if( $attributeValue ) selected="selected" #end>$i18n.getString( "yes" )</option>
- <option value="false" #if( !$attributeValue ) selected="selected" #end>$i18n.getString( "no" )</option>
- </select>
- #elseif( $attribute.valueType == "DATE" )
- <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" class=' #validate( "default" $attribute.mandatory )' style="width:30em" >
- <script type="text/javascript">
- datePickerValid( 'attr$attribute.id' );
- </script>
- #elseif( $attribute.valueType == "COMBO" )
- <select id="attr$attribute.id" name="attr$attribute.id" style="width:30em" class=' #validate( "default" $attribute.mandatory )'>
- <option value="">[$i18n.getString( "please_select" )]</option>
- #foreach ($option in $attribute.attributeOptions )
- <option value="$option.id" #if($attributeValue == $option.name) selected="selected" #end>$option.name</option>
+ #foreach($attribute in $attributeGroup.attributes)
+ #if($!attribute)
+ #set( $attributeValue = "" )
+ #set( $attributeValue = $patientAttributeValueMap.get( $attribute.id ) )
+ <tr>
+ <td><label>$attribute.name #if($attribute.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
+ <td>
+ #if( $attribute.valueType == "YES/NO" )
+ <select id="attr$attribute.id" name="attr$attribute.id" style="width:30em" >
+ <option value="">[$i18n.getString( "please_select" )]</option>
+ <option value="true" #if( $attributeValue ) selected="selected" #end>$i18n.getString( "yes" )</option>
+ <option value="false" #if( !$attributeValue ) selected="selected" #end>$i18n.getString( "no" )</option>
+ </select>
+ #elseif( $attribute.valueType == "DATE" )
+ <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" class=' #validate( "default" $attribute.mandatory )' style="width:30em" >
+ <script type="text/javascript">
+ datePickerValid( 'attr$attribute.id' );
+ </script>
+ #elseif( $attribute.valueType == "COMBO" )
+ <select id="attr$attribute.id" name="attr$attribute.id" style="width:30em" class=' #validate( "default" $attribute.mandatory )'>
+ <option value="">[$i18n.getString( "please_select" )]</option>
+ #foreach ($option in $attribute.attributeOptions )
+ <option value="$option.id" #if($attributeValue == $option.name) selected="selected" #end>$option.name</option>
+ #end
+ </select>
+ #else
+ <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" class=' #validate( $attribute.valueType $attribute.mandatory )' >
#end
- </select>
- #else
- <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" class=' #validate( $attribute.valueType $attribute.mandatory )' >
- #end
- </td>
- </tr>
+ </td>
+ </tr>
+ #end
#end
#end
<tr><td> </td></tr>
=== 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-09-27 09:48:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2010-10-04 11:11:25 +0000
@@ -31,7 +31,7 @@
<tr>
<td><label>$i18n.getString( "identifier_format" ) </label></td>
- <td><input type="text" id="format" name="format" value="$encoder.htmlEncode($!patientIdentifierType.format)" style="width:30em" ></td>
+ <td><input type="text" id="formater" name="formater" value="$encoder.htmlEncode($!patientIdentifierType.format)" style="width:30em" ></td>
<td></td>
</tr>