Add TipTap editor and switch tags to event/organization edit

This commit is contained in:
Jürgen Mummert
2026-03-01 12:54:36 +01:00
parent 76be3bcd09
commit 141e310320
7 changed files with 1062 additions and 46 deletions
@@ -103,8 +103,9 @@ class EventEditController extends AbstractFrontendModuleController
'endTime' => $this->resolveFormEndTime($event),
'location_id' => (int) ($event['location_id'] ?? 0),
'tags' => $currentTagIds,
'teaser' => (string) ($event['teaser'] ?? ''),
'description' => (string) ($event['description'] ?? ''),
'teaser' => '' !== trim((string) ($event['teaser'] ?? ''))
? (string) ($event['teaser'] ?? '')
: (string) ($event['description'] ?? ''),
'url' => (string) ($event['url'] ?? ''),
'photographer' => (string) ($event['photographer'] ?? ''),
'addImage' => '1' === (string) ($event['addImage'] ?? ''),
+9 -7
View File
@@ -119,17 +119,19 @@ class EventType extends AbstractType
],
])
->add('tags', ChoiceType::class, [
'label' => 'Typen',
'label' => 'Kategorien',
'choices' => $options['tag_choices'],
'expanded' => true,
'multiple' => true,
'required' => false,
'attr' => [
'class' => 'js-event-tags-choice',
'data-placeholder' => 'Typen suchen …',
],
'choice_attr' => static function (): array {
return [
'role' => 'switch',
'class' => 'ns-tag-switch-input',
];
},
])
->add('teaser', TextareaType::class, ['label' => 'Teaser', 'required' => false])
->add('description', TextareaType::class, ['label' => 'Beschreibung', 'required' => false])
->add('teaser', TextareaType::class, ['label' => 'Beschreibung', 'required' => false])
->add('url', UrlType::class, [
'label' => 'Link (extern)',
'required' => false,
+8 -5
View File
@@ -28,14 +28,17 @@ class OrganizationType extends AbstractType
->add('website', TextType::class, ['label' => 'Webseite', 'required' => false])
->add('description', TextareaType::class, ['label' => 'Beschreibung', 'required' => false])
->add('tags', ChoiceType::class, [
'label' => 'Typen',
'label' => 'Kategorien',
'choices' => $options['tag_choices'],
'expanded' => true,
'multiple' => true,
'required' => false,
'attr' => [
'class' => 'js-organization-tags-choice',
'data-placeholder' => 'Typ auswählen …',
],
'choice_attr' => static function (): array {
return [
'role' => 'switch',
'class' => 'ns-tag-switch-input',
];
},
])
->add('logoUpload', FileType::class, [
'label' => 'Logo hochladen',