added possibility to use own classes exclusively (#15)

This commit is contained in:
Simon Karlen 2021-10-12 13:43:21 +02:00
parent 543ae6f291
commit e91c70475c
No known key found for this signature in database
GPG Key ID: 0630C27D666EBCC3

View File

@ -340,9 +340,9 @@ class ActiveField extends \yii\widgets\ActiveField
'label' => $encode ? Html::encode($label) : $label,
'value' => $value,
], $itemOptions);
$wrapperOptions = ArrayHelper::remove($options, 'wrapperOptions', ['class' => ['form-check']]);
$wrapperOptions = ArrayHelper::remove($options, 'wrapperOptions', ['class' => ['widget' => 'form-check']]);
if ($this->inline) {
Html::addCssClass($wrapperOptions, 'form-check-inline');
Html::addCssClass($wrapperOptions, ['inline' => 'form-check-inline']);
}
$html = Html::beginTag('div', $wrapperOptions) . "\n" .
@ -382,9 +382,9 @@ class ActiveField extends \yii\widgets\ActiveField
'label' => $encode ? Html::encode($label) : $label,
'value' => $value,
], $itemOptions);
$wrapperOptions = ArrayHelper::remove($options, 'wrapperOptions', ['class' => ['form-check']]);
$wrapperOptions = ArrayHelper::remove($options, 'wrapperOptions', ['class' => ['widget' => 'form-check']]);
if ($this->inline) {
Html::addCssClass($wrapperOptions, 'form-check-inline');
Html::addCssClass($wrapperOptions, ['inline' => 'form-check-inline']);
}
$html = Html::beginTag('div', $wrapperOptions) . "\n" .