Skip to content
Snippets Groups Projects
Commit af42c386 authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

redirect on error, closes #1773

Closes #1773

Merge request studip/studip!1252
parent 627f218b
Branches
No related tags found
No related merge requests found
......@@ -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;
}
......
<? 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[]"
......
<? 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[]"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment