Skip to content

Commit

Permalink
Fix radio widget and label=false.
Browse files Browse the repository at this point in the history
Use some strpos tricks to handle the situation where nesting labels are
being used but label=false.
  • Loading branch information
markstory committed Oct 29, 2014
1 parent 086c88b commit a26a84c
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 41 deletions.
7 changes: 7 additions & 0 deletions src/View/Widget/Radio.php
Expand Up @@ -187,6 +187,13 @@ protected function _renderInput($val, $text, $data, $context) {
$escape
);

if (
$label === false &&
strpos($this->_templates->get('radioWrapper'), '{{input}}') === false
) {
$label = $input;
}

return $this->_templates->format('radioWrapper', [
'input' => $input,
'label' => $label,
Expand Down

0 comments on commit a26a84c

Please sign in to comment.