WIP: reference site — File field on the quote form, mail sink smoke test
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
b7fb1b0e31
commit
387debc88c
@@ -17,6 +17,11 @@ export const formClasses: BuilderFormClassNames = {
|
||||
fields: 'grid grid-cols-12 gap-4',
|
||||
form: 'grid gap-6',
|
||||
formError: 'rounded-control bg-danger-surface p-3 text-danger',
|
||||
file: 'block w-full text-fg file:mr-3 file:rounded-control file:border-0 file:bg-surface-muted file:px-3 file:py-2 file:text-fg-strong',
|
||||
fileItem: 'flex flex-wrap items-center gap-2',
|
||||
fileList: 'mt-2 grid gap-1 text-sm',
|
||||
fileRemove: 'underline underline-offset-2',
|
||||
help: 'mt-1 text-sm text-fg-muted',
|
||||
input: control,
|
||||
label: 'mb-1 block font-medium text-fg-strong',
|
||||
legend: 'mb-1 font-medium text-fg-strong',
|
||||
|
||||
@@ -69,7 +69,12 @@ export default buildConfig({
|
||||
// @starter:endif
|
||||
],
|
||||
},
|
||||
forms: { redirectRelationships: ['pages'], emailLayout: true },
|
||||
// @starter:if demo
|
||||
// attachments: the Quote form takes floor plans and photos — e-mailed to the studio, never stored (forms.md "Files")
|
||||
forms: { attachments: true, emailLayout: true, redirectRelationships: ['pages'] },
|
||||
// @starter:else
|
||||
//: forms: { redirectRelationships: ['pages'], emailLayout: true }, // files on forms: add `attachments: true` (forms.md "Files")
|
||||
// @starter:endif
|
||||
// @starter:if twoFactor
|
||||
twoFactor: { issuer: 'Example Studio', plugin: payloadTotp },
|
||||
// @starter:else
|
||||
|
||||
@@ -240,8 +240,8 @@ export async function seedDemoPages(seed: Seeder, media: Record<string, string>)
|
||||
{
|
||||
blockType: 'richText',
|
||||
content: rich(
|
||||
['Wycena obejmuje zakres prac, podział na etapy, harmonogram i warunki płatności. Im więcej wiemy na starcie, tym dokładniejsza będzie: podaj lokalizację, przybliżoną powierzchnię, rodzaj budynku albo wnętrza i planowany termin rozpoczęcia. Jeśli masz rzuty, zdjęcia, mapę do celów projektowych albo wypis z planu miejscowego, wspomnij o nich w formularzu — poprosimy o pliki w odpowiedzi. Wycena jest bezpłatna i do niczego nie zobowiązuje.'],
|
||||
['The quote covers the scope of work, the stages, the schedule and the payment terms. The more we know at the start, the more precise it is: tell us the location, the rough floor area, the type of building or interior and when you plan to start. If you have floor plans, photos, a survey map or an extract from the local plan, mention them in the form — we will ask for the files in our reply. The quote is free and commits you to nothing.'],
|
||||
['Wycena obejmuje zakres prac, podział na etapy, harmonogram i warunki płatności. Im więcej wiemy na starcie, tym dokładniejsza będzie: podaj lokalizację, przybliżoną powierzchnię, rodzaj budynku albo wnętrza i planowany termin rozpoczęcia. Jeśli masz rzuty, zdjęcia, mapę do celów projektowych albo wypis z planu miejscowego, dołącz je w formularzu (PDF, JPG lub PNG). Wycena jest bezpłatna i do niczego nie zobowiązuje.'],
|
||||
['The quote covers the scope of work, the stages, the schedule and the payment terms. The more we know at the start, the more precise it is: tell us the location, the rough floor area, the type of building or interior and when you plan to start. If you have floor plans, photos, a survey map or an extract from the local plan, attach them in the form (PDF, JPG or PNG). The quote is free and commits you to nothing.'],
|
||||
),
|
||||
variant: 'narrow',
|
||||
},
|
||||
|
||||
@@ -84,6 +84,18 @@ export async function seedForms(seed: Seeder, notifyTo: string) {
|
||||
required: true,
|
||||
},
|
||||
{ blockType: 'date', label: tx('Planowany start', 'Planned start'), name: 'start' },
|
||||
// @starter:if demo
|
||||
// A File field (forms: { attachments: true }): sent with the notification to the studio, never stored on the site.
|
||||
{
|
||||
allowedTypes: ['pdf', 'jpg', 'png'],
|
||||
blockType: 'file',
|
||||
help: tx('Rzuty, zdjęcia lub mapa: PDF, JPG lub PNG, razem do 10 MB.', 'Floor plans, photos or a map: PDF, JPG or PNG, up to 10 MB together.'),
|
||||
label: tx('Załączniki (opcjonalnie)', 'Attachments (optional)'),
|
||||
maxFiles: 3,
|
||||
maxSizeMB: 10,
|
||||
name: 'attachment',
|
||||
},
|
||||
// @starter:endif
|
||||
{ blockType: 'message', message: rich(tx('Dane przetwarzamy wyłącznie w celu przygotowania wyceny.', 'We use your data only to prepare the quote.')) },
|
||||
consent,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user