From ba56d82e10425b0290397f75c00483148a3840e5 Mon Sep 17 00:00:00 2001 From: Harald Mack Date: Mon, 26 Aug 2024 11:22:21 +0200 Subject: [PATCH] add static pages for component testing --- src/routes/+layout.svelte | 2 +- src/routes/firstdropdown/+page.svelte | 2 +- src/routes/nextdropdown/+page.svelte | 2 +- src/routes/registerUser/+page.svelte | 61 ++++++++--- .../registerUser/userDataInput/+page.svelte | 102 ++++++++++++++++++ .../userDataValidation/+page.svelte | 2 + 6 files changed, 153 insertions(+), 18 deletions(-) create mode 100644 src/routes/registerUser/userDataValidation/+page.svelte diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index adabcc30..f52a4070 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -32,6 +32,6 @@ -
+
diff --git a/src/routes/firstdropdown/+page.svelte b/src/routes/firstdropdown/+page.svelte index f52d9f91..c28f4cb4 100644 --- a/src/routes/firstdropdown/+page.svelte +++ b/src/routes/firstdropdown/+page.svelte @@ -33,9 +33,9 @@ diff --git a/src/routes/nextdropdown/+page.svelte b/src/routes/nextdropdown/+page.svelte index c7087f57..239e1eca 100644 --- a/src/routes/nextdropdown/+page.svelte +++ b/src/routes/nextdropdown/+page.svelte @@ -44,7 +44,7 @@ infopage="/info" > + import AbstractContent from '$lib/components/AbstractContent.svelte'; + import AbstractDropdownItem from '$lib/components/DataInput/AbstractDropdownItem.svelte'; import AbstractRegistrationForm from '$lib/components/DataInput/AbstractRegistrationForm.svelte'; - const data = [ + import { Input } from 'flowbite-svelte'; + + const props = [ + { + componentProps: { + label: 'Benutzername', + type: 'text', + placeholder: 'Wählen sie einen beliebigen Benutzernamen', + required: true + }, + itemComponent: Input + }, { - label: 'Benutzername', - type: 'text', - placeholder: 'Wählen sie einen beliebigen Benutzernamen' + componentProps: { + label: 'E-Mail (optional)', + type: 'email', + placeholder: 'E-Mail' + }, + itemComponent: Input }, { - label: 'E-Mail (optional)', - type: 'text', - placeholder: 'E-Mail' + componentProps: { + label: 'Passwort', + type: 'password', + placeholder: 'Passwort', + required: true + }, + itemComponent: Input }, { - label: 'Passwort', - type: 'text', - placeholder: 'Passwort' + componentProps: { + label: 'Passwort wiederholen', + type: 'password', + placeholder: 'Passwort wiederholen', + required: true + }, + itemComponent: Input }, { - label: 'Passwort wiederholen', - type: 'text', - placeholder: 'Passwort wiederholen' + componentProps: { + name: 'Benutzerrolle', + items: ['Benutzer/in', 'Admin', 'Forscher/in'], + about: 'Welche Rolle soll der neue Benutzer haben?', + selected: 'Benutzer/in' + }, + itemComponent: AbstractDropdownItem } ]; const heading = 'Als neuer Benutzer registrieren'; const buttonLabel = 'Weiter'; + const href = '/registerUser/userDataInput'; -
- +
+ + +
diff --git a/src/routes/registerUser/userDataInput/+page.svelte b/src/routes/registerUser/userDataInput/+page.svelte index e69de29b..d5f30b79 100644 --- a/src/routes/registerUser/userDataInput/+page.svelte +++ b/src/routes/registerUser/userDataInput/+page.svelte @@ -0,0 +1,102 @@ + + +
+ + + +
diff --git a/src/routes/registerUser/userDataValidation/+page.svelte b/src/routes/registerUser/userDataValidation/+page.svelte new file mode 100644 index 00000000..49f5fcd1 --- /dev/null +++ b/src/routes/registerUser/userDataValidation/+page.svelte @@ -0,0 +1,2 @@ +