=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm 2012-10-15 04:35:32 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm 2012-10-30 03:14:52 +0000 @@ -2,7 +2,7 @@

$i18n.getString( "create_new_patient_attribute_group" )

-
+ @@ -10,11 +10,11 @@ - + - + @@ -31,7 +31,7 @@ === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientAttributeGroupForm.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientAttributeGroupForm.js 2012-05-23 19:48:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/addPatientAttributeGroupForm.js 2012-10-30 03:14:52 +0000 @@ -16,17 +16,14 @@ }); - validation2( 'addPatientAttributeGroupForm', function(form){ + validation( 'addPatientAttributeGroupForm', function(form){ form.submit(); - }, { - 'beforeValidateHandler' : function() - { - listValidator( 'memberValidator', 'selectedAttributes' ); - }, - 'rules' : getValidationRules( 'patientAttributeGroup' ) - } ); + }, function(){ + selectAllById('selectedAttributes'); + if(jQuery("#selectedAttributes option").length > 0 ){ + setFieldValue('hasAttributes', 'true'); + } + }); checkValueIsExist( "name", "validatePatientAttributeGroup.action" ); - - }); \ 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/updatePatientAttributeGroupForm.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeGroupForm.js 2012-05-23 19:48:53 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updatePatientAttributeGroupForm.js 2012-10-30 03:14:52 +0000 @@ -2,15 +2,14 @@ jQuery('name').focus(); - validation2( 'updatePatientAttributeGroupForm', function(form){ - form.submit(); - }, { - 'beforeValidateHandler' : function() - { - listValidator( 'memberValidator', 'selectedAttributes' ); - }, - 'rules' : getValidationRules( 'patientAttributeGroup' ) - }); + validation( 'updatePatientAttributeGroupForm', function(form){ + form.submit(); + }, function(){ + selectAllById('selectedAttributes'); + if(jQuery("#selectedAttributes option").length > 0 ){ + setFieldValue('hasAttributes', 'true'); + } + }); checkValueIsExist( "name", "validatePatientAttributeGroup.action", {id:getFieldValue('id')}); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm 2012-10-18 13:27:17 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm 2012-10-30 03:14:52 +0000 @@ -14,7 +14,9 @@ === 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 2012-10-15 04:35:32 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm 2012-10-30 03:14:52 +0000 @@ -13,11 +13,11 @@ - + - + @@ -34,7 +34,7 @@
$i18n.getString( "name" ) *
$i18n.getString( "description" ) *
 $i18n.getString( "availableAttribute" ) $i18n.getString( "filter" ) $i18n.getString( "selectedAttribute" ) -
+ #if($patientAttributeGroups.size() > 0)
+ #end
$i18n.getString( "name" ) *
$i18n.getString( "description" ) *
$i18n.getString( "availableAttribute" ) $i18n.getString( "filter" ) $i18n.getString( "selectedAttribute" ) -