📝 Added Terms of Service

This commit is contained in:
Mawoka
2022-06-11 18:15:05 +02:00
parent 03a76a448f
commit 23aa5ba57d
2 changed files with 90 additions and 1 deletions
+16 -1
View File
@@ -41,7 +41,8 @@
.max(20, 'Username must be at most 20 characters long'),
privacy_accept: yup
.boolean()
.oneOf([true], 'You must accept the privacy policy to register!')
.oneOf([true], 'You must accept the privacy policy to register!'),
tos_accept: yup.boolean().oneOf([true], 'You must accept the terms of service to register!')
});
const { form, errors, touched, isValid, isSubmitting } = createForm<
@@ -196,6 +197,20 @@
>.
</label>
</div>
<div
class="ring-1 ring-gray-500 focus:outline-none rounded-lg m-4 py-2"
class:ring-red-700={$errors.tos_accept !== null}
class:ring-green-600={$touched.tos_accept === true &&
$errors.tos_accept === null}
>
<!-- <div class='flex items-center justify-between mt-4 w-full'>-->
<input type="checkbox" name="tos_accept" class="ml-3" />
<label class="text-sm text-gray-600 dark:text-gray-200">
I agree to the <a href="/docs/tos" class="underline"
>Terms of Service</a
>.
</label>
</div>
<div class="flex items-center justify-between mt-4">
<a