= $form->field($model, 'fields')->widget(MultipleInput::class, [
'cloneButton' => true,
'columns' => [
[
'name' => 'field_id',
'type' => 'dropDownList',
'title' => 'Поле',
'defaultValue' => null,
'items' => \yii\helpers\ArrayHelper::map(\backend\modules\settings\models\AdditionalFields::find()
->joinWith('useFields')
->where(['`use_field`.`use`' => \common\models\UseStatus::USE_PROJECT])
->all(),
'id', 'name'),
'options' => ['prompt' => 'Выберите']
],
[
'name' => 'value',
'title' => 'Значение',
'enableError' => true,
'type' => InputFile::class,
'options' => [
'language' => 'ru',
'controller' => 'elfinder',
'name' => 'fields[value]',
'id' => 'fields-value',
'options' => ['class' => 'form-control itemImg', 'maxlength' => '255'],
'buttonOptions' => ['class' => 'btn btn-primary'],
'value' => $model->fields[0]['value'],
'buttonName' => 'Выбрать файл',
]
],
[
'name' => 'order',
'title' => 'Приоритет',
'enableError' => true,
'options' => [
'class' => 'input-priority'
]
]
]
])->label('Дополнительно');
?>
= $form->field($model, 'user')->widget(Select2::class,
[
'data' => \yii\helpers\ArrayHelper::map(\common\models\UserCard::find()->all(),'id', 'fio'),
'options' => ['placeholder' => '...','class' => 'form-control', 'multiple' => true],
'pluginOptions' => [
'allowClear' => true
],
]
); ?>
= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>