Docs: admin languages and texts, wording rule for agents, new screen names

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-27 15:46:25 +01:00
co-authored by Claude Opus 5.5
parent 6b46bc0c14
commit 0a2374db18
45 changed files with 443 additions and 360 deletions
+10 -7
View File
@@ -57,7 +57,7 @@ ipalKit({
| `fields` | see below | builder field types; `false` turns a type off, an object (block) replaces it; `true` = the default ipal block |
| `redirectRelationships` | — | collections a form can redirect to |
| `formOverrides` / `formSubmissionOverrides` | — | collection overrides (`fields` as a function + any collection settings) |
| `emailLayout` | `false` | nice emails + the Site Settings → Emails tab |
| `emailLayout` | `false` | nice emails + the Site settings → E-mails tab |
| `beforeEmail` | — | the form-builder's `beforeEmail` (after the layout, when `emailLayout`) |
| `consentFieldName` | `'consent'` | name of the GDPR consent field for `submitForm` / `createSubmitAction` (the call's argument wins) |
@@ -82,7 +82,7 @@ import { RenderForm } from '@intecion/ipal-kit/rsc'
```
- `form` — the relation from the block (depth ≥ 1; an ID or null → nothing renders),
- `action` — `sendForm` from `createSubmitAction` (below), `texts` — `getFormTexts(locale)` from `lib/content`
(Notifications → Form messages),
(Form messages → Form messages),
- `classNames` — the **only** place for looks (`src/components/forms/formClasses.ts`, template in ipal-form);
the plugin has no styles at all. Keys: `form, progress, step, stepTitle, stepDescription, fields,
field, fieldHalf, fieldFull, label, input, textarea, select, checkbox, checkboxLabel, choices,
@@ -118,7 +118,7 @@ the time block: `timeBlock`. New fields in form blocks = a migration (`pnpm payl
A **Step** block (title, description, per language) starts a new screen; fields above the first Step are screen 1.
`BuilderForm`: "Step 1 of 3" (`stepOf`), Next validates only the current step, Back keeps the
values, focus moves to the new step, Turnstile is on the last step, a field error from the server goes back
to the step with that field. Button texts: Notifications → Form messages → `next`, `back`, `stepOf`.
to the step with that field. Button texts: Form messages → `next`, `back`, `stepOf`.
### Conditional fields and steps ("Show only when")
Every form block (built-in, **Checkbox group**, **Step**, message) has a
@@ -275,7 +275,7 @@ messages the editor configured (Forms → form → Emails), through
email: mailAdapter(), // from '@intecion/ipal-kit' — SMTP or Graph according to the panel (email.md)
```
Then they go through the transport chosen in Site Integrations (SMTP or Graph). The editor sets recipients, subject and
Then they go through the transport chosen in Site integrations (SMTP or Graph). The editor sets recipients, subject and
body (placeholders: `{{field}}`, `{{*}}`, `{{*:table}}`) without touching the code.
`submitForm` is responsible only for Turnstile verification and storing. It stores the submission in the page's language
@@ -291,7 +291,7 @@ forms: { emailLayout: true } // optional: beforeEmail: (emails, args)
instead of values (Checkbox group too), a checked checkbox = ✓, empty answers skipped, groups by
step (Step titles). Only fields the visitor saw (the server does not store fields hidden by a condition).
- Every email gets a **template** (tables + inline CSS — Gmail, Outlook, Apple Mail): a header with the logo,
the body from the panel, a footer. Settings: **Site Settings → Emails** — logo (**PNG/JPG**, SVG does not work in
the body from the panel, a footer. Settings: **Site settings → Emails** — logo (**PNG/JPG**, SVG does not work in
Gmail/Outlook; empty = the site name), accent colour (hex), footer (per language). The link to the site and the
absolute logo address come from `serverURL` in `buildConfig` (set it from `NEXT_PUBLIC_SERVER_URL`).
- An error while building the template never blocks sending — the original email goes out, the error goes to the log.
@@ -532,8 +532,11 @@ const f = useForm({ initialValues, submitAction, validate })
### Validators (pure — also server-side)
`required`, `email`, `minLength`, `maxLength`, `checked`, `pattern`, `custom`,
`isEmail`, `buildValidator`. Each takes its own message. They are pure (no
`'use client'`), so you can use the same rules to re-validate in a server action.
`isEmail`, `buildValidator`. Each takes its own message; without one it uses the English
default from `VALIDATION_MESSAGES` (type `ValidationMessages`). `localizedRules(locale)` returns the
same rules with the defaults in the page language (`validationMessages(locale)`: Polish for `pl`,
English otherwise). They are pure (no `'use client'`), so you can use the same rules to
re-validate in a server action.
### errors are a STRING, not a boolean