mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Fixes #16629: ActiveField::inputOptions were not merged with options passed for radio and checkbox
This commit is contained in:
committed by
Alexander Makarov
parent
06227c7075
commit
8334ab3060
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.16 under development
|
||||
------------------------
|
||||
|
||||
- Bug #16629: ActiveField::inputOptions were not merged with options passed for radio and checkbox (paweljankowiak06)
|
||||
- Bug #16648: Html::strtolower() was corrupting UTF-8 strings (Kolyunya)
|
||||
- Bug #13977: Skip validation if file input does not exist (RobinKamps, s1lver)
|
||||
- Bug #16183: Fixed when `yii\helpers\BaseFileHelper` sometimes returned wrong value (samdark, SilverFire, OndrejVasicek)
|
||||
|
||||
@ -542,6 +542,8 @@ class ActiveField extends Component
|
||||
*/
|
||||
public function radio($options = [], $enclosedByLabel = true)
|
||||
{
|
||||
$options = array_merge($this->inputOptions, $options);
|
||||
|
||||
if ($enclosedByLabel) {
|
||||
$this->parts['{input}'] = Html::activeRadio($this->model, $this->attribute, $options);
|
||||
$this->parts['{label}'] = '';
|
||||
@ -594,6 +596,8 @@ class ActiveField extends Component
|
||||
*/
|
||||
public function checkbox($options = [], $enclosedByLabel = true)
|
||||
{
|
||||
$options = array_merge($this->inputOptions, $options);
|
||||
|
||||
if ($enclosedByLabel) {
|
||||
$this->parts['{input}'] = Html::activeCheckbox($this->model, $this->attribute, $options);
|
||||
$this->parts['{label}'] = '';
|
||||
|
||||
Reference in New Issue
Block a user