From dd22ae71e3c03e12d512b1d9348bdf9056f2f412 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 19 Sep 2019 14:17:03 +0200 Subject: [PATCH] Added alert/exit when no lehrauftrag was selected --- application/views/lehre/lehrauftrag/lehrauftrag.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/views/lehre/lehrauftrag/lehrauftrag.php b/application/views/lehre/lehrauftrag/lehrauftrag.php index 3362cb048..897e8f914 100644 --- a/application/views/lehre/lehrauftrag/lehrauftrag.php +++ b/application/views/lehre/lehrauftrag/lehrauftrag.php @@ -162,6 +162,13 @@ $(function() { var selected_data = $('#filterTabulator').tabulator('getSelectedData'); + // Alert and exit if no lehraufgang is selected + if (selected_data.length == 0) + { + FHC_DialogLib.alertInfo('Bitte wählen Sie erst zumindest einen Lehrauftrag'); + return; + } + FHC_AjaxClient.ajaxCallPost( FHC_JS_DATA_STORAGE_OBJECT.called_path + "/orderLehrauftrag", selected_data,