Skip to content
Permalink
Browse files

Make sure 'checked' is always set and remove the isset

  • Loading branch information...
lilHermit committed Jan 31, 2017
1 parent 9b01a1e commit 9495517500a454fab04c9da2f27824d9750be4be
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/View/Widget/MultiCheckboxWidget.php
@@ -161,10 +161,7 @@ protected function _renderInputs($data, $context)
}
$checkbox['name'] = $data['name'];
$checkbox['escape'] = $data['escape'];
if ($this->_isSelected($checkbox['value'], $data['val'])) {
$checkbox['checked'] = true;
}
$checkbox['checked'] = $this->_isSelected($checkbox['value'], $data['val']);
if ($this->_isDisabled($checkbox['value'], $data['disabled'])) {
$checkbox['disabled'] = true;
}
@@ -211,7 +208,7 @@ protected function _renderInput($checkbox, $context)
$labelAttrs += $checkbox['label'];
}
if (isset($checkbox['checked']) && $checkbox['checked']) {
if ($checkbox['checked']) {
$labelAttrs = $this->_templates->addClass($labelAttrs, 'selected');
}

0 comments on commit 9495517

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.