From dc6eb6f10454a1d8d7054d69e07f5965710d4001 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 18 Apr 2023 02:07:17 -0700 Subject: [PATCH] Throw a warning if there were no users affected Signed-off-by: snipe --- app/Http/Controllers/Licenses/LicenseCheckoutController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Licenses/LicenseCheckoutController.php b/app/Http/Controllers/Licenses/LicenseCheckoutController.php index 4eb108afc9..a710497692 100644 --- a/app/Http/Controllers/Licenses/LicenseCheckoutController.php +++ b/app/Http/Controllers/Licenses/LicenseCheckoutController.php @@ -184,6 +184,10 @@ class LicenseCheckoutController extends Controller } } + if ($assigned_count == 0) { + return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_no_avail_users', ['count' => $assigned_count])); + } + return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkout_all.success', 2, ['count' => $assigned_count] ));