Improve warning response rendering
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user