#26 - Loading animation + success message fix
This commit was merged in pull request #31.
This commit is contained in:
@@ -74,6 +74,13 @@ class RsvFormReservationElementHandler implements RsvFormElementHandler {
|
||||
$price_per_block = (float) $def->getAttr('price_per_block', 0);
|
||||
$result->setValue($name . '_price', $price_per_block * count($payload['timetable_reservations']));
|
||||
|
||||
$slots = array_map(fn($t) => [
|
||||
'start_utc' => (new DateTime($t))->format(DateTime::ATOM),
|
||||
'end_utc' => $this->end_from_start(new DateTime($t), $timetable->block_size)->format(DateTime::ATOM),
|
||||
'price' => $price_per_block,
|
||||
], $payload['timetable_reservations']);
|
||||
$result->setValue('slots', array_merge($result->getValue('slots') ?? [], $slots));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user