BUG Fix gridfield print styles

This commit is contained in:
Damian Mooyman 2017-09-13 11:48:42 +12:00
parent 546b4dedcf
commit 1892a02076
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -9,10 +9,9 @@ use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBDatetime; use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\FieldType\DBHTMLText; use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\Security\Member;
use SilverStripe\Security\Security; use SilverStripe\Security\Security;
use SilverStripe\View\Requirements;
use SilverStripe\View\ArrayData; use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/** /**
* Adds an "Print" button to the bottom or top of a GridField. * Adds an "Print" button to the bottom or top of a GridField.
@ -67,8 +66,9 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
'print', 'print',
null 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( return array(
$this->targetFragment => $button->Field(), $this->targetFragment => $button->Field(),