chore: add validation and debounce to forms
This commit is contained in:
parent
2b9d6d8657
commit
82d2c69e11
|
@ -32,7 +32,8 @@ const backendHost = import.meta.env.PUBLIC_BACKEND_HOST;
|
|||
class="textarea py-2 px-3 w-full box-border"
|
||||
rows="5"
|
||||
placeholder="Yazı hakkındaki düşünceleriniz nelerdir?"
|
||||
name="commentBody"></textarea>
|
||||
name="commentBody"
|
||||
required></textarea>
|
||||
<input
|
||||
type="text"
|
||||
class="w-full py-2 px-3 box-border"
|
||||
|
|
|
@ -16,7 +16,8 @@ const backendHost = import.meta.env.PUBLIC_BACKEND_HOST;
|
|||
|
||||
<form
|
||||
hx-post=`${backendHost}/api/blog/forms/emoji`
|
||||
hx-target="#reaction-buttons">
|
||||
hx-target="#reaction-buttons"
|
||||
hx-trigger="submit delay:0.5s">
|
||||
<input type="hidden" name="postId" value=`${entryId}` />
|
||||
<div
|
||||
id="reaction-buttons"
|
||||
|
@ -24,24 +25,24 @@ const backendHost = import.meta.env.PUBLIC_BACKEND_HOST;
|
|||
hx-trigger="load"
|
||||
hx-swap="innerHTML">
|
||||
<div class="emoji-buttons-container">
|
||||
<button name="emojiInput" value="👍" type="submit" class="emoji-button"
|
||||
> 👍 </button
|
||||
>
|
||||
<button name="emojiInput" value="👎" type="submit" class="emoji-button"
|
||||
> 👎 </button
|
||||
>
|
||||
<button name="emojiInput" value="😀" type="submit" class="emoji-button"
|
||||
> 😀 </button
|
||||
>
|
||||
<button name="emojiInput" value="😑" type="submit" class="emoji-button"
|
||||
> 😑 </button
|
||||
>
|
||||
<button name="emojiInput" value="🤢" type="submit" class="emoji-button"
|
||||
> 🤢 </button
|
||||
>
|
||||
<button name="emojiInput" value="👀" type="submit" class="emoji-button"
|
||||
> 👀 </button
|
||||
>
|
||||
<button name="emojiInput" value="👍" type="submit" class="emoji-button">
|
||||
👍
|
||||
</button>
|
||||
<button name="emojiInput" value="👎" type="submit" class="emoji-button">
|
||||
👎
|
||||
</button>
|
||||
<button name="emojiInput" value="😀" type="submit" class="emoji-button">
|
||||
😀
|
||||
</button>
|
||||
<button name="emojiInput" value="😑" type="submit" class="emoji-button">
|
||||
😑
|
||||
</button>
|
||||
<button name="emojiInput" value="🤢" type="submit" class="emoji-button">
|
||||
🤢
|
||||
</button>
|
||||
<button name="emojiInput" value="👀" type="submit" class="emoji-button">
|
||||
👀
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue
Block a user