Skip to content

Commit 15eb7cd

Browse files
authored
[5.4] Fix field groups menu item type (joomla#46070)
1 parent 338bef3 commit 15eb7cd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

administrator/components/com_fields/src/Field/ComponentsFieldgroupField.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ protected function getOptions()
9494
if ($c instanceof FieldsServiceInterface) {
9595
$contexts = $c->getContexts();
9696

97-
foreach ($contexts as $context) {
97+
foreach ($contexts as $contextKey => $contextName) {
9898
$newOption = new \stdClass();
99-
$newOption->value = strtolower($component->value . '.' . $context);
100-
$newOption->text = $component->text . ' - ' . Text::_($context);
99+
$newOption->value = $contextKey;
100+
$newOption->text = $component->text . ' - ' . Text::_($contextName);
101101
$options[] = $newOption;
102102
}
103103
} else {

administrator/components/com_fields/tmpl/groups/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<fieldset name="request">
99
<fields name="request">
1010
<field
11-
name="extension"
11+
name="context"
1212
type="ComponentsFieldgroup"
1313
label="COM_FIELDS_CHOOSE_CONTEXT_LABEL"
1414
required="true"

0 commit comments

Comments
 (0)