← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4819: Lack information when showing details of patient-attribute.

 

------------------------------------------------------------
revno: 4819
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-10-04 14:27:50 +0700
message:
  Lack information when showing details of patient-attribute.
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.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-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm	2011-09-28 07:11:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm	2011-10-04 07:27:50 +0000
@@ -3,6 +3,8 @@
     "id": "${patientAttribute.id}",
 	"name": "$!encoder.jsonEncode( ${patientAttribute.name} )",
 	"description": "$!encoder.jsonEncode( ${patientAttribute.description} )",
+	"mandatory":  "$!{patientAttribute.mandatory}",
+	"inheritable": "$!{patientAttribute.inheritable}",
 	"valueType": "$!encoder.jsonEncode( ${patientAttribute.valueType} )"
   }
 }
\ 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/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2011-10-03 07:45:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js	2011-10-04 07:27:50 +0000
@@ -9,6 +9,13 @@
 			setInnerHTML( 'idField', json.patientAttribute.id );
 			setInnerHTML( 'nameField', json.patientAttribute.name );	
 			setInnerHTML( 'descriptionField', json.patientAttribute.description );
+			
+			var mandatory = ( json.patientAttribute.mandatory == 'true') ? i18n_yes : i18n_no;
+			setInnerHTML( 'mandatoryField', mandatory );
+			
+			var inheritable = ( json.patientAttribute.inheritable == 'true') ? i18n_yes : i18n_no;
+			setInnerHTML( 'inheritableField', inheritable );
+			
 			setInnerHTML( 'valueTypeField', json.patientAttribute.valueType );    
 	   
 			showDetails();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm	2011-10-03 07:45:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm	2011-10-04 07:27:50 +0000
@@ -53,6 +53,8 @@
 				<p><label class="bold">$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
                 <p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
                 <p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
+                <p><label class="bold">$i18n.getString( "mandatory" ):</label><br><span id="mandatoryField"></span></p>
+                <p><label class="bold">$i18n.getString( "inheritable" ):</label><br><span id="inheritableField"></span></p>
                 <p><label class="bold">$i18n.getString( "value_type" ):</label><br><span id="valueTypeField"></span></p>
 			</div>