=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2013-10-11 09:28:07 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2013-10-11 10:29:07 +0000 @@ -74,10 +74,10 @@ #set($index=1) #foreach($option in $programStageDataElement.dataElement.optionSet.options) @@ -86,7 +86,7 @@ #set($index=0) #end
- $i18n.getString("non_value") + onclick="saveRadio( '$programStageDataElement.dataElement.uid', '' )" tabindex="$tabIndex" />$i18n.getString("non_value") - $encoder.htmlEncode($option) === 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-11 09:28:07 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-10-11 10:29:07 +0000 @@ -755,11 +755,20 @@ function checkAndSetRadio( $field, value ) { if( $field.attr('type') === 'radio' ) { - if( $.trim(value) === $.trim($field.val()) ) { - $field.attr('checked', true); - $field[0].checked = true; - } + var $fields = $("." + $field.attr('id')); + + $.each($fields, function() { + var $f = $(this); + + if( $.trim(value) === $.trim($f.val()) ) { + $f.attr("checked", true); + } + }); + + return true; } + + return false; } function loadProgramStageInstance( programStageInstanceId, always ) { @@ -775,9 +784,12 @@ var field = $('#' + fieldId); if ( field ) { - checkAndSetCheckbox(field, obj.values[key].value); - checkAndSetRadio(field, obj.values[key].value); - field.val( decodeURI( obj.values[key].value ) ); + var value = obj.values[key].value; + + if( !checkAndSetRadio(field, value) ) { + field.val(decodeURI(value)); + checkAndSetCheckbox(field, value); + } } }); } @@ -872,9 +884,12 @@ var field = $('#' + fieldId); if ( field ) { - checkAndSetCheckbox(field, value.value); - checkAndSetRadio(field, value.value); - field.val( decodeURI( value.value )); + var value = value.value; + + if( !checkAndSetRadio(field, value) ) { + field.val(decodeURI(value)); + checkAndSetCheckbox(field, value); + } } } );