<commit_before><?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\GridView;
use yii\data\ActiveDataProvider;
use yii\bootstrap\ActiveForm;
use app\models\Wheel;
use kartik\widgets\Select2;

/* @var $this yii\web\View */
?>
<div class="clearfix"></div>
<script type="text/javascript">
    function lockAndSubmit(form) {
        form.submit();
    }
</script>
<div class="col-lg-12">
    <?php
    $form = ActiveForm::begin([
                'id' => 'dashboard-form',
                'layout' => 'horizontal',
                'fieldConfig' => [
                    'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                    'horizontalCssClasses' => [
                        'label' => 'col-sm-3',
                        'offset' => '',
                        'wrapper' => '',
                        'error' => '',
                        'hint' => '',
                    ],
                    'options' => ['class' => 'col-md-6']
                ],
    ]);
    ?>
    <div class="form-group">
        <?=
        $form->field($filter, 'companyId')->widget(Select2::classname(), [
            'data' => $companies,
            'hideSearch' => true,
            'options' => ['placeholder' => Yii::t('dashboard', 'Select company ...'), 'onchange' => 'lockAndSubmit(this.form);'],
            'pluginOptions' => [
                'allowClear' => true
            ],
        ])
        ?>
        <?=
        $form->field($filter, 'teamId')->widget(Select2::classname(), [
            'data' => $teams,
            'hideSearch' => true,
            'options' => ['placeholder' => Yii::t('dashboard', 'Select team ...'), 'onchange' => 'lockAndSubmit(this.form);',],
            'pluginOptions' => [
                'allowClear' => true
            ],
        ])
        ?>
        <?=
        $form->field($filter, 'assessmentId')->widget(Select2::classname(), [
            'data' => $assessments,
            'hideSearch' => true,
            'options' => ['placeholder' => Yii::t('dashboard', 'Select assesment ...'), 'onchange' => 'lockAndSubmit(this.form);',],
            'pluginOptions' => [
                'allowClear' => true
            ],
        ])
        ?>
    </div>
    <div class="form-group">
        <?=
        $form->field($filter, 'memberId')->widget(Select2::classname(), [
            'data' => $members,
            'hideSearch' => true,
            'options' => ['placeholder' => Yii::t('dashboard', 'Select member ...'), 'onchange' => 'lockAndSubmit(this.form);',],
            'pluginOptions' => [
                'allowClear' => true
            ],
        ])
        ?>
        <?=
        $form->field($filter, 'wheelType')->widget(Select2::classname(), [
            'data' => Wheel::getWheelTypes(),
            'hideSearch' => true,
            'options' => ['placeholder' => Yii::t('dashboard', 'Select wheel type ...'), 'onchange' => "lockAndSubmit(this.form);",],
            'pluginOptions' => [
                'allowClear' => true
            ],
        ])
        ?>
    </div>
    <?php ActiveForm::end(); ?>
</div>
<commit_msg>Improves dashboard filter layout and feedback<commit_after><?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\GridView;
use yii\data\ActiveDataProvider;
use yii\bootstrap\ActiveForm;
use app\models\Wheel;
use kartik\widgets\Select2;

/* @var $this yii\web\View */
?>
<div class="clearfix"></div>
<script type="text/javascript">
    function lockAndSubmit(form) {
        var filter = $("#filter-div").css('opacity', 0.3);
        form.submit();
    }
</script>
<div id="filter-div" class="col-md-12">
    <?php
    $form = ActiveForm::begin([
                'id' => 'dashboard-form',
                'fieldConfig' => [
                    'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                    'horizontalCssClasses' => [
                        'label' => 'col-sm-3',
                        'offset' => '',
                        'wrapper' => '',
                        'error' => '',
                        'hint' => '',
                    ],
                ],
    ]);
    ?>
    <div class="form-group">
        <div class="col-md-4">
            <?=
            $form->field($filter, 'companyId')->widget(Select2::classname(), [
                'data' => $companies,
                'hideSearch' => true,
                'options' => ['placeholder' => Yii::t('dashboard', 'Select company ...'), 'onchange' => 'lockAndSubmit(this.form);'],
                'pluginOptions' => [
                    'allowClear' => true
                ],
            ])
            ?>
        </div>
        <div class="col-md-4">
            <?=
            $form->field($filter, 'teamId')->widget(Select2::classname(), [
                'data' => $teams,
                'hideSearch' => true,
                'options' => ['placeholder' => Yii::t('dashboard', 'Select team ...'), 'onchange' => 'lockAndSubmit(this.form);',],
                'pluginOptions' => [
                    'allowClear' => true
                ],
            ])
            ?>
        </div>
        <div class="col-md-4">
            <?=
            $form->field($filter, 'assessmentId')->widget(Select2::classname(), [
                'data' => $assessments,
                'hideSearch' => true,
                'options' => ['placeholder' => Yii::t('dashboard', 'Select assesment ...'), 'onchange' => 'lockAndSubmit(this.form);',],
                'pluginOptions' => [
                    'allowClear' => true
                ],
            ])
            ?>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-4">
            <?=
            $form->field($filter, 'wheelType')->widget(Select2::classname(), [
                'data' => Wheel::getWheelTypes(),
                'hideSearch' => true,
                'options' => ['placeholder' => Yii::t('dashboard', 'Select wheel type ...'), 'onchange' => "lockAndSubmit(this.form);",],
                'pluginOptions' => [
                    'allowClear' => true
                ],
            ])
            ?>
        </div>
        <div class="col-md-4">
            <?=
            $form->field($filter, 'memberId')->widget(Select2::classname(), [
                'data' => $members,
                'hideSearch' => true,
                'options' => ['placeholder' => Yii::t('dashboard', 'Select member ...'), 'onchange' => 'lockAndSubmit(this.form);',],
                'pluginOptions' => [
                    'allowClear' => true
                ],
            ])
            ?>
        </div>
    </div>
    <?php ActiveForm::end(); ?>
</div>

{'fraction_non_alphanumeric': 0.1947509692812407, 'fraction_numerical': 0.004026245153593797, 'mean_word_length': 1.5599236641221375, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 160, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7529319', 'n_tokens_mistral': 1951, 'n_tokens_neox': 1899, 'n_words': 297}