mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 07:47:00 +02:00
Fix issue in InputfieldSelector where it could display primary field label rather than template-context field label (when present) in situation where only one template is allowed and 'showFieldLabels' option is enabled.
This commit is contained in:
@@ -933,6 +933,10 @@ class InputfieldSelector extends Inputfield implements ConfigurableModule {
|
||||
foreach($settings['customFields'] as $field) {
|
||||
/** @var Field $field */
|
||||
if($settings['showFieldLabels']) {
|
||||
if($this->initTemplate) {
|
||||
$f = $this->initTemplate->fieldgroup->getField($field, true);
|
||||
if($f) $field = $f;
|
||||
}
|
||||
$label = $field->getLabel();
|
||||
while(isset($customFields[$label])) $label .= ' ';
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user