Add a global setting for Ctrl-F focus (improve #14947) (#15023)

* Add a global setting for Ctrl-F focus (improve #14947)

* Move this new global setting to user setting (improve #14947)

* Update preferences.blade.php

Cleaner wording, and Copy & Paste bled through.

* Fix indents and @endif position in menu.blade.php

---------

Co-authored-by: Justin Lentz <monkeybrains7@gmail.com>
This commit is contained in:
Etienne Wan
2023-05-15 03:34:37 +02:00
committed by GitHub
parent 26c49af32d
commit 9af97a0395
4 changed files with 54 additions and 16 deletions

View File

@@ -75,6 +75,7 @@ class UserPreferencesController extends Controller
'site_styles' => $styles,
'timezone' => UserPref::getPref($user, 'timezone'),
'hide_dashboard_editor' => UserPref::getPref($user, 'hide_dashboard_editor') ?? 0,
'global_search_ctrlf_focus' => UserPref::getPref($user, 'global_search_ctrlf_focus'),
];
if (Config::get('twofactor')) {
@@ -116,6 +117,7 @@ class UserPreferencesController extends Controller
Rule::in(array_merge(['default'], timezone_identifiers_list())),
],
'hide_dashboard_editor' => 'required|integer',
'global_search_ctrlf_focus' => 'required|integer',
];
$this->validate($request, [