Add TipTap editor and switch tags to event/organization edit
This commit is contained in:
@@ -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'] ?? ''),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user