Improve warning response rendering

This commit is contained in:
Dominic Ferrando
2025-04-21 15:27:26 -04:00
parent 80a0a5eb89
commit da69db0492
5 changed files with 145 additions and 113 deletions
+2 -3
View File
@@ -9,9 +9,7 @@ import (
)
templ NewThreadForm(board database.Board) {
<div style="display: none;" id="newPostWarning" class="warning">
<p>Please wait until the 2 minute cooldown is finished.</p>
</div>
<div style="display: none;" id="newPostWarning" class="warning"></div>
<form
hx-encoding="multipart/form-data"
style="display: none;"
@@ -29,6 +27,7 @@ templ NewThreadForm(board database.Board) {
then trigger refreshThreads on body
else
show #newPostWarning
then put event.detail.xhr.responseText into #newPostWarning
end"
>
<table>