Commit f509ed24 by Qiang Xue

Fixes #6236: No JS scripts should be registered when…

Fixes #6236: No JS scripts should be registered when `yii\widgets\ActiveForm::enableClientScript` is false
parent 0d671ebf
......@@ -32,7 +32,8 @@ Yii Framework 2 Change Log
- Bug #6107: `yii message` was emptying existing translations in .po in case of multiple categories (samdark)
- Bug #6112: `yii message` was incorrectly writing not yet translated strings in .po in case of multiple categories (samdark)
- Bug #6172: `yii\rbac\DbManager` should properly quote table and column names (qiangxue)
- Bug #6164: Added missing support for `yii\db\Exression` to QueryBuilder `BETWEEN` and `LIKE` conditions (cebe)
- Bug #6164: Added missing support for `yii\db\Expression` to QueryBuilder `BETWEEN` and `LIKE` conditions (cebe)
- Bug #6236: No JS scripts should be registered when `yii\widgets\ActiveForm::enableClientScript` is false (qiangxue)
- Bug: Gii console command help information does not contain global options (qiangxue)
- Bug: `yii\web\UrlRule` was unable to create URLs for rules containing unicode characters (samdark)
- Bug: `yii\web\AssetManager` should not publish disabled asset bundles (qiangxue)
......
......@@ -199,9 +199,11 @@ class ActiveField extends Component
*/
public function begin()
{
$clientOptions = $this->getClientOptions();
if (!empty($clientOptions)) {
$this->form->attributes[] = $clientOptions;
if ($this->form->enableClientScript) {
$clientOptions = $this->getClientOptions();
if (!empty($clientOptions)) {
$this->form->attributes[] = $clientOptions;
}
}
$inputID = Html::getInputId($this->model, $this->attribute);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment