Skip to content
Snippets Groups Projects
Commit 0e60b595 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

room_management/planning/booking_comments: select the first clipboard if no...

room_management/planning/booking_comments: select the first clipboard if no clipboard has been selected before, fixes #1624

Closes #1624

Merge request studip/studip!1058
parent 5fc6f7b9
No related branches found
No related tags found
No related merge requests found
...@@ -1092,6 +1092,10 @@ class RoomManagement_PlanningController extends AuthenticatedController ...@@ -1092,6 +1092,10 @@ class RoomManagement_PlanningController extends AuthenticatedController
//Add clipboard widget: //Add clipboard widget:
$clipboards = Clipboard::getClipboardsForUser($GLOBALS['user']->id); $clipboards = Clipboard::getClipboardsForUser($GLOBALS['user']->id);
if (!empty($clipboards)) { if (!empty($clipboards)) {
if (!$selected_clipboard_id) {
//Select the first clipboard so that the user doesn't have to select one first:
$selected_clipboard_id = $clipboards[0]->id;
}
$clipboard_widget = new SelectWidget( $clipboard_widget = new SelectWidget(
_('Individuelle Raumgruppen'), _('Individuelle Raumgruppen'),
$this->booking_commentsURL(), $this->booking_commentsURL(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment