mirror of
https://github.com/processwire/processwire.git
synced 2025-08-16 03:34:33 +02:00
Fix issue processwire/processwire-issues#1582
This commit is contained in:
@@ -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'));
|
||||||
|
Reference in New Issue
Block a user