<?php
/**
 * @var \Illuminate\Database\Eloquent\Collection $fields
 * @var \kernel\app_modules\user_stage\models\UserStage $stage
 * @var \kernel\modules\user\models\User $currentUser
 */
?>
<div class="row">
    <!-- [ sample-page ] start -->
    <div class="col-sm-12">
        <div class="card">
            <div class="card-header">
                <h5><?= $stage->title ?></h5>
            </div>
            <div class="card-body">
                <form method="post" action="/lk/stage/save">
                    <input type="hidden" name="stage_id" value="<?= $stage->id ?>">
                    <?php foreach ($fields as $field): ?>
                        <?= \kernel\app_modules\user_custom_fields\services\CustomFieldService::getCustomFieldHtml($field, $currentUser->id) ?>
                    <?php endforeach; ?>
                    <div class="d-grid mt-4">
                        <button type="submit" class="btn btn-primary">Сохранить</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
