060
This commit is contained in:
parent
5860a0b517
commit
ec172720fb
@ -268,7 +268,7 @@ import
|
|||||||
val.name = b
|
val.name = b
|
||||||
val.message = ""
|
val.message = ""
|
||||||
val.mark = ""
|
val.mark = ""
|
||||||
if form[a] == "1":
|
if form[a] == "1": # This checks if the country is selected or not
|
||||||
val.mark = "is-invalid"
|
val.mark = "is-invalid"
|
||||||
validity[a] = val
|
validity[a] = val
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ import
|
|||||||
|
|
||||||
ctx.send(sendCheckOut(validity, totalPriceHTML(products, cart)))
|
ctx.send(sendCheckOut(validity, totalPriceHTML(products, cart)))
|
||||||
|
|
||||||
"/lname" -> post:
|
"/validation/lname" -> post:
|
||||||
var lname = ctx.urlForm["c_lname"]
|
var lname = ctx.urlForm["c_lname"]
|
||||||
var val: Validity
|
var val: Validity
|
||||||
if lname == "":
|
if lname == "":
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
>
|
>
|
||||||
<label for="c_lname" class="text-black">Last Name <span class="text-danger">*</span></label>
|
<label for="c_lname" class="text-black">Last Name <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="c_lname"
|
<input type="text" class="form-control" id="c_lname"
|
||||||
hx-post="/lname"
|
hx-post="/validation/lname"
|
||||||
name="c_lname"
|
name="c_lname"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@ proc sendLastName*(lastName: string, input: Validity): string =
|
|||||||
<label for="c_lname" class="text-black">Last Name <span class="text-danger">*</span></label>
|
<label for="c_lname" class="text-black">Last Name <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control {input.mark}" id="c_lname"
|
<input type="text" class="form-control {input.mark}" id="c_lname"
|
||||||
placeholder="{input.message}"
|
placeholder="{input.message}"
|
||||||
hx-post="lname"
|
hx-post="/validation/lname"
|
||||||
name="c_lname"
|
name="c_lname"
|
||||||
value="{lastName}"
|
value="{lastName}"
|
||||||
>
|
>
|
||||||
@ -187,7 +187,7 @@ proc sendCheckOut*(val: Table[string, Validity], total: string): string =
|
|||||||
<label for="c_lname" class="text-black">Last Name <span class="text-danger">*</span></label>
|
<label for="c_lname" class="text-black">Last Name <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control {val["c_lname"].mark}" id="c_lname"
|
<input type="text" class="form-control {val["c_lname"].mark}" id="c_lname"
|
||||||
placeholder="{val["c_lname"].message}"
|
placeholder="{val["c_lname"].message}"
|
||||||
hx-post="/lname"
|
hx-post="/validation/lname""
|
||||||
name="c_lname"
|
name="c_lname"
|
||||||
value="{val["c_lname"].name}"
|
value="{val["c_lname"].name}"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user