beginForm(isset($model) ? "/admin/module_shop/edit/" . $model->id : "/admin/module_shop"); $form->field(\itguild\forms\inputs\TextInput::class, 'name', [ 'class' => "form-control", 'placeholder' => 'Название', 'value' => $model->name ?? '' ]) ->setLabel("Название") ->render(); $form->field(\itguild\forms\inputs\TextInput::class, 'author', [ 'class' => "form-control", 'placeholder' => 'Автор', 'value' => $model->author ?? '' ]) ->setLabel("Автор") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "version", params: [ 'class' => "form-control", 'placeholder' => 'Версия', 'value' => $model->version ?? '' ]) ->setLabel("Версия") ->render(); $form->field(class: \itguild\forms\inputs\TextArea::class, name: "description", params: [ 'class' => "form-control", 'placeholder' => 'Описание', 'rows' => '10', 'value' => $model->description ?? '' ]) ->setLabel("Описание") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "dependence", params: [ 'class' => "form-control", 'placeholder' => 'Зависимости', 'value' => $model->dependence ?? '' ]) ->setLabel("Зависимости") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::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(); ?>