forked from silverstripe/silverstripe-lumberjack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request silverstripe#79 from creative-commoners/pulls/2.0/…
…edit-icon FIX Ensure extra CSS classes are used for GridField edit button
- Loading branch information
Showing
2 changed files
with
5 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,18 @@ | |
|
||
namespace SilverStripe\Lumberjack\Forms; | ||
|
||
use SilverStripe\Forms\GridField\GridField; | ||
use SilverStripe\Forms\GridField\GridFieldEditButton; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\View\ArrayData; | ||
|
||
/** | ||
* Swaps the GridField Link out for the SiteTree edit link using {@link SiteTree::CMSEditLink()}. | ||
* | ||
* Bypasses GridFieldDetailForm | ||
* | ||
* @package silverstripe | ||
* @subpackage lumberjack | ||
* | ||
* @author Michael Strong <[email protected]> | ||
**/ | ||
**/ | ||
class GridFieldSiteTreeEditButton extends GridFieldEditButton | ||
{ | ||
/** | ||
|
@@ -29,8 +28,8 @@ public function getColumnContent($gridField, $record, $columnName) | |
// which can make the form readonly if no edit permissions are available. | ||
|
||
$data = ArrayData::create([ | ||
'Link' => $record->CMSEditLink(), | ||
'ExtraClass' => $this->getExtraClass() | ||
'Link' => $record->CMSEditLink(), | ||
'ExtraClass' => $this->getExtraClass(), | ||
]); | ||
|
||
return $data->renderWith(GridFieldEditButton::class); | ||
|