1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 11:14:12 +02:00
This commit is contained in:
Ryan Cramer
2022-06-24 10:04:49 -04:00
parent 4f63edf25e
commit b46b29aa8e

View File

@@ -33,7 +33,7 @@ class InputfieldRadios extends InputfieldSelect {
$sanitizer = $this->wire()->sanitizer;
$defaults = array(
'wbr' => true,
'wbr' => false,
'noSelectLabels' => true,
);
@@ -46,6 +46,7 @@ class InputfieldRadios extends InputfieldSelect {
if($columns === 1) $inline = true;
$options = $this->getOptions();
$optionWidth = $this->getOptionWidthCSS($this->optionWidth, $options);
$entityEncodeLabels = $this->getSetting('entityEncodeText') === false ? false : true;
$liAttr = '';
if($optionWidth) {
@@ -91,7 +92,7 @@ class InputfieldRadios extends InputfieldSelect {
if($attrs) $attrs = ' ' . $attrs;
$label = $settings['wbr'] ? str_replace(' ', ' !wbr!', $value) : $value;
$label = $this->entityEncode($label, Inputfield::textFormatBasic);
if($entityEncodeLabels) $label = $this->entityEncode($label, Inputfield::textFormatBasic);
if($settings['wbr']) $label = str_replace('!wbr!', '<wbr>', $label);
$inputName = $sanitizer->entities($this->attr('name'));