diff --git a/app/controllers/settings/general.php b/app/controllers/settings/general.php index dae18b49d10e925d84d385c9def3ae7d4b9352f2..3c17eb66dab0c54e24a636ac5730a6c03714bb9e 100644 --- a/app/controllers/settings/general.php +++ b/app/controllers/settings/general.php @@ -63,7 +63,6 @@ class Settings_GeneralController extends Settings_SettingsController } $this->config->store('PERSONAL_STARTPAGE', Request::int('personal_startpage')); - $this->config->store('ACCESSKEY_ENABLE', Request::int('accesskey_enable')); $this->config->store('SHOWSEM_ENABLE', Request::int('showsem_enable')); $this->config->store('SKIPLINKS_ENABLE', Request::int('skiplinks_enable')); $this->config->store('TOUR_AUTOSTART_DISABLE', Request::int('tour_autostart_disable')); diff --git a/app/views/settings/general.php b/app/views/settings/general.php index 5348975873a8d340d26adb5949cd071bd3ce8e36..a03ccf7a7b4735e30ba8192893ac353bdc13f93a 100644 --- a/app/views/settings/general.php +++ b/app/views/settings/general.php @@ -57,19 +57,6 @@ $start_pages = [ .'Zusätzlich wird der aktive Bereich einer Seite hervorgehoben.')) ?> </label> - <label> - <input type="checkbox" name="accesskey_enable" - aria-describedby="accesskey_enable_description" value="1" - <? if ($config->ACCESSKEY_ENABLE) echo 'checked'; ?>> - <?= _('Tastenkombinationen für Hauptfunktionen') ?> - <?= tooltipHtmlIcon(_('Mit dieser Einstellung können Sie für die meisten in der Kopfzeile ' - .'erreichbaren Hauptfunktionen eine Bedienung über Tastenkombinationen ' - .'aktivieren. <br>Die Tastenkombination wird im Tooltip des jeweiligen ' - .'Icons angezeigt.')." "._('Diese kann für jeden Browser und jedes Betriebssystem unterschiedlich ' - .'sein (siehe <a href="http://en.wikipedia.org/wiki/Accesskey" ' - .'target="_blank" rel="noopener noreferrer">Wikipedia</a>).')) ?> - </label> - <label> <input type="checkbox" name="showsem_enable" diff --git a/db/migrations/5.1.8_remove_access_key_enable.php b/db/migrations/5.1.8_remove_access_key_enable.php new file mode 100644 index 0000000000000000000000000000000000000000..c1f86246d3a6b88a9bb8c9803c1469555dcb055d --- /dev/null +++ b/db/migrations/5.1.8_remove_access_key_enable.php @@ -0,0 +1,27 @@ +<?php + +class RemoveAccessKeyEnable extends Migration +{ + public function description() + { + return 'Removes ACCESSKEY_ENABLE'; + } + + public function up() + { + $db = DBManager::get(); + $db->exec("DELETE FROM `config_values` WHERE `field` = 'ACCESSKEY_ENABLE'"); + $db->exec("DELETE FROM `config` WHERE `field` = 'ACCESSKEY_ENABLE'"); + } + + public function down() + { + $db = DBManager::get(); + $db->exec( + "INSERT INTO `config` + (`field`, `type`, `value`, `range`, `description`) + VALUES + ('ACCESSKEY_ENABLE', 'boolean', '', 'user', ' Schaltet die Nutzung von Shortcuts für einen User ein oder aus, Systemdefault')" + ); + } +} diff --git a/db/studip_default_data.sql b/db/studip_default_data.sql index 6b1706d55ac5f7575ab8801ea2bd1b51f2cbc2c4..6a050f7ede82afd55cc71bf4b33d137f82283296 100644 --- a/db/studip_default_data.sql +++ b/db/studip_default_data.sql @@ -127,7 +127,6 @@ INSERT INTO `colour_values` (`colour_id`, `description`, `value`, `mkdate`, `chd -- Dumping data for table `config` -- -INSERT INTO `config` (`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`) VALUES('ACCESSKEY_ENABLE', '', 'boolean', 'user', '', 0, 0, 'Schaltet die Nutzung von Shortcuts für einen User ein oder aus, Systemdefault'); INSERT INTO `config` (`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`) VALUES('ADMIN_COURSES_SHOW_COMPLETE', '1', 'boolean', 'global', 'global', 1462287310, 1462287310, 'Definiert, ob auf der Admin-Veranstaltunggseite der Komplett-Status für Veranstaltungen aufgeführt sein soll'); INSERT INTO `config` (`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`) VALUES('ADMIN_COURSES_SIDEBAR_ACTIVE_ELEMENTS', '', 'string', 'user', '', 0, 0, 'Diese Einstellung legt fest, welche Elemente in der Seitenleiste der Veranstaltungsübersicht für Admins sichtbar sind.'); INSERT INTO `config` (`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`) VALUES('ADMISSION_PRELIM_COMMENT_ENABLE', '1', 'boolean', 'global', '', 1153814966, 1153814966, 'Schaltet ein oder aus, ob ein Nutzer im Modus \"Vorläufiger Eintrag\" eine Bemerkung hinterlegen kann'); diff --git a/lib/include/header.php b/lib/include/header.php index 5a90479747b9467f1a0db2790f39a7fc4c1906ca..c0046fb3f977da56fe71f3e881fbb7c502d9728a 100644 --- a/lib/include/header.php +++ b/lib/include/header.php @@ -46,9 +46,6 @@ if (PageLayout::isHeaderEnabled()) //Einige Seiten benötigen keinen Header, spr $header_template->public_hint = _('öffentliche Veranstaltung'); } } - if ($GLOBALS['user']->cfg->ACCESSKEY_ENABLE) { - $header_template->accesskey_enabled = true; - } if (!$GLOBALS['user']->needsToAcceptTerms()) { $header_template->show_quicksearch = true; diff --git a/templates/header-navigation-item.php b/templates/header-navigation-item.php index 9b2157cdb3200e8c1bbab1afc444c0d7329694d2..a163140efee3383e6456fc3f2a48f8f9d18f921d 100644 --- a/templates/header-navigation-item.php +++ b/templates/header-navigation-item.php @@ -4,17 +4,6 @@ $attributes = $nav->getLinkAttributes(); $image_attributes = $nav->getImage()->getAttributes(); $attributes['title'] = $image_attributes['title']; -if ($accesskey_enabled) { - if (!isset($GLOBALS['accesskey-count'])) { - $GLOBALS['accesskey-count'] = 1; - } - - if ($GLOBALS['accesskey-count'] < 10) { - $attributes['title'] = "{$attributes['title']} [ALT] + {$GLOBALS['accesskey-count']}"; - $attributes['accesskey'] = $GLOBALS['accesskey-count']++; - } -} - // Add badge number to link attributes if ($nav->getBadgeNumber()) { $attributes['data-badge'] = (int)$nav->getBadgeNumber(); diff --git a/templates/header.php b/templates/header.php index 9ba491c57385993ed5526d9babe3683d5c5dedc6..87005524252fc7d328b9becabde68c3e9473c4a9 100644 --- a/templates/header.php +++ b/templates/header.php @@ -153,7 +153,7 @@ if (isset($_COOKIE['navigation-length'])) { <? foreach ($header_nav['visible'] as $path => $nav): ?> <?= $this->render_partial( 'header-navigation-item.php', - compact('path', 'nav', 'accesskey_enabled') + compact('path', 'nav') ) ?> <? endforeach; ?> <li class="overflow"> @@ -175,7 +175,7 @@ if (isset($_COOKIE['navigation-length'])) { <? foreach ($header_nav['hidden'] as $path => $nav) : ?> <?= $this->render_partial( 'header-navigation-item.php', - compact('path', 'nav', 'accesskey_enabled') + compact('path', 'nav') ) ?> <? endforeach; ?> </ul>