diff options
| author | 2021-03-21 10:42:27 -0400 | |
|---|---|---|
| committer | 2021-03-21 15:42:27 +0100 | |
| commit | 4f4ce3c71bb69e3b55029325901e3d16a8142376 (patch) | |
| tree | 294999820869f36345034f12e433cad32a4cf74a /app/views | |
| parent | e2533bd9468c6d46b991af7b9ad31d67a0a1cc17 (diff) | |
Remove shortcut validation (#3548)
Before, only standard shortcuts were supported. When other shortcuts were
configured, they were filtered out.
Now, those shortcuts are stored in the configuration and an alert message
is displayed to alert the user that he is using non-standard shortcuts.
See #3481
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/shortcut.phtml | 8 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index 2194457ee..719fb4713 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -11,9 +11,15 @@ <?php $s = FreshRSS_Context::$user_conf->shortcuts; ?> + <legend><?= _t('conf.shortcut') ?></legend> + <?php if ([] !== $nonStandard = getNonStandardShortcuts($s)): ?> + <p class="alert alert-error"> + <?= _t('conf.shortcut.non_standard', implode('</kbd>, <kbd>', $nonStandard)) ?> + </p> + <?php endif; ?> + <form method="post" action="<?= _url('configure', 'shortcut') ?>"> <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> - <legend><?= _t('conf.shortcut') ?></legend> <noscript><p class="alert alert-error"><?= _t('conf.shortcut.javascript') ?></p></noscript> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 089175f7d..c6600a9a8 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -1,6 +1,6 @@ <?php $mark = FreshRSS_Context::$user_conf->mark_when; -$s = validateShortcutList(FreshRSS_Context::$user_conf->shortcuts); +$s = FreshRSS_Context::$user_conf->shortcuts; $extData = Minz_ExtensionManager::callHook('js_vars', []); echo htmlspecialchars(json_encode(array( 'context' => array( |
