<?php

/**
 * This file is part of JohnCMS Content Management System.
 *
 * @copyright JohnCMS Community
 * @license   https://opensource.org/licenses/GPL-3.0 GPL-3.0
 * @link      https://johncms.com JohnCMS Project
 */

/**
 * @var $title
 * @var $page_title
 * @var $can_hard_delete
 * @var $back_url
 * @var $delete_url
 */

$this->layout(
    'system::layout/default',
    [
        'title'      => $title,
        'page_title' => $page_title,
    ]
);
?>

<form action="<?= $delete_url ?>" method="post">
    <div class="alert alert-danger">
        <div class="pb-2">
            <?= __('Do you really want to delete?') ?>
        </div>
        <div>
            <div class="custom-control custom-radio">
                <input type="radio" id="hide_topic" name="del" checked="checked" value="1" class="custom-control-input">
                <label class="custom-control-label" for="hide_topic"><?= __('Hide') ?></label>
            </div>
            <?php if ($can_hard_delete): ?>
                <div class="custom-control custom-radio">
                    <input type="radio" id="del_topic" name="del" value="2" class="custom-control-input">
                    <label class="custom-control-label" for="del_topic"><?= __('Delete') ?></label>
                </div>
            <?php endif; ?>
        </div>
    </div>
    <div>
        <button type="submit" name="submit" value="1" class="btn btn-primary"><?= __('Perform') ?></button>
        <a href="<?= $back_url ?>" class="btn btn-secondary"><?= __('Cancel') ?></a>
    </div>
</form>
