Formulare: visueller Baukasten, CSV-Auswahl, Einbindung unter Beiträgen
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m59s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m5s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m11s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m6s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 3m2s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m3s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m37s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m39s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m59s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m5s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m11s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m6s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 3m2s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m3s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m37s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m39s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
- Visueller Formularbaukasten im Portal (/redaktion/formulare/{id}): Formular
wie ausgefüllt, Bezeichnungen/Optionen/Hinweise direkt bearbeiten, Ziehen
und Ablegen aus der Palette, Pflicht/Breite in der Werkzeugleiste,
Einstellungen und Bedingungen in der Seitenleiste, Vorschau mit Bedingungen
- Admin: Felder-Reiter führt in den Baukasten; nach dem Anlegen direkt dorthin
- CSV: in der Formularliste, im Redaktionsbereich und für ausgewählte Einsendungen
- Neuigkeiten: Formular unter dem Beitrag (über den Pagebuilder-Block, ohne
Abhängigkeit vom Formular-Plugin)
- Kein Menüpunkt „Formulare“ im Portal; Redaktionsbereich „Formulare“
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
11123fecc0
commit
435960725d
139 changed files with 1735 additions and 432 deletions
|
|
@ -20,6 +20,7 @@ const props = defineProps({
|
|||
categories: { type: Array, required: true },
|
||||
canPublishWithoutCategory: { type: Boolean, default: false },
|
||||
canDelete: { type: Boolean, default: false },
|
||||
forms: { type: Array, default: () => [] },
|
||||
});
|
||||
|
||||
const page = usePage();
|
||||
|
|
@ -41,6 +42,7 @@ const form = useForm({
|
|||
remove_cover: false,
|
||||
is_featured: props.post?.is_featured ?? false,
|
||||
published_at: localValue(props.post?.published_at),
|
||||
form_id: props.post?.form_id ?? null,
|
||||
action: 'draft',
|
||||
});
|
||||
|
||||
|
|
@ -88,6 +90,7 @@ function submit(action) {
|
|||
...data,
|
||||
published_at: data.published_at ? new Date(data.published_at).toISOString() : null,
|
||||
category_id: data.category_id ? Number(data.category_id) : null,
|
||||
form_id: data.form_id ? Number(data.form_id) : '',
|
||||
...(props.post ? { _method: 'put' } : {}),
|
||||
})).post(props.post ? `/redaktion/neuigkeiten/${props.post.id}` : '/redaktion/neuigkeiten', {
|
||||
forceFormData: true,
|
||||
|
|
@ -205,6 +208,12 @@ const scheduled = computed(() => form.published_at && new Date(form.published_at
|
|||
</div>
|
||||
</Panel>
|
||||
|
||||
<Panel v-if="forms.length" title="Formular">
|
||||
<FormField id="form_id" label="Formular unter dem Beitrag" :error="form.errors.form_id" hint="Z. B. Anmeldung zum Sommerfest oder Rückmeldung. Formulare legt die Redaktion unter „Formulare“ an.">
|
||||
<NativeSelect id="form_id" v-model="form.form_id" :options="forms" placeholder="– kein Formular –" />
|
||||
</FormField>
|
||||
</Panel>
|
||||
|
||||
<Panel title="Titelbild">
|
||||
<div class="grid gap-3">
|
||||
<div v-if="coverPreview" class="relative overflow-hidden rounded-md border">
|
||||
|
|
|
|||
|
|
@ -6,12 +6,14 @@ import CategoryLabel from '../components/CategoryLabel.vue';
|
|||
import NewsCard from '../components/NewsCard.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import PageContent from '@/pagebuilder/PageContent.vue';
|
||||
import { formatDate } from '@/lib/format';
|
||||
|
||||
defineProps({
|
||||
post: { type: Object, required: true },
|
||||
related: { type: Object, required: true },
|
||||
editUrl: { type: String, default: null },
|
||||
form: { type: Object, default: null },
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -46,6 +48,9 @@ defineProps({
|
|||
<img v-if="post.cover_url" :src="post.cover_url" :alt="post.title" class="mt-8 aspect-video w-full rounded-lg object-cover" />
|
||||
|
||||
<div class="prose prose-neutral mt-8 max-w-none prose-headings:tracking-tight prose-img:rounded-lg" v-html="post.body_html" />
|
||||
|
||||
<!-- Eingebundenes Formular (Pagebuilder-Block des Formular-Plugins) -->
|
||||
<PageContent v-if="form" :content="form" class="mt-10" />
|
||||
</article>
|
||||
|
||||
<section v-if="related.data.length" class="mx-auto mt-16 max-w-5xl">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue