feat: show tooltips for parking space option and omit price when 0,00

addresses #869ebkmhw
This commit is contained in:
Björn Fromme
2026-08-01 16:19:14 +02:00
parent 10d5356381
commit c929d4da3b
2 changed files with 12 additions and 7 deletions
@@ -657,11 +657,15 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
// There's only ever one parking type, so check readonly state against the single service // There's only ever one parking type, so check readonly state against the single service
$parkingService = reset($parkingServices); $parkingService = reset($parkingServices);
// Add service description as data attribute for frontend use
if (null !== $parkingService->description && '' !== trim($parkingService->description)) {
$fieldOptions['attr']['data-description'] = $parkingService->description;
}
if ($this->shouldMakeServiceReadonly($parkingService, $bookingDto, $participantIndex, 'parking')) { if ($this->shouldMakeServiceReadonly($parkingService, $bookingDto, $participantIndex, 'parking')) {
$fieldOptions['attr'] = [ $fieldOptions['attr']['readonly'] = true;
'readonly' => true, $fieldOptions['attr']['data-tooltip'] = 'ausgebucht';
'data-tooltip' => 'ausgebucht',
];
} }
return $fieldOptions; return $fieldOptions;
@@ -610,9 +610,10 @@
form.parking, form.parking,
'Parkplatz', 'Parkplatz',
parkingService.price|default(null), parkingService.price|default(null),
null, form.parking.vars.attr['data-description']|default(null),
null, 'Info',
htmxAttr htmxAttr,
false
) }} ) }}
{% endif %} {% endif %}
</table> </table>