feat: tooltip on url field, with message on validation
This commit is contained in:
parent
13269a7b84
commit
b19919399f
@ -15,7 +15,7 @@
|
|||||||
<form hx-post="/download" hx-target="#get-btn" hx-swap="outerHTML" hx-indicator="#progress">
|
<form hx-post="/download" hx-target="#get-btn" hx-swap="outerHTML" hx-indicator="#progress">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div hx-target="this" hx-swap="outerHTML">
|
<div hx-target="this" hx-swap="outerHTML">
|
||||||
<label>Link
|
<label data-tooltip="Link can be on any platform!">Link
|
||||||
<input
|
<input
|
||||||
type="url" id="URL" name="URL"
|
type="url" id="URL" name="URL"
|
||||||
hx-post="/valid-link" hx-indicator="#url-validation-progress" required>
|
hx-post="/valid-link" hx-indicator="#url-validation-progress" required>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<div hx-target="this" hx-swap="outerHTML">
|
<div hx-target="this" hx-swap="outerHTML">
|
||||||
<label>
|
<label
|
||||||
|
data-tooltip="{{ if .Valid }}Link is Valid{{ else }}Link is invalid{{ end }}"
|
||||||
|
>
|
||||||
Link
|
Link
|
||||||
<input name="URL" id="URL" type="url" hx-post="/valid-link"
|
<input name="URL" id="URL" type="url" hx-post="/valid-link"
|
||||||
aria-invalid="{{ if .Valid }}false{{ else }}true{{ end }}"
|
aria-invalid="{{ if .Valid }}false{{ else }}true{{ end }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user