------------------------------------------------------------
revno: 12575
committer: Morten Olav Hansen <[email protected]>
branch nick: dhis2
timestamp: Fri 2013-10-11 10:00:25 +0200
message:
correctly load checkbox values in entry.js
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
--
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/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-10-10 11:07:46 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-10-11 08:00:25 +0000
@@ -757,6 +757,10 @@
if ( field ) {
field.val( decodeURI( obj.values[key].value ) );
+
+ if( obj.values[key].value === "true" && field.attr('type') === 'checkbox' ) {
+ field.attr('checked', true);
+ }
}
});
}
@@ -852,6 +856,10 @@
if ( field ) {
field.val( decodeURI( value.value ));
+
+ if( value.value === "true" && field.attr('type') === 'checkbox' ) {
+ field.attr('checked', true);
+ }
}
} );
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp