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"
|
class="textarea py-2 px-3 w-full box-border"
|
||||||
rows="5"
|
rows="5"
|
||||||
placeholder="Yazı hakkındaki düşünceleriniz nelerdir?"
|
placeholder="Yazı hakkındaki düşünceleriniz nelerdir?"
|
||||||
name="commentBody"></textarea>
|
name="commentBody"
|
||||||
|
required></textarea>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="w-full py-2 px-3 box-border"
|
class="w-full py-2 px-3 box-border"
|
||||||
|
|
|
@ -16,7 +16,8 @@ const backendHost = import.meta.env.PUBLIC_BACKEND_HOST;
|
||||||
|
|
||||||
<form
|
<form
|
||||||
hx-post=`${backendHost}/api/blog/forms/emoji`
|
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}` />
|
<input type="hidden" name="postId" value=`${entryId}` />
|
||||||
<div
|
<div
|
||||||
id="reaction-buttons"
|
id="reaction-buttons"
|
||||||
|
@ -24,24 +25,24 @@ const backendHost = import.meta.env.PUBLIC_BACKEND_HOST;
|
||||||
hx-trigger="load"
|
hx-trigger="load"
|
||||||
hx-swap="innerHTML">
|
hx-swap="innerHTML">
|
||||||
<div class="emoji-buttons-container">
|
<div class="emoji-buttons-container">
|
||||||
<button name="emojiInput" value="👍" type="submit" class="emoji-button"
|
<button name="emojiInput" value="👍" type="submit" class="emoji-button">
|
||||||
> 👍 </button
|
👍
|
||||||
>
|
</button>
|
||||||
<button name="emojiInput" value="👎" type="submit" class="emoji-button"
|
<button name="emojiInput" value="👎" type="submit" class="emoji-button">
|
||||||
> 👎 </button
|
👎
|
||||||
>
|
</button>
|
||||||
<button name="emojiInput" value="😀" type="submit" class="emoji-button"
|
<button name="emojiInput" value="😀" type="submit" class="emoji-button">
|
||||||
> 😀 </button
|
😀
|
||||||
>
|
</button>
|
||||||
<button name="emojiInput" value="😑" type="submit" class="emoji-button"
|
<button name="emojiInput" value="😑" type="submit" class="emoji-button">
|
||||||
> 😑 </button
|
😑
|
||||||
>
|
</button>
|
||||||
<button name="emojiInput" value="🤢" type="submit" class="emoji-button"
|
<button name="emojiInput" value="🤢" type="submit" class="emoji-button">
|
||||||
> 🤢 </button
|
🤢
|
||||||
>
|
</button>
|
||||||
<button name="emojiInput" value="👀" type="submit" class="emoji-button"
|
<button name="emojiInput" value="👀" type="submit" class="emoji-button">
|
||||||
> 👀 </button
|
👀
|
||||||
>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user