add_file_input

This commit is contained in:
SoHardKI
2019-07-26 15:31:39 +03:00
parent 9560efc7bc
commit ea96cfe152
6 changed files with 402 additions and 12 deletions

View File

@ -145,12 +145,21 @@ use yii\widgets\ActiveForm;
'options' => ['prompt' => 'Выберите']
],
[
'name' => 'value',
'name' => 'value',
'title' => 'Значение',
'enableError' => true,
'type' => InputFile::className(),
'options' => [
'class' => 'input-priority'
]
'language' => 'ru',
'controller' => 'elfinder',
// вставляем название контроллера, по умолчанию равен elfinder
// фильтр файлов, можно задать массив фильтров https://github.com/Studio-42/elFinder/wiki/Client-con..
'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',
@ -161,10 +170,6 @@ use yii\widgets\ActiveForm;
]
],
],
// 'extraButtons' => function ($model, $index, $context) {
// Html::addCssClass($options, 'btn multiple-input-list__btn js-input-plus btn btn-default');
// return Html::tag('div', Html::a('', ['index'], ['class' => 'glyphicon glyphicon-plus plus-icon']), $options);
// },
])->label('Дополнительно');
?>
</div>