mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #9198 from elabuwa/pulls/4.3/bug-fix-html-entities-breadcrumbs-in-group
Bug : Add html_entity_decode to group parents
This commit is contained in:
commit
0b991cc039
@ -96,6 +96,16 @@ class Group extends DataObject
|
|||||||
|
|
||||||
return $doSet;
|
return $doSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getDecodedBreadcrumbs()
|
||||||
|
{
|
||||||
|
$list = Group::get()->exclude('ID', $this->ID);
|
||||||
|
$groups = ArrayList::create();
|
||||||
|
foreach ($list as $group) {
|
||||||
|
$groups->push(['ID' => $group->ID, 'Title' => $group->getBreadcrumbs(' » ')]);
|
||||||
|
}
|
||||||
|
return $groups;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Caution: Only call on instances, not through a singleton.
|
* Caution: Only call on instances, not through a singleton.
|
||||||
@ -116,7 +126,7 @@ class Group extends DataObject
|
|||||||
$parentidfield = DropdownField::create(
|
$parentidfield = DropdownField::create(
|
||||||
'ParentID',
|
'ParentID',
|
||||||
$this->fieldLabel('Parent'),
|
$this->fieldLabel('Parent'),
|
||||||
Group::get()->exclude('ID', $this->ID)->map('ID', 'Breadcrumbs')
|
$this->getDecodedBreadcrumbs()
|
||||||
)->setEmptyString(' '),
|
)->setEmptyString(' '),
|
||||||
new TextareaField('Description', $this->fieldLabel('Description'))
|
new TextareaField('Description', $this->fieldLabel('Description'))
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user