=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2010-12-10 05:57:24 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2011-01-18 09:28:29 +0000 @@ -6,12 +6,14 @@ validation( 'addPatientAttributeForm', function(form){ if( isSubmit && ATTRIBUTE_OPTION.checkOnSubmit() ) { - form.submit(); + form.submit(i18n_field_is_required); } }, function(){ isSubmit = true; - jQuery.each($('#addPatientAttributeForm').serializeArray(), function(i, field) { - if( field.value == ""){ + + var fields = $("#addPatientAttributeForm").serializeArray(); + jQuery.each(fields, function(i, field) { + if( field.name.match("^attrOption")=='attrOption' && field.value == ""){ setInnerHTML("attrMessage", i18n_field_is_required); isSubmit = false; } @@ -90,19 +92,19 @@
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2010-12-10 05:57:24 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2011-01-18 09:28:29 +0000 @@ -11,16 +11,16 @@ } }, function(){ isSubmit = true; - jQuery.each($('#updatePatientAttributeForm').serializeArray(), function(i, field) { - if( field.value == ""){ + + var fields = $("#addPatientAttributeForm").serializeArray(); + jQuery.each(fields, function(i, field) { + if( field.name.match("^attrOption")=='attrOption' && field.value == ""){ setInnerHTML("attrMessage", i18n_field_is_required); isSubmit = false; } }); }); - jQuery("#attributeComboRow").hide(); - checkValueIsExist( "name", "validatePatientAttribute.action", {id:getFieldValue('id')}); }); @@ -91,11 +91,8 @@ -
+ | + |