A free open source IT asset/license management system
adds migration and translations
Godfrey M46a6a84ecbbb
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.phpnew file mode 100644index 0000000000..1d38c6b891--- /dev/null+++ b/database/migrations/2024_08_06_175114_add_shortcuts_enabled_to_settings_table.php@@ -0,0 +1,27 @@+<?php++use Illuminate\Database\Migrations\Migration;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Support\Facades\Schema;++return new class extends Migration {+ /**+ * Run the migrations.+ */+ public function up(): void+ {+ Schema::table('settings', function (Blueprint $table) {+ $table->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.phpindex 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 <a href=":webhook_link" target="_new" rel="noopener">create an incoming webhook</a> on your :app account. Click on the <strong>Test :app Integration</strong> 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' => '<strong>Windows</strong>: Alt + Access key, <strong>Mac</strong>: 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.phpindex 91d3b1c56f..379822314c 100644--- a/resources/views/settings/general.blade.php+++ b/resources/views/settings/general.blade.php@@ -163,6 +163,21 @@</div></div>+ <!-- Shortcuts enable -->+ <div class="form-group {{ $errors->has('shortcuts_enabled') ? 'error' : '' }}">+ <div class="col-md-3">+ <strong> {{ trans('admin/settings/general.shortcuts_enabled') }}</strong>+ </div>+ <div class="col-md-9">+ <label class="form-control">+ {{ Form::checkbox('shortcuts_enabled', '0', old('shortcuts_enabled', $setting->require_accept_signature)) }}+ {{ trans('general.yes') }}+ </label>+ {!! $errors->first('shortcuts_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ <p class="help-block">{!!trans('admin/settings/general.shortcuts_help_text') !!}</p>+ </div>+ </div>+<!-- Per Page --><div class="form-group {{ $errors->has('per_page') ? 'error' : '' }}">