From d7a84789f3d8ae8e69fa2c3aeb2a29887cef40b0 Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 11 Nov 2022 09:57:54 +0100 Subject: [PATCH] feat: add privacy agreement to signup --- src/lib/elements/forms/inputChoice.svelte | 25 +++++++++++++++++++++-- src/routes/register/+page.svelte | 20 ++++++++++++++++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/src/lib/elements/forms/inputChoice.svelte b/src/lib/elements/forms/inputChoice.svelte index be04a386a..f3348f148 100644 --- a/src/lib/elements/forms/inputChoice.svelte +++ b/src/lib/elements/forms/inputChoice.svelte @@ -1,5 +1,5 @@ @@ -18,7 +34,9 @@ {required} type="checkbox" class:switch={type === 'switchbox'} - bind:checked={value} /> + bind:this={element} + bind:checked={value} + on:invalid={handleInvalid} />
{label}
@@ -27,4 +45,7 @@ {/if}
+ {#if error} + {error} + {/if}
diff --git a/src/routes/register/+page.svelte b/src/routes/register/+page.svelte index f58e12427..403066094 100644 --- a/src/routes/register/+page.svelte +++ b/src/routes/register/+page.svelte @@ -5,6 +5,7 @@ Button, Form, FormItem, + InputChoice, InputEmail, InputPassword, InputText @@ -16,6 +17,7 @@ import { Dependencies } from '$lib/constants'; let name: string, mail: string, pass: string; + let terms = false; const register = async () => { try { @@ -60,9 +62,23 @@ required={true} showPasswordButton={true} bind:value={pass} /> - + + By registering, you agree that you have read, understand, and acknowledge our + Privacy Policy + and accept our + General Terms of Use + . - + +