diff --git a/code/GridFieldAddNewInlineButton.php b/code/GridFieldAddNewInlineButton.php index 7fa0295..e8da8fc 100755 --- a/code/GridFieldAddNewInlineButton.php +++ b/code/GridFieldAddNewInlineButton.php @@ -67,7 +67,9 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S throw new Exception('Inline adding requires the editable columns component'); } - Requirements::javascript(THIRDPARTY_DIR . '/javascript-templates/tmpl.js'); + if (!Director::is_ajax()) { + Requirements::javascript(THIRDPARTY_DIR . '/javascript-templates/tmpl.js'); + } GridFieldExtensions::include_requirements(); $data = new ArrayData(array(