update api for manager

This commit is contained in:
iIronside
2022-01-05 17:11:31 +03:00
parent dccf3c012e
commit 18b7fb0765
19 changed files with 5168 additions and 50 deletions

View File

@ -1,5 +1,7 @@
<?php
use kartik\file\FileInput;
use mihaildev\elfinder\InputFile;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
@ -10,10 +12,18 @@ use yii\widgets\ActiveForm;
<div class="template-form">
<?php $form = ActiveForm::begin(); ?>
<?php $form = ActiveForm::begin([
'options' => ['enctype'=>'multipart/form-data']]); ?>
<?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'template')->widget(FileInput::classname(), [
'options' => ['accept' => 'text/*'],
'pluginOptions' => [
'allowedFileExtensions'=>['doc','docx','txt'],'showUpload' => true
],
]); ?>
<div class="form-group">
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
</div>