<?php
/**
 * @var string $message
 * @var string $max_length
 * @var string $action_url
 * @var string $code
 * @var string $bb_codes
 */

?>

<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; ?>

    <div class="form-group">
        <label for="message"><?= d__('system', 'Message') ?></label>
        <div>
            <?= $bb_codes ?>
        </div>
        <textarea rows="<?= $user->config->fieldHeight ?>" name="message" id="message" required class="form-control"><?= $reply ?? '' ?></textarea>
        <div class="text-muted">Max: <?= $max_length ?></div>
    </div>
    <input type="submit" class="btn btn-primary" name="submit" value="<?= d__('system', 'Send') ?>"/>
</form>
