54 lines
1.5 KiB
PHP
54 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* @var ModuleShop $model
|
|
*/
|
|
|
|
use app\modules\module_shop\models\ModuleShop;
|
|
|
|
$form = new \itguild\forms\ActiveForm();
|
|
$form->beginForm(isset($model) ? "/admin/module_shop/edit/" . $model->id : "/admin/module_shop", enctype: 'multipart/form-data');
|
|
|
|
|
|
|
|
$form->field(class: \itguild\forms\inputs\File::class, name: "path_to_archive", params: [
|
|
'class' => "form-control",
|
|
'placeholder' => 'Путь к файлу модуля',
|
|
'value' => $model->path_to_archive ?? ''
|
|
])
|
|
->setLabel("Путь к файлу модуля")
|
|
->render();
|
|
|
|
$form->field(class: \itguild\forms\inputs\Select::class, name: "status", params: [
|
|
'class' => "form-control",
|
|
'value' => $model->status ?? ''
|
|
])
|
|
->setLabel("Статус")
|
|
->setOptions(ModuleShop::getStatus())
|
|
->render();
|
|
|
|
?>
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
<?php
|
|
$form->field(\itguild\forms\inputs\Button::class, name: "btn-submit", params: [
|
|
'class' => "btn btn-primary ",
|
|
'value' => 'Отправить',
|
|
'typeInput' => 'submit'
|
|
])
|
|
->render();
|
|
?>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<?php
|
|
$form->field(\itguild\forms\inputs\Button::class, name: "btn-reset", params: [
|
|
'class' => "btn btn-warning",
|
|
'value' => 'Сбросить',
|
|
'typeInput' => 'reset'
|
|
])
|
|
->render();
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
$form->endForm();
|