<?php

/**
 * @var Mobicms\Render\Template\Template $this
 * @var string $form_action
 * @var string|null $error_message
 * @var string $csrf_token
 */

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

<div class="row">
    <div class="m-sm-auto m-md-auto m-lg-0 col-sm-12 col-md-8 col-lg-7 col-xl-7">
        <?php if (! empty($error_message)): ?>
            <div class="alert alert-danger shadow border-0"><?= $this->e($error_message) ?></div>
        <?php endif ?>
        <div class="card shadow border-0">
            <form action="<?= $this->e($form_action) ?>" method="post">
                <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>">
                <div class="card-body">
                    <div class="form-check">
                        <input type="radio" id="term1" name="term" value="0" class="form-check-input" checked>
                        <label class="form-check-label" for="term1"><?= __('Unban all') ?></label>
                    </div>
                    <div class="form-check">
                        <input type="radio" id="term2" name="term" value="1" class="form-check-input">
                        <label class="form-check-label" for="term2"><?= __('Clear Ban database') ?></label>
                    </div>

                    <div class="alert alert-info mt-3">
                        <?= __('&quot;Unban All&quot; - terminating all active bans<br>&quot;Clear Database&quot; - terminates all bans and clears an offenses history') ?>
                    </div>

                    <div class="mt-3">
                        <input type="submit" value="<?= __('Save') ?>" class="btn btn-primary"/>
                        <a href="/admin/bans" class="btn btn-secondary"><?= __('Cancel') ?></a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
