diff --git a/app/controllers/resources/export.php b/app/controllers/resources/export.php index f0d5905a55e82f04f4aba6b9616c54af48d8d016..9d0fec7b5594d609f513f7236ec07f95fa6a90df 100644 --- a/app/controllers/resources/export.php +++ b/app/controllers/resources/export.php @@ -273,12 +273,14 @@ class Resources_ExportController extends AuthenticatedController PageLayout::postError( _('Der Startzeitpunkt darf nicht hinter dem Endzeitpunkt liegen!') ); + $this->redirect(Request::get('from')); return; } if (!$this->weekdays) { PageLayout::postError( _('Bitte mindestens einen Wochentag auswählen.') ); + $this->redirect(Request::get('from')); return; } diff --git a/app/views/resources/export/resource_bookings.php b/app/views/resources/export/resource_bookings.php index 144159067a649cdbe723e7514172c2116d128d8f..67840da18fd4ef0447d73bb2f8601645cbd4a5b0 100644 --- a/app/views/resources/export/resource_bookings.php +++ b/app/views/resources/export/resource_bookings.php @@ -1,6 +1,6 @@ <? if ($resource): ?> - <form class="default" method="post" - action="<?= $controller->link_for('resources/export/bookings')?>"> + <form class="default" method="post" action="<?= $controller->link_for('resources/export/bookings')?>"> + <input type="hidden" name="from" value="<?= $controller->resource_bookings($resource->id)?>"> <?= CSRFProtection::tokenTag() ?> <? if ($resource instanceof Room): ?> <input type="hidden" name="selected_rooms[]" diff --git a/app/views/resources/resource/export_bookings.php b/app/views/resources/resource/export_bookings.php index b9fdf435770cc3b2853ab5e5256c339fcb792d0c..641838197ee5c5984234bf08a9c03afcd5862448 100644 --- a/app/views/resources/resource/export_bookings.php +++ b/app/views/resources/resource/export_bookings.php @@ -1,6 +1,6 @@ <? if ($resource): ?> - <form class="default" method="post" - action="<?= $controller->link_for('resources/export/bookings')?>"> + <form class="default" method="post" action="<?= $controller->link_for('resources/export/bookings')?>"> + <input type="hidden" name="from" value="<?= $controller->export_bookings($resource->id)?>"> <?= CSRFProtection::tokenTag() ?> <? if ($resource instanceof Room): ?> <input type="hidden" name="selected_rooms[]"