This commit is contained in:
2026-05-29 20:18:44 +02:00
parent 754fc95d56
commit 7e7da4030d

View File

@@ -2166,7 +2166,7 @@ class CommentSystem {
? `<button class="comment-attach-btn" title="${attachLabel}" type="button"><i class="fa-solid fa-paperclip"></i></button><input type="file" class="comment-file-input" accept="image/*,video/*,audio/*" ${multiFile ? 'multiple' : ''} style="display:none;">`
: '';
const pollEnabled = session.logged_in && session.enable_comment_polls;
const pollBtn = pollEnabled && !parentId
const pollBtn = pollEnabled
? `<button class="comment-poll-btn" title="${pollLabel}" type="button"><i class="fa-solid fa-chart-bar"></i></button>`
: '';
return `
@@ -3198,6 +3198,10 @@ class CommentSystem {
params.append('file_ids', fileIds.join(','));
}
if (pollPayload) {
params.append('has_poll', '1');
}
const res = await fetch('/api/comments', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },