forked from rDrama/rDrama
53 lines
3.6 KiB
HTML
53 lines
3.6 KiB
HTML
<form id="reply-to-{{p.fullname}}" class="flex flex-wrap w-full" action="/comment" method="post">
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
|
<input type="hidden" name="parent_fullname" value="t2_{{p.id}}">
|
|
<input id="reply-form-submission-{{p.fullname}}" type="hidden" name="submission" value="{{p.id}}">
|
|
<div class="relative comment-box rounded-lg border border-gray-300 dark:border-gray-900 bg-gray-100 dark:bg-white/[.05] shadow-inner w-full">
|
|
<textarea maxlength="10000" id="reply-form-body-{{p.fullname}}" data-fullname="{{p.fullname}}" class="w-full rounded-t-md p-3 bg-transparent focus:bg-white dark:focus:bg-transparent shadow-inner resize-y focus:outline-none placehoder:text-gray-400" id="comment-form" name="body" form="reply-to-{{p.fullname}}" aria-label="With textarea" placeholder="Add your comment..." rows="3" oninput="charLimit('reply-form-body-{{p.fullname}}','charcount-reply')"></textarea>
|
|
<ul class="-mt-1 flex space-x-4 px-3 py-2 border-t border-dashed border-gray-400 dark:border-white/[.05] mb-0">
|
|
<li>
|
|
<button type="button" class="text-gray-400 hover:text-gray-500" onclick="makeBold('reply-form-body-{{p.fullname}}')">
|
|
<i class="fas fa-bold fa-fw fa-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Bold"></i>
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<button type="button" class="text-gray-400 hover:text-gray-500" onclick="makeItalics('reply-form-body-{{p.fullname}}')">
|
|
<i class="fas fa-italic fa-fw fa-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Italicize"></i>
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<button type="button" class="text-gray-400 hover:text-gray-500" onclick="makeQuote('reply-form-body-{{p.fullname}}')">
|
|
<i class="fas fa-quote-right fa-fw fa-sm" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Quote"></i>
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<button type="button" id="gif-reply-btn-{{p.fullname}}" class="text-gray-400 hover:text-gray-500" onclick="commentForm('reply-form-body-{{p.fullname}}');getGif()">
|
|
<span class="font-bold text-sm text-uppercase" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#gifModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Add GIF">GIF</span>
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<button type="button" id="emoji-reply-btn-{{p.fullname}}" class="text-gray-400 hover:text-gray-500" onclick="loadEmojis('reply-form-body-{{p.fullname}}')" aria-hidden="true" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" data-bs-original-title="Add Emoji"> <i class="fas fa-smile-beam fa-fw fa-sm"></i>
|
|
</button>
|
|
</li>
|
|
{% if v %}
|
|
<li>
|
|
<label for="file-upload-reply-{{p.fullname}}" class="text-gray-400 hover:text-gray-500">
|
|
<div id="filename-show-reply-{{p.fullname}}">
|
|
<i class="fas fa-camera fa-fw fa-sm"></i>
|
|
</div>
|
|
<input id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*, video/*" onchange="document.getElementById('filename-show-reply-{{p.fullname}}').innerHTML='image/video';" hidden>
|
|
</label>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
<span id="charcount-reply" class="absolute bottom-3 right-3 text-xs text-gray-400 font-bold"></span>
|
|
</div>
|
|
<div class="flex w-full justify-between mt-2">
|
|
<a href="/formatting" target="_blank" class="inline-block text-sm text-gray-600">
|
|
Formatting help
|
|
</a>
|
|
<button type="button" id="save-reply-to-{{p.fullname}}" form="reply-to-{{p.fullname}}" class="ml-auto btn btn-primary" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">
|
|
Comment
|
|
</button>
|
|
</div>
|
|
</form> |