<?php
/**
 * @var string $action_url
 * @var string $code
 * @var string $text
 * @var string $reply
 */

?>

<form name="form" action="<?= $action_url ?>" method="post">
    <input type="hidden" name="code" value="<?= $code ?>"/>

    <?php if (! empty($text)): ?>
        <div class="card mb-3">
            <div class="card-body"><?= $text ?></div>
        </div>
    <?php endif; ?>

    <?= $this->fetch(
        'system::app/ckeditor',
        [
            'label'        => d__('system', 'Message'),
            'name'         => 'message',
            'value'        => $this->e($reply ?? ''),
            'errors'       => '',
            'allow_upload' => false,
        ]
    ) ?>

    <input type="submit" class="btn btn-primary mt-3" name="submit" value="<?= d__('system', 'Send') ?>"/>
</form>
