1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-16 03:34:33 +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; $sanitizer = $this->wire()->sanitizer;
$defaults = array( $defaults = array(
'wbr' => true, 'wbr' => false,
'noSelectLabels' => true, 'noSelectLabels' => true,
); );
@@ -46,6 +46,7 @@ class InputfieldRadios extends InputfieldSelect {
if($columns === 1) $inline = true; if($columns === 1) $inline = true;
$options = $this->getOptions(); $options = $this->getOptions();
$optionWidth = $this->getOptionWidthCSS($this->optionWidth, $options); $optionWidth = $this->getOptionWidthCSS($this->optionWidth, $options);
$entityEncodeLabels = $this->getSetting('entityEncodeText') === false ? false : true;
$liAttr = ''; $liAttr = '';
if($optionWidth) { if($optionWidth) {
@@ -91,7 +92,7 @@ class InputfieldRadios extends InputfieldSelect {
if($attrs) $attrs = ' ' . $attrs; if($attrs) $attrs = ' ' . $attrs;
$label = $settings['wbr'] ? str_replace(' ', ' !wbr!', $value) : $value; $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); if($settings['wbr']) $label = str_replace('!wbr!', '<wbr>', $label);
$inputName = $sanitizer->entities($this->attr('name')); $inputName = $sanitizer->entities($this->attr('name'));