beginForm(isset($model) ? "/admin/slider/edit/" . $model->id : "/admin/slider", 'multipart/form-data'); $form->field(\itguild\forms\inputs\TextInput::class, 'title', [ 'class' => "form-control", 'placeholder' => 'Заголовок', 'value' => $model->title ?? '' ]) ->setLabel("Заголовок") ->render(); $form->field(class: \itguild\forms\inputs\TextArea::class, name: "content", params: [ 'class' => "form-control", 'placeholder' => 'Контент', 'rows' => '10', 'value' => $model->content ?? '' ]) ->setLabel("Контент") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "additional_information", params: [ 'class' => "form-control", 'placeholder' => 'Дополнительная информация', 'rows' => '10', 'value' => $model->additional_information ?? '' ]) ->setLabel("Дополнительная информация") ->render(); $form->field(class: \itguild\forms\inputs\TextInput::class, name: "link", params: [ 'class' => "form-control", 'placeholder' => 'Ссылка', 'rows' => '10', 'value' => $model->link ?? '' ]) ->setLabel("Ссылка") ->render(); $form->field(class: \itguild\forms\inputs\Select::class, name: "status", params: [ 'class' => "form-control", 'value' => $model->status ?? '' ]) ->setLabel("Статус") ->setOptions(Slider::getStatus()) ->render(); $entityRelations = new \kernel\EntityRelation(); if (!isset($model)) { $model = new Slider(); } $entityRelations->renderEntityAdditionalPropertyFormBySlug("slider", $model); ?>