From 32c360f03274c0de5f6600981d30e6704ea8d0ac Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 5 Feb 2024 18:23:52 +0000 Subject: [PATCH 1/3] Re-added UI for load_remote Signed-off-by: snipe --- app/Http/Controllers/SettingsController.php | 1 + .../lang/en-US/admin/settings/general.php | 6 ++--- resources/views/settings/general.blade.php | 22 ++++++++++++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 873d764a25..b83e015070 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -356,6 +356,7 @@ class SettingsController extends Controller } $setting->default_eula_text = $request->input('default_eula_text'); + $setting->load_remote = $request->input('load_remote', 0); $setting->thumbnail_max_h = $request->input('thumbnail_max_h'); $setting->privacy_policy_link = $request->input('privacy_policy_link'); diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 0c572e0676..361b5a2567 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -67,7 +67,7 @@ return [ 'footer_text' => 'Additional Footer Text ', 'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using Github flavored markdown. Line breaks, headers, images, etc may result in unpredictable results.', 'general_settings' => 'General Settings', - 'general_settings_keywords' => 'company support, signature, acceptance, email format, username format, images, per page, thumbnail, eula, tos, dashboard, privacy', + 'general_settings_keywords' => 'company support, signature, acceptance, email format, username format, images, per page, thumbnail, eula, gravatar, tos, dashboard, privacy', 'general_settings_help' => 'Default EULA and more', 'generate_backup' => 'Generate Backup', 'google_workspaces' => 'Google Workspaces', @@ -122,8 +122,8 @@ return [ 'ldap_test' => 'Test LDAP', 'ldap_test_sync' => 'Test LDAP Synchronization', 'license' => 'Software License', - 'load_remote_text' => 'Remote Scripts', - 'load_remote_help_text' => 'This Snipe-IT install can load scripts from the outside world.', + 'load_remote' => 'Load Remote Scripts', + 'load_remote_help_text' => 'This Snipe-IT install can load scripts from the outside world. This will disable gravatar loading if unchecked.', 'login' => 'Login Attempts', 'login_attempt' => 'Login Attempt', 'login_ip' => 'IP Address', diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php index 49620d2e0b..8e352248bd 100644 --- a/resources/views/settings/general.blade.php +++ b/resources/views/settings/general.blade.php @@ -128,6 +128,25 @@ + +
+
+ {{ trans('admin/settings/general.load_remote') }} +
+
+ + +

+ {{ trans('admin/settings/general.load_remote_help_text') }} +

+ +
+
+
@@ -137,8 +156,9 @@ - {!! $errors->first('unique_serial', '') !!} +

{{ trans('admin/settings/general.unique_serial_help_text') }}

From a800fa07f9cc3f726a0fdf75651049737aa0d194 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 5 Feb 2024 18:27:58 +0000 Subject: [PATCH 2/3] Removed duplicate string Signed-off-by: snipe --- resources/lang/en-US/admin/settings/general.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 361b5a2567..e28c955c38 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -87,7 +87,6 @@ return [ 'ldap_integration' => 'LDAP Integration', 'ldap_settings' => 'LDAP Settings', 'ldap_client_tls_cert_help' => 'Client-Side TLS Certificate and Key for LDAP connections are usually only useful in Google Workspace configurations with "Secure LDAP." Both are required.', - 'ldap_client_tls_key' => 'LDAP Client-Side TLS key', 'ldap_location' => 'LDAP Location', 'ldap_location_help' => 'The Ldap Location field should be used if an OU is not being used in the Base Bind DN. Leave this blank if an OU search is being used.', 'ldap_login_test_help' => 'Enter a valid LDAP username and password from the base DN you specified above to test whether your LDAP login is configured correctly. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.', From 3806cec10ec175b0bdd27072331def765b0d07d8 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 5 Feb 2024 18:28:05 +0000 Subject: [PATCH 3/3] Updated language Signed-off-by: snipe --- resources/lang/en-US/admin/settings/general.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index e28c955c38..33cfd7b416 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -121,8 +121,8 @@ return [ 'ldap_test' => 'Test LDAP', 'ldap_test_sync' => 'Test LDAP Synchronization', 'license' => 'Software License', - 'load_remote' => 'Load Remote Scripts', - 'load_remote_help_text' => 'This Snipe-IT install can load scripts from the outside world. This will disable gravatar loading if unchecked.', + 'load_remote' => 'Use Gravatar', + 'load_remote_help_text' => 'Uncheck this box if your install cannot load scripts from the outside internet. This will prevent Snipe-IT from trying load images from Gravatar.', 'login' => 'Login Attempts', 'login_attempt' => 'Login Attempt', 'login_ip' => 'IP Address',