mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Ensure "Add [modelClass]" is shown instead of using the field name of the GridField, partially reverts 16982ba17c
which broke breadcrumbs in SecurityAdmin
This commit is contained in:
parent
497aa9bfa9
commit
74d444cf2f
@ -68,7 +68,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
if($record && !$record->canView()) return Security::permissionFailure($this);
|
||||
|
||||
$memberList = GridField::create(
|
||||
'Member',
|
||||
'Members',
|
||||
false,
|
||||
DataList::create('Member'),
|
||||
$memberListConfig = GridFieldConfig_RecordEditor::create()
|
||||
@ -77,7 +77,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
$memberListConfig->getComponentByType('GridFieldDetailForm')->setValidator(new Member_Validator());
|
||||
|
||||
$groupList = GridField::create(
|
||||
'Group',
|
||||
'Groups',
|
||||
false,
|
||||
DataList::create('Group'),
|
||||
GridFieldConfig_RecordEditor::create()
|
||||
|
@ -15,7 +15,7 @@ class GridFieldAddNewButton implements GridField_HTMLProvider {
|
||||
public function getHTMLFragments($gridField) {
|
||||
$data = new ArrayData(array(
|
||||
'NewLink' => Controller::join_links($gridField->Link('item'), 'new'),
|
||||
'ButtonName' => _t('GridField.Add', 'Add {name}', array('name' => $gridField->name)),
|
||||
'ButtonName' => _t('GridField.Add', 'Add {name}', array('name' => $gridField->getModelClass())),
|
||||
));
|
||||
return array(
|
||||
$this->targetFragment => $data->renderWith('GridFieldAddNewbutton'),
|
||||
|
Loading…
Reference in New Issue
Block a user