From 891009dc672c68c10d3a0c1b5bfdaf725fb40df3 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 18 May 2022 15:35:57 -0700 Subject: [PATCH] Nicer formatting for buttons in bulk user edit Signed-off-by: snipe --- .../Controllers/Users/BulkUsersController.php | 5 ++- resources/lang/en/general.php | 1 + resources/views/users/bulk-edit.blade.php | 37 +++++++++++++++---- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Users/BulkUsersController.php b/app/Http/Controllers/Users/BulkUsersController.php index 6bf52a114a..3be8a06369 100644 --- a/app/Http/Controllers/Users/BulkUsersController.php +++ b/app/Http/Controllers/Users/BulkUsersController.php @@ -91,7 +91,10 @@ class BulkUsersController extends Controller ->conditionallyAddItem('company_id') ->conditionallyAddItem('locale') ->conditionallyAddItem('remote') + ->conditionallyAddItem('ldap_sync') ->conditionallyAddItem('activated'); + + //dd($this); // If the manager_id is one of the users being updated, generate a warning. if (array_search($request->input('manager_id'), $user_raw_array)) { @@ -107,7 +110,7 @@ class BulkUsersController extends Controller User::whereIn('id', $user_raw_array) ->where('id', '!=', Auth::id())->update($this->update_array); - if(array_key_exists('location_id', $this->update_array)){ + if (array_key_exists('location_id', $this->update_array)){ Asset::where('assigned_type', User::class) ->whereIn('assigned_to', $user_raw_array) ->update(['location_id' => $this->update_array['location_id']]); diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 6ee22f68c7..03bddaef21 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -356,4 +356,5 @@ return [ 'checkout_user_tooltip' => 'Check this item out to a user', 'maintenance_mode' => 'The service is temporarily unavailable for system updates. Please check back later.', 'maintenance_mode_title' => 'System Temporarily Unavilable', + 'ldap_import' => 'User password should not be managed by LDAP. (This allows you to send forgotten password requests.)', ]; \ No newline at end of file diff --git a/resources/views/users/bulk-edit.blade.php b/resources/views/users/bulk-edit.blade.php index 9e7bdefba0..11082f20f0 100644 --- a/resources/views/users/bulk-edit.blade.php +++ b/resources/views/users/bulk-edit.blade.php @@ -13,6 +13,12 @@ {{-- Page content --}} @section('content') + +
@@ -69,28 +75,43 @@ {{ trans('admin/users/general.remote') }}
-
+
+ +
+
+ {{ trans('general.ldap_sync') }} +
+
+
+ +
+
+
+
{{ trans('general.activated') }}
-
+