diff --git a/javascript/GridFieldSearch.js b/javascript/GridFieldSearch.js index 8952ce60f..d745e96ab 100644 --- a/javascript/GridFieldSearch.js +++ b/javascript/GridFieldSearch.js @@ -28,7 +28,12 @@ jQuery(function($){ $(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith( '' ); - $(this).closest(".ss-gridfield").find("#action_gridfield_relationadd").button('enable'); + var addbutton = $(this).closest(".ss-gridfield").find("#action_gridfield_relationadd"); + if(addbutton.data('button')){ + addbutton.button('enable'); + }else{ + addbutton.removeAttr('disabled'); + } } }); });