fix: harden editorial registration flow

This commit is contained in:
Leon Tonhäuser committed 2026-08-09 21:04:50 +02:00
1 parent 9b22752ef2
commit a8d4e54ffb
8 files changed
+445 -109

No files matched your search

+22 -2
View File
@@ -6,7 +6,20 @@ import { authClient } from "./client";
export type RegistrationFormState = {
errors?: Partial<
Record<"actsForBusiness" | "termsVersion" | "privacyAcknowledged", string>
Record<
| "companyName"
| "contactName"
| "email"
| "password"
| "addressLine1"
| "postalCode"
| "city"
| "countryCode"
| "actsForBusiness"
| "termsVersion"
| "privacyAcknowledged",
string
>
>;
};
@@ -34,28 +47,32 @@ export function RegistrationForm({
return (
<form action={formAction} className="account-form">
<input name="termsVersion" type="hidden" value="2026-08" />
<div className="form-grid">
<label>
Redaktion oder Unternehmen
<input autoComplete="organization" name="companyName" required />
</label>
<FieldError message={state.errors?.companyName} />
<label>
Ansprechpartner:in
<input autoComplete="name" name="contactName" required />
</label>
<FieldError message={state.errors?.contactName} />
<label>
E-Mail-Adresse
<input autoComplete="email" name="email" required type="email" />
</label>
<FieldError message={state.errors?.email} />
<label>
Passwort
<input autoComplete="new-password" minLength={8} name="password" required type="password" />
</label>
<FieldError message={state.errors?.password} />
<label>
Straße und Hausnummer
<input autoComplete="address-line1" name="addressLine1" required />
</label>
<FieldError message={state.errors?.addressLine1} />
<label>
Adresszusatz
<input autoComplete="address-line2" name="addressLine2" />
@@ -64,10 +81,12 @@ export function RegistrationForm({
Postleitzahl
<input autoComplete="postal-code" name="postalCode" required />
</label>
<FieldError message={state.errors?.postalCode} />
<label>
Ort
<input autoComplete="address-level2" name="city" required />
</label>
<FieldError message={state.errors?.city} />
<label>
Land (ISO-Code)
<input
@@ -78,6 +97,7 @@ export function RegistrationForm({
required
/>
</label>
<FieldError message={state.errors?.countryCode} />
</div>
<fieldset className="acknowledgements">