Compare commits

...

4 Commits

Author SHA1 Message Date
Jürgen Mummert 76be3bcd09 Fix textarea HTML rendering and enforce light FilePond panels 2026-03-01 12:11:08 +01:00
Jürgen Mummert 84a6f118dc Adjust organization address fields and brighten FilePond preview 2026-03-01 12:00:46 +01:00
Jürgen Mummert 3176e6e414 Fix FilePond label interaction CSS conflicts 2026-03-01 11:52:43 +01:00
Jürgen Mummert 83c632f2dc Tune FilePond panel aspect ratios 2026-03-01 11:34:24 +01:00
5 changed files with 92 additions and 7 deletions
@@ -15,6 +15,43 @@
width: 400px; width: 400px;
height: 600px; height: 600px;
} }
.module-event-edit .filepond--root .filepond--drop-label {
height: 100%;
inset: 0;
}
.module-event-edit .filepond--root .filepond--drop-label label {
display: block;
width: auto;
float: none;
margin: 0;
padding: 0;
text-align: center;
font-weight: inherit;
}
.module-event-edit .filepond--root .filepond--drop-label,
.module-event-edit .filepond--root .filepond--drop-label label,
.module-event-edit .filepond--root .filepond--file-action-button {
pointer-events: auto;
}
.module-event-edit .filepond--root .filepond--image-preview-wrapper {
background: #f7f7f7;
}
.module-event-edit .filepond--root .filepond--panel-root,
.module-event-edit .filepond--root .filepond--item-panel,
.module-event-edit .filepond--root .filepond--image-preview {
background-color: #f7f7f7 !important;
}
.module-event-edit .filepond--root .filepond--image-preview-overlay-idle,
.module-event-edit .filepond--root .filepond--image-preview-overlay-success,
.module-event-edit .filepond--root .filepond--image-preview-overlay-failure {
background: rgba(255, 255, 255, 0.65);
}
</style> </style>
<script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script> <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
@@ -232,6 +269,8 @@
storeAsFile: true, storeAsFile: true,
allowMultiple: false, allowMultiple: false,
allowReplace: true, allowReplace: true,
stylePanelAspectRatio: 0.6666667,
styleItemPanelAspectRatio: 0.6666667,
credits: false, credits: false,
acceptedFileTypes: ['image/*'], acceptedFileTypes: ['image/*'],
allowImageResize: true, allowImageResize: true,
@@ -13,6 +13,43 @@
width: 400px; width: 400px;
height: 400px; height: 400px;
} }
.module-organization-edit .filepond--root .filepond--drop-label {
height: 100%;
inset: 0;
}
.module-organization-edit .filepond--root .filepond--drop-label label {
display: block;
width: auto;
float: none;
margin: 0;
padding: 0;
text-align: center;
font-weight: inherit;
}
.module-organization-edit .filepond--root .filepond--drop-label,
.module-organization-edit .filepond--root .filepond--drop-label label,
.module-organization-edit .filepond--root .filepond--file-action-button {
pointer-events: auto;
}
.module-organization-edit .filepond--root .filepond--image-preview-wrapper {
background: #f7f7f7;
}
.module-organization-edit .filepond--root .filepond--panel-root,
.module-organization-edit .filepond--root .filepond--item-panel,
.module-organization-edit .filepond--root .filepond--image-preview {
background-color: #f7f7f7 !important;
}
.module-organization-edit .filepond--root .filepond--image-preview-overlay-idle,
.module-organization-edit .filepond--root .filepond--image-preview-overlay-success,
.module-organization-edit .filepond--root .filepond--image-preview-overlay-failure {
background: rgba(255, 255, 255, 0.65);
}
</style> </style>
<script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script>
<script src="https://unpkg.com/filepond/dist/filepond.min.js"></script> <script src="https://unpkg.com/filepond/dist/filepond.min.js"></script>
@@ -93,6 +130,8 @@
storeAsFile: true, storeAsFile: true,
allowMultiple: false, allowMultiple: false,
allowReplace: true, allowReplace: true,
stylePanelAspectRatio: 1,
styleItemPanelAspectRatio: 1,
credits: false, credits: false,
acceptedFileTypes: ['image/*'], acceptedFileTypes: ['image/*'],
allowImageResize: true, allowImageResize: true,
@@ -70,14 +70,13 @@ class OrganizationEditController extends AbstractFrontendModuleController
$formData = [ $formData = [
'title' => (string) ($organization['title'] ?? ''), 'title' => (string) ($organization['title'] ?? ''),
'street' => (string) ($organization['street'] ?? ''), 'street' => (string) ($organization['street'] ?? ''),
'street2' => (string) ($organization['street2'] ?? ''),
'postal' => (string) ($organization['postal'] ?? ''), 'postal' => (string) ($organization['postal'] ?? ''),
'city' => (string) ($organization['city'] ?? ''), 'city' => (string) ($organization['city'] ?? ''),
'state' => (string) ($organization['state'] ?? ''),
'country' => (string) ($organization['country'] ?? ''),
'phone' => (string) ($organization['phone'] ?? ''), 'phone' => (string) ($organization['phone'] ?? ''),
'email' => (string) ($organization['email'] ?? ''), 'email' => (string) ($organization['email'] ?? ''),
'website' => (string) ($organization['website'] ?? ''), 'website' => (string) ($organization['website'] ?? ''),
'description' => (string) ($organization['description'] ?? ''), 'description' => $this->normalizeTextareaDescription((string) ($organization['description'] ?? '')),
'tags' => $this->organizationRepository->getTagIdsForOrganization($organizationId), 'tags' => $this->organizationRepository->getTagIdsForOrganization($organizationId),
]; ];
@@ -219,4 +218,14 @@ class OrganizationEditController extends AbstractFrontendModuleController
return $page instanceof PageModel ? $this->generateContentUrl($page) : '/'; return $page instanceof PageModel ? $this->generateContentUrl($page) : '/';
} }
private function normalizeTextareaDescription(string $value): string
{
$decoded = html_entity_decode($value, ENT_QUOTES | ENT_HTML5, 'UTF-8');
$decoded = preg_replace('/<\s*br\s*\/?>/i', "\n", $decoded) ?? $decoded;
$decoded = preg_replace('/<\s*\/p\s*>\s*<\s*p[^>]*>/i', "\n\n", $decoded) ?? $decoded;
$decoded = strip_tags($decoded);
return trim($decoded);
}
} }
+1 -2
View File
@@ -20,10 +20,9 @@ class OrganizationType extends AbstractType
$builder $builder
->add('title', TextType::class, ['label' => 'Titel', 'required' => true]) ->add('title', TextType::class, ['label' => 'Titel', 'required' => true])
->add('street', TextType::class, ['label' => 'Straße', 'required' => false]) ->add('street', TextType::class, ['label' => 'Straße', 'required' => false])
->add('street2', TextType::class, ['label' => 'Weitere Adressangaben', 'required' => false])
->add('postal', TextType::class, ['label' => 'PLZ', 'required' => false]) ->add('postal', TextType::class, ['label' => 'PLZ', 'required' => false])
->add('city', TextType::class, ['label' => 'Ort', 'required' => false]) ->add('city', TextType::class, ['label' => 'Ort', 'required' => false])
->add('state', TextType::class, ['label' => 'Bundesland', 'required' => false])
->add('country', TextType::class, ['label' => 'Land', 'required' => false])
->add('phone', TextType::class, ['label' => 'Telefon', 'required' => false]) ->add('phone', TextType::class, ['label' => 'Telefon', 'required' => false])
->add('email', EmailType::class, ['label' => 'E-Mail', 'required' => false]) ->add('email', EmailType::class, ['label' => 'E-Mail', 'required' => false])
->add('website', TextType::class, ['label' => 'Webseite', 'required' => false]) ->add('website', TextType::class, ['label' => 'Webseite', 'required' => false])
+1 -2
View File
@@ -71,10 +71,9 @@ class OrganizationRepository
[ [
'title' => $data['title'] ?? '', 'title' => $data['title'] ?? '',
'street' => $data['street'] ?? '', 'street' => $data['street'] ?? '',
'street2' => $data['street2'] ?? '',
'postal' => $data['postal'] ?? '', 'postal' => $data['postal'] ?? '',
'city' => $data['city'] ?? '', 'city' => $data['city'] ?? '',
'state' => $data['state'] ?? '',
'country' => $data['country'] ?? '',
'phone' => $data['phone'] ?? '', 'phone' => $data['phone'] ?? '',
'email' => $data['email'] ?? '', 'email' => $data['email'] ?? '',
'website' => $data['website'] ?? '', 'website' => $data['website'] ?? '',