This commit is contained in:
cereci5049 2024-08-16 02:06:26 +05:30
parent 1d17000c0f
commit 868469b74c

View file

@ -70,19 +70,23 @@ proc htmxSignup*(val: Table[string, Validity], message: string): string =
>
<label class="text-danger">{message}</label>
<div class="form-group mt-5">
<label for="email">First Name:</label>
<label class="text-danger"></label>
<div class="form-group mt-5"
hx-target="this"
hx-swap="outerHTML"
>
<label for="email">First Name:</label>
<label class="text-danger">{val["fn"].message}</label>
<input type="text" name="fn" class="form-control" required autocomplete="off">
</div>
<input type="text" name="fn" class="form-control {val["fn"].mark}" required autocomplete="off"
value="{val["fn"].name}"
hx-post="/htmx/fname"
>
<div class="form-group">
<label for="email">Last Name:</label>
<label class="text-danger"></label>
<label class="text-danger">{val["ln"].message}</label>
<input type="text" name="ln" class="form-control" required autocomplete="off">
<input type="text" name="ln" class="form-control {val["ln"].mark}" required autocomplete="off" value="{val["ln"].name}">
</div>
@ -96,9 +100,9 @@ proc htmxSignup*(val: Table[string, Validity], message: string): string =
<div class="form-group">
<label for="email">Phone:</label>
<label class="text-danger"></label>
<label class="text-danger">{val["ph"].message}</label>
<input type="email" name="ph" class="form-control" required autocomplete="off">
<input type="email" name="ph" class="form-control {val["ph"].mark}" required autocomplete="off" value="{val["ph"].name}">
</div>
@ -108,7 +112,7 @@ proc htmxSignup*(val: Table[string, Validity], message: string): string =
>
<label for="password">Password:</label>
<label class="text-danger"></label>
<input type="password" name="password" id="password" class="form-control" required autocomplete="off"
<input type="password" name="pw" id="password" class="form-control" required autocomplete="off"
value=""
hx-post="/htmx/password"
>
@ -120,4 +124,4 @@ proc htmxSignup*(val: Table[string, Validity], message: string): string =
<button id="b4" type="submit" class="btn btn-primary">Submit</button>
<a id="b4" href="/login" class="btn btn-outline-primary">Login</a>
<hr>
</form>"""
</form>"""