diff --git a/views/blog-article/_form.php b/views/blog-article/_form.php index 8dad2c8..7cbf0e6 100755 --- a/views/blog-article/_form.php +++ b/views/blog-article/_form.php @@ -52,10 +52,15 @@ 'options' => [ 'placeholder' => \Yii::t('blog', 'Search for a categories ...'), 'multiple' => true, + + ], + + 'value' => array_keys($model->categoryIds), + 'data' => $model->categoryIds, + 'toggleAllSettings' => [ + 'selectLabel' => false, ], - 'value' => array_keys($model->categoryIds), - 'data' => $model->categoryIds, - 'pluginOptions' => [ + 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 3, 'language' => [ @@ -100,14 +105,17 @@ 'tagIds', - 'options' => [ + 'name' => 'tagIds', + 'options' => [ 'placeholder' => \Yii::t('blog', 'Search for a tags ...'), 'multiple' => true, ], - 'value' => array_keys($model->tagIds), - 'data' => $model->tagIds, - 'pluginOptions' => [ + 'toggleAllSettings' => [ + 'selectLabel' => false, + ], + 'value' => array_keys($model->tagIds), + 'data' => $model->tagIds, + 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 3, 'language' => [ @@ -170,14 +178,17 @@ } echo Select2::widget( [ - 'name' => 'articleIds', - 'options' => [ + 'name' => 'articleIds', + 'options' => [ 'placeholder' => \Yii::t('blog', 'Search for an articles ...'), 'multiple' => true, ], - 'value' => array_keys($model->articleIds), - 'data' => $model->articleIds, - 'pluginOptions' => [ + 'toggleAllSettings' => [ + 'selectLabel' => false, + ], + 'value' => array_keys($model->articleIds), + 'data' => $model->articleIds, + 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 3, 'language' => [ @@ -224,14 +235,17 @@ 'productIds', - 'options' => [ + 'name' => 'productIds', + 'options' => [ 'placeholder' => \Yii::t('blog', 'Search for products ...'), 'multiple' => true, ], - 'value' => array_keys($model->productIds), - 'data' => $model->productIds, - 'pluginOptions' => [ + 'toggleAllSettings' => [ + 'selectLabel' => false, + ], + 'value' => array_keys($model->productIds), + 'data' => $model->productIds, + 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 3, 'language' => [ -- libgit2 0.21.4