<?php

/**
 * @var Mobicms\Render\Template\Template $this
 * @var int $user_id
 * @var string $user_name
 * @var int $comments_count
 * @var int $forum_topics
 * @var int $forum_posts
 * @var string $form_action
 * @var string $back_url
 * @var string $csrf_token
 */

$this->layout('system::layout/default');
?>

<div class="row">
    <div class="col-md-6">
        <div class="alert alert-danger">
            <div class="pb-2">
                <h3><?= __('Delete user:') ?> <?= $this->e($user_name) ?></h3>
                <?= __('Are you sure that you want to delete this user?') ?>
            </div>
            <div>
                <form action="<?= $this->e($form_action) ?>" method="post">
                    <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>">
                    <?php if ($comments_count > 0): ?>
                        <div class="form-check">
                            <input type="checkbox" class="form-check-input" name="comments" value="1" id="comments" checked>
                            <label class="form-check-label" for="comments"><?= __('Comments') ?> (<?= $comments_count ?>)</label>
                        </div>
                        <div class="form-check">
                            <input type="checkbox" class="form-check-input" name="forum" value="1" id="forum" checked>
                            <label class="form-check-label" for="forum">
                                <?= __('Forum') ?> (<?= $forum_topics ?>&nbsp;/&nbsp;<?= $forum_posts ?>)
                            </label>
                        </div>
                        <div class="text-muted small mb-2"><?= __('All threads and posts created by the user go in the hidden state') ?></div>
                    <?php endif ?>
                    <div class="mt-1">
                        <button type="submit" class="btn btn-danger btn-sm"><?= __('Delete') ?></button>
                        <a href="<?= $this->e($back_url) ?>" class="btn btn-outline-secondary btn-sm"><?= __('Cancel') ?></a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
