045
This commit is contained in:
@@ -4,7 +4,7 @@ import
|
||||
type
|
||||
Validity* = object
|
||||
message*: string
|
||||
class*: string
|
||||
mark*: string
|
||||
|
||||
proc sendLastName*(lastName: string, input: Validity): string =
|
||||
result = fmt"""
|
||||
@@ -14,8 +14,8 @@ proc sendLastName*(lastName: string, input: Validity): string =
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<label for="c_lname" class="text-black">Last Name <span class="text-danger">*</span></label>
|
||||
<label class="{input.class}">{input.message}</label>
|
||||
<input type="text" class="form-control" id="c_lname"
|
||||
<input type="text" class="form-control {input.mark}" id="c_lname"
|
||||
placeholder="{input.message}"
|
||||
hx-post="lname"
|
||||
name="c_lname"
|
||||
value="{lastName}"
|
||||
@@ -31,8 +31,8 @@ proc sendFirstName*(firstName: string, input: Validity): string =
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<label for="c_lname" class="text-black">First Name <span class="text-danger">*</span></label>
|
||||
<label class="{input.class}">{input.message}</label>
|
||||
<input type="text" class="form-control" id="c_fname"
|
||||
<input type="text" class="form-control {input.mark}" id="c_fname"
|
||||
placeholder="{input.message}"
|
||||
hx-post="/validation/fname"
|
||||
name="c_fname"
|
||||
value="{firstName}"
|
||||
@@ -48,8 +48,8 @@ proc sendAddress*(address: string, input: Validity): string =
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<label for="c_address" class="text-black">Address <span class="text-danger">*</span></label>
|
||||
<label class="{input.class}">{input.message}</label>
|
||||
<input type="text" class="form-control" id="c_address"
|
||||
<input type="text" class="form-control {input.mark}" id="c_address"
|
||||
placeholder="{input.message}"
|
||||
hx-post="/validation/address"
|
||||
name="c_address"
|
||||
value="{address}"
|
||||
@@ -65,8 +65,8 @@ proc sendState*(state: string, input: Validity): string =
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<label for="c_state" class="text-black">State <span class="text-danger">*</span></label>
|
||||
<label class="{input.class}">{input.message}</label>
|
||||
<input type="text" class="form-control" id="c_state_country"
|
||||
<input type="text" class="form-control {input.mark}" id="c_state_country"
|
||||
placeholder="{input.message}"
|
||||
hx-post="/validation/state"
|
||||
name="c_state_country"
|
||||
value="{state}"
|
||||
@@ -82,8 +82,8 @@ proc sendZip*(zip: string, input: Validity): string =
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<label for="c_zip" class="text-black">Posta / Zip <span class="text-danger">*</span></label>
|
||||
<label class="{input.class}">{input.message}</label>
|
||||
<input type="text" class="form-control" id="c_postal_zip"
|
||||
<input type="text" class="form-control {input.mark}" id="c_postal_zip"
|
||||
placeholder="{input.message}"
|
||||
hx-post="/validation/zip"
|
||||
name="c_postal_zip"
|
||||
value="{zip}"
|
||||
@@ -99,8 +99,8 @@ proc sendEmail*(email: string, input: Validity): string =
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<label for="c_email" class="text-black">Email <span class="text-danger">*</span></label>
|
||||
<label class="{input.class}">{input.message}</label>
|
||||
<input type="text" class="form-control" id="c_email_address"
|
||||
<input type="text" class="form-control {input.mark}" id="c_email_address"
|
||||
placeholder="{input.message}"
|
||||
hx-post="/validation/email"
|
||||
name="c_email_address"
|
||||
value="{email}"
|
||||
@@ -116,8 +116,8 @@ proc sendPhone*(phone: string, input: Validity): string =
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<label for="c_phone" class="text-black">Phone <span class="text-danger">*</span></label>
|
||||
<label class="{input.class}">{input.message}</label>
|
||||
<input type="text" class="form-control" id="c_phone"
|
||||
<input type="text" class="form-control {input.mark}" id="c_phone"
|
||||
placeholder="{input.message}"
|
||||
hx-post="/validation/phone"
|
||||
name="c_phone"
|
||||
value="{phone}"
|
||||
|
||||
Reference in New Issue
Block a user