Skip to content
Permalink
Browse files

Fixed missing quotes in doc block

Removed spare line
Combined conditions
  • Loading branch information...
lilHermit committed Feb 11, 2017
1 parent 8b05ce8 commit 03ebb2bae010ab6908444a11cb97f63a7e183ef3
@@ -1473,7 +1473,7 @@ public function checkbox($fieldName, array $options = [])
*
* - `value` - Indicates the value when this radio button is checked.
* - `label` - Either `false` to disable label around the widget or an array of attributes for
* the label tag. `selected` will be added to any classes e.g. `class => 'myclass'` where widget
* the label tag. `selected` will be added to any classes e.g. `'class' => 'myclass'` where widget
* is checked
* - `hiddenField` - boolean to indicate if you want the results of radio() to include
* a hidden input with a value of ''. This is useful for creating radio sets that are non-continuous.
@@ -1984,7 +1984,7 @@ public function select($fieldName, $options = [], array $attributes = [])
* - `hiddenField` - Set to false to remove the hidden field that ensures a value
* is always submitted.
* - `label` - Either `false` to disable label around the widget or an array of attributes for
* the label tag. `selected` will be added to any classes e.g. `class => 'myclass'` where
* the label tag. `selected` will be added to any classes e.g. `'class' => 'myclass'` where
* widget is checked
*
* Can be used in place of a select box with the multiple attribute.
@@ -174,10 +174,8 @@ protected function _renderInput($val, $text, $data, $context)
$radio['checked'] = true;
}
if (!is_bool($data['label'])) {
if (isset($radio['checked']) && $radio['checked']) {
$data['label'] = $this->_templates->addClass($data['label'], 'selected');
}
if (!is_bool($data['label']) && isset($radio['checked']) && $radio['checked']) {
$data['label'] = $this->_templates->addClass($data['label'], 'selected');
}
if ($this->_isDisabled($radio, $data['disabled'])) {
@@ -8727,7 +8727,6 @@ public function testInputLabelManipulationCheckboxes()
],
'labelOptions' => ['class' => ['custom-class', 'another-class'], 'data-name' => 'bob'],
'value' => ['1']
]);
$expected = [
['div' => ['class' => 'input select']],

0 comments on commit 03ebb2b

Please sign in to comment.
You can’t perform that action at this time.