mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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;
|
||||
}
|
||||
|
||||
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.
|
||||
@ -116,7 +126,7 @@ class Group extends DataObject
|
||||
$parentidfield = DropdownField::create(
|
||||
'ParentID',
|
||||
$this->fieldLabel('Parent'),
|
||||
Group::get()->exclude('ID', $this->ID)->map('ID', 'Breadcrumbs')
|
||||
$this->getDecodedBreadcrumbs()
|
||||
)->setEmptyString(' '),
|
||||
new TextareaField('Description', $this->fieldLabel('Description'))
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user