<?php

$form = new \itguild\forms\ActiveForm();
$form->beginForm("/admin/settings/photo/update");

?>

<div class="row">
    <h5>Выберите сущности, к которым хотите прикрепить фото</h5>
</div>

<?php
$form->field(\itguild\forms\inputs\Select::class, "entity[]", [
    'class' => "form-control",
    'value' => \kernel\EntityRelation::getEntityByProperty('photo') ?? '',
    'multiple' => "multiple",

])
    ->setLabel("Сущности")
    ->setOptions(\kernel\EntityRelation::getEntityList())
    ->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();