From 1eeb984c1eea61b434c7d37131d82cef9fc975e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Gl=C3=B6ggler?= <till@gundk.it> Date: Mon, 11 Oct 2021 13:24:42 +0200 Subject: [PATCH] fixes #216 --- app/controllers/course/room_requests.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/controllers/course/room_requests.php b/app/controllers/course/room_requests.php index cd82c2d78c5..08daf9895cc 100644 --- a/app/controllers/course/room_requests.php +++ b/app/controllers/course/room_requests.php @@ -891,6 +891,8 @@ class Course_RoomRequestsController extends AuthenticatedController } return; } elseif (Request::submitted('save') || Request::submitted('save_and_close')) { + // if a closed request is stored again, reopen it + if ($this->seats < 1) { PageLayout::postError( _('Es wurde keine Anzahl an Sitzplätzen angegeben!') @@ -931,6 +933,11 @@ class Course_RoomRequestsController extends AuthenticatedController $this->request->category_id = $this->category_id; } + if ($this->request->closed != 0) { + PageLayout::postInfo(_('Die Raumanfrage wurde wieder geöffnet und damit erneut gestellt.')); + $this->request->closed = 0; + } + $storing_successful = false; if ($this->request->isDirty()) { $storing_successful = $this->request->store(); -- GitLab