From 1892a02076b9c1a4deb823577cd6ff869921ad70 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Wed, 13 Sep 2017 11:48:42 +1200 Subject: [PATCH] BUG Fix gridfield print styles --- src/Forms/GridField/GridFieldPrintButton.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Forms/GridField/GridFieldPrintButton.php b/src/Forms/GridField/GridFieldPrintButton.php index 2e29a21e7..40ec100dc 100644 --- a/src/Forms/GridField/GridFieldPrintButton.php +++ b/src/Forms/GridField/GridFieldPrintButton.php @@ -9,10 +9,9 @@ use SilverStripe\ORM\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\FieldType\DBDatetime; use SilverStripe\ORM\FieldType\DBHTMLText; -use SilverStripe\Security\Member; use SilverStripe\Security\Security; -use SilverStripe\View\Requirements; use SilverStripe\View\ArrayData; +use SilverStripe\View\Requirements; /** * Adds an "Print" button to the bottom or top of a GridField. @@ -67,8 +66,9 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr 'print', null ); + $button->setForm($gridField->getForm()); - $button->addExtraClass('font-icon-print btn btn-secondary'); + $button->addExtraClass('font-icon-print grid-print-button btn btn-secondary'); return array( $this->targetFragment => $button->Field(),