From 46a6a84ecbbb59c5428896cb98e93290f7c24a64 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 6 Aug 2024 11:07:39 -0700 Subject: [PATCH] adds migration and translations --- ...dd_shortcuts_enabled_to_settings_table.php | 27 +++++++++++++++++++ .../lang/en-US/admin/settings/general.php | 2 ++ resources/views/settings/general.blade.php | 15 +++++++++++ 3 files changed, 44 insertions(+) create mode 100644 database/migrations/2024_08_06_175114_add_shortcuts_enabled_to_settings_table.php diff --git a/database/migrations/2024_08_06_175114_add_shortcuts_enabled_to_settings_table.php b/database/migrations/2024_08_06_175114_add_shortcuts_enabled_to_settings_table.php new file mode 100644 index 0000000000..1d38c6b891 --- /dev/null +++ b/database/migrations/2024_08_06_175114_add_shortcuts_enabled_to_settings_table.php @@ -0,0 +1,27 @@ +boolean('shortcuts_enabled')->default(false); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('settings', function (Blueprint $table) { + $table->dropColumn('shortcuts_enabled'); + }); + } +}; diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.php index 9ba69ef22a..31165cf3f0 100644 --- a/resources/lang/en-US/admin/settings/general.php +++ b/resources/lang/en-US/admin/settings/general.php @@ -218,6 +218,8 @@ return [ 'webhook_integration_help' => ':app integration is optional, however the endpoint and channel are required if you wish to use it. To configure :app integration, you must first create an incoming webhook on your :app account. Click on the Test :app Integration button to confirm your settings are correct before saving. ', 'webhook_integration_help_button' => 'Once you have saved your :app information, a test button will appear.', 'webhook_test_help' => 'Test whether your :app integration is configured correctly. YOU MUST SAVE YOUR UPDATED :app SETTINGS FIRST.', + 'shortcuts_enabled' => 'Enable Shortcuts', + 'shortcuts_help_text' => 'Windows: Alt + Access key, Mac: Control + Option + Access key', 'snipe_version' => 'Snipe-IT version', 'support_footer' => 'Support Footer Links ', 'support_footer_help' => 'Specify who sees the links to the Snipe-IT Support info and Users Manual', diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.php index 91d3b1c56f..379822314c 100644 --- a/resources/views/settings/general.blade.php +++ b/resources/views/settings/general.blade.php @@ -163,6 +163,21 @@ + +
+
+ {{ trans('admin/settings/general.shortcuts_enabled') }} +
+
+ + {!! $errors->first('shortcuts_enabled', '') !!} +

{!!trans('admin/settings/general.shortcuts_help_text') !!}

+
+
+