1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Update InputfieldWrapper for Inputfield::skipLabelFor property to fix processwire/processwire-issues#1982

This commit is contained in:
Ryan Cramer
2024-11-15 12:41:10 -05:00
parent 1191c164a2
commit 5a8732f1e1

View File

@@ -898,7 +898,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
} else { } else {
// label always visible // label always visible
$label = str_replace('{out}', $icon . $label . $toggle, $markup['item_label']); $label = str_replace('{out}', $icon . $label . $toggle, $markup['item_label']);
$label = $this->setAttributeInMarkup('for', $for, $label, true); if($skipLabel !== Inputfield::skipLabelFor) $label = $this->setAttributeInMarkup('for', $for, $label, true);
} }
$headerClass = trim($inputfield->getSetting('headerClass') . " $classes[item_label]"); $headerClass = trim($inputfield->getSetting('headerClass') . " $classes[item_label]");
$label = $this->setAttributeInMarkup('class', $headerClass, $label); $label = $this->setAttributeInMarkup('class', $headerClass, $label);