Split pkg_comment_form.php so the outer box is not always included
[aur.git] / web / template / pkg_comment_form.php
blob7c16eb731768fc2b844b8ebe7ea66c5d879bb76c
1 <form action="<?= get_pkgbase_uri($pkgbase_name) ?>" method="post">
2 <fieldset>
3 <?php
4 if (isset($_REQUEST['comment']) && check_token()) {
5 echo '<p>' . __('Comment has been added.') . '</p>';
7 ?>
8 <div>
9 <input type="hidden" name="action" value="<?= (isset($comment_id)) ? "do_EditComment" : "do_AddComment" ?>" />
10 <input type="hidden" name="ID" value="<?= intval($base_id) ?>" />
11 <?php if (isset($comment_id)): ?>
12 <input type="hidden" name="comment_id" value="<?= $comment_id ?>" />
13 <?php endif; ?>
14 <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
15 </div>
16 <p>
17 <textarea id="id_comment" name="comment" cols="80" rows="10"><?= (isset($comment_id)) ? htmlspecialchars($comment) : "" ?></textarea>
18 </p>
19 <p>
20 <input type="submit" value="<?= (isset($comment_id)) ? __("Save") : __("Add Comment") ?>" />
21 </p>
22 </fieldset>
23 </form>