Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfendeksilverstripe committed Dec 22, 2023
1 parent 5f76787 commit ac0f93e
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/Form/GridField/RichSortableHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,14 @@ public function getHTMLFragments(mixed $gridField): mixed
}
} else {
// start <INSERT_FILTER_BUTTON>
$field = $currentColumn == count($columns ?? []) && $filter->canFilterAnyColumns($gridField)
? LiteralField::create(
$fieldName,
sprintf(
'<button type="button" name="showFilter" aria-label="%s" title="%s"' .
' class="btn btn-secondary font-icon-search btn--no-text btn--icon-large grid-field__filter-open"></button>',
_t('SilverStripe\\Forms\\GridField\\GridField.OpenFilter', "Open search and filter"),
_t('SilverStripe\\Forms\\GridField\\GridField.OpenFilter', "Open search and filter")
)
$sortActionFieldContents = $currentColumn == count($columns ?? []) && $filter->canFilterAnyColumns($gridField)
? sprintf(
'<button type="button" name="showFilter" aria-label="%1$s" title="%1$s"' .
' class="btn btn-secondary font-icon-search btn--no-text btn--icon-large grid-field__filter-open"></button>',
_t('SilverStripe\\Forms\\GridField\\GridField.OpenFilter', "Open search and filter")
)
: LiteralField::create($fieldName, '<span class="non-sortable">' . $title . '</span>');
: '<span class="non-sortable">' . $title . '</span>';
$field = LiteralField::create($fieldName, $sortActionFieldContents);
// end <INSERT_FILTER_BUTTON>
}

Expand Down

0 comments on commit ac0f93e

Please sign in to comment.