diff --git a/app/controllers/news.php b/app/controllers/news.php index 745dafddee64e60711d953921ebc7d0111da1646..4b9eb60754fc350deb4e089cd9233bae1d898f28 100644 --- a/app/controllers/news.php +++ b/app/controllers/news.php @@ -40,6 +40,10 @@ class NewsController extends StudipController 'title' => _('Stud.IP (systemweit)'), 'icon' => 'home', ], + 'login' => [ + 'title' => _('Stud.IP (login)'), + 'icon' => 'door-enter', + ], 'inst' => [ 'title' => _('Einrichtungen'), 'icon' => 'institute', diff --git a/db/migrations/6.0.31_add_login_news_config.php b/db/migrations/6.0.31_add_login_news_config.php new file mode 100644 index 0000000000000000000000000000000000000000..cd234ebf3921a1964283c441f6bf1d868250e1d4 --- /dev/null +++ b/db/migrations/6.0.31_add_login_news_config.php @@ -0,0 +1,39 @@ +<?php + +final class AddLoginNewsConfig extends Migration +{ + public function description() + { + return 'Add configs for login news'; + } + + public function up() + { + $query = 'INSERT INTO `config` (`field`, `value`, `type`, `section`, `range`, `description`, `mkdate`, `chdate`) + VALUES (:name, :value, :type, :section, :range, :description, UNIX_TIMESTAMP(), UNIX_TIMESTAMP())'; + $statement = DBManager::get()->prepare($query); + $statement->execute([ + 'name' => 'LOGIN_NEWS_VISIBILITY', + 'value' => '1', + 'type' => 'boolean', + 'section' => 'Loginseite', + 'range' => 'global', + 'description' => 'Soll Ankündigungs-Galerie auf der Loginseite sichtbar sein?' + ]); + } + + public function down() + { + $query = "DELETE `config`, `config_values`, `i18n` + FROM `config` + LEFT JOIN `config_values` USING (`field`) + LEFT JOIN `i18n` + ON `table` = 'config' + AND `field` = 'value' + AND `object_id` = MD5(`config`.`field`) + WHERE `field` IN ( + 'LOGIN_NEWS_VISIBILITY' + )"; + DBManager::get()->exec($query); + } +} \ No newline at end of file diff --git a/lib/classes/forms/NewsRangesInput.php b/lib/classes/forms/NewsRangesInput.php index 1a4a830e4994a0c67d42dbeb9932ed27c548a961..abf95c7e24935b756f382993df4c867b8919b532 100644 --- a/lib/classes/forms/NewsRangesInput.php +++ b/lib/classes/forms/NewsRangesInput.php @@ -12,6 +12,7 @@ class NewsRangesInput extends Input $items = []; $icons = [ 'global' => 'home', + 'login' => 'door-enter', 'sem' => 'seminar', 'inst' => 'institute', 'user' => 'person' @@ -115,6 +116,10 @@ class NewsRangesInput extends Input 'value' => 'studip__home', 'name' => _('Stud.IP-Startseite'), ]; + $options[] = [ + 'value' => 'login', + 'name' => _('Stud.IP-Loginseite'), + ]; } $options[] = [ diff --git a/lib/functions.php b/lib/functions.php index 893c4a4e900f5d935987ef8ba0b6a4c1de4e9189..39fb96655df9f5a4e60e9f9e5b538198744b07e1 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -200,6 +200,10 @@ function get_object_type($id, $check_only = []) return 'global'; } + if ($id === 'login') { + return 'login'; + } + // Initialize cache array if ($cache === null) { $cache = new StudipCachedArray('Studip/ObjectTypes'); diff --git a/lib/models/NewsRange.php b/lib/models/NewsRange.php index 675478f5ce0146e6a5d5a71dfc2a05339d6b0926..94c76c29dfa53ded2bc87d7e9233e8db1db66f6b 100644 --- a/lib/models/NewsRange.php +++ b/lib/models/NewsRange.php @@ -56,6 +56,9 @@ class NewsRange extends SimpleORMap case 'global': return _('Stud.IP-Startseite'); break; + case 'login': + return _('Stud.IP-Loginseite'); + break; case 'sem': return $this->course->name; break; diff --git a/lib/models/StudipNews.php b/lib/models/StudipNews.php index 2311d66ee72c7cf0b83c87e85e9d147914e4f079..c00e4a5d95bf5b1b585dd73b17110d4624b62a09 100644 --- a/lib/models/StudipNews.php +++ b/lib/models/StudipNews.php @@ -237,6 +237,7 @@ class StudipNews extends SimpleORMap implements PrivacyObject $where_querypart[] = "topic LIKE CONCAT('%', ?, '%')"; $query_vars[] = $term; } + switch ($area) { case 'global': $select_querypart = 'CONCAT(news_id, "_studip") AS idx, range_id, news.* '; @@ -249,6 +250,17 @@ class StudipNews extends SimpleORMap implements PrivacyObject } $query_vars[] = 'studip'; break; + case 'login': + $select_querypart = 'CONCAT(news_id, "_studip") AS idx, range_id, news.* '; + $from_querypart = 'news_range INNER JOIN news USING(news_id)'; + $where_querypart[] = 'range_id = ?'; + if (Config::get()->SORT_NEWS_BY_CHDATE) { + $order_querypart = 'news.chdate DESC, news.date DESC'; + } else { + $order_querypart = 'news.date DESC, news.chdate DESC'; + } + $query_vars[] = 'login'; + break; case 'sem': $select_querypart = 'CONCAT(news_id, "_", range_id) AS idx, range_id, seminare.Name AS title, ' .'news.*, ' @@ -280,7 +292,7 @@ class StudipNews extends SimpleORMap implements PrivacyObject } break; default: - foreach (['global', 'inst', 'sem', 'user'] as $type) { + foreach (['global', 'login', 'inst', 'sem', 'user'] as $type) { $add_news = static::GetNewsRangesByFilter($user_id, $type, $term, $startdate, $enddate, $as_objects, $limit); if (is_array($add_news) && isset($add_news[$type])) { $limit = $limit - count($add_news[$type]); @@ -321,6 +333,9 @@ class StudipNews extends SimpleORMap implements PrivacyObject } elseif ($area === 'global') { $objects[$area][$id]['title'] = _('Ankündigungen auf der Stud.IP Startseite'); } + elseif ($area === 'login') { + $objects[$area][$id]['title'] = _('Ankündigungen auf der Stud.IP Loginseite'); + } if ($as_objects) { $objects[$area][$id]['object'] = self::build($result, false); } diff --git a/lib/navigation/LoginNavigation.php b/lib/navigation/LoginNavigation.php index 7eb3cf04b1250b7a1d0a7de0d8715dda9054d47d..4b4241c7c4632e9234842bcbe502960271cf985d 100644 --- a/lib/navigation/LoginNavigation.php +++ b/lib/navigation/LoginNavigation.php @@ -45,21 +45,5 @@ class LoginNavigation extends Navigation $this->addSubNavigation('login_' . $auth_plugin->plugin_name, $navigation); } } - - if (Config::get()->ENABLE_SELF_REGISTRATION) { - $navigation = new Navigation(_('Registrieren'), 'dispatch.php/registration'); - $navigation->setDescription(_('um das System erstmalig zu nutzen')); - $this->addSubNavigation('registration', $navigation); - } - - if (Config::get()->ENABLE_FREE_ACCESS) { - $navigation = new Navigation(_('Freier Zugang'), 'dispatch.php/public_courses'); - $navigation->setDescription(_('ohne Registrierung')); - $this->addSubNavigation('browse', $navigation); - } - - $navigation = new Navigation(_('Hilfe'), format_help_url('Basis.Allgemeines')); - $navigation->setDescription(_('zu Bedienung und Funktionsumfang')); - $this->addSubNavigation('help', $navigation); } } diff --git a/lib/navigation/StudipNavigation.php b/lib/navigation/StudipNavigation.php index bc3fae9d9be8a907fadabd91b976a9ca4aba3e13..2ceed480af83f951187aef80d1fa4a7faa99ddfb 100644 --- a/lib/navigation/StudipNavigation.php +++ b/lib/navigation/StudipNavigation.php @@ -143,19 +143,6 @@ class StudipNavigation extends Navigation // quick links $links = new Navigation('Links'); - // login / logout - if (!isset($user) || $user->id === 'nobody') { - if (in_array('CAS', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { - $links->addSubNavigation('login_cas', new Navigation(_('Login CAS'), Request::url(), ['again' => 'yes', 'sso' => 'cas', 'cancel_login' => 1])); - } - - if (in_array('Shib', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { - $links->addSubNavigation('login_shib', new Navigation(_('Login Shibboleth'), Request::url(), ['again' => 'yes', 'sso' => 'shib', 'cancel_login' => 1])); - } - - $links->addSubNavigation('login', new Navigation(_('Login'), Request::url(), ['again' => 'yes'])); - } - $this->addSubNavigation('links', $links); // footer links diff --git a/lib/phplib/Seminar_Auth.php b/lib/phplib/Seminar_Auth.php index 546d6d8393731f31046143b74321acb6946531c4..17d8b897a222e8fb200095e99de77998402eeb75 100644 --- a/lib/phplib/Seminar_Auth.php +++ b/lib/phplib/Seminar_Auth.php @@ -316,15 +316,13 @@ class Seminar_Auth $_SESSION['contrast'] = 1; } - foreach (array_keys($GLOBALS['INSTALLED_LANGUAGES']) as $language_key) { - if (Request::submitted('set_language_' . $language_key)) { + if (Request::get('set_language') === $language_key) { $_SESSION['forced_language'] = $language_key; $_SESSION['_language'] = $language_key; } } } - $this->check_environment(); PageLayout::setBodyElementId('login'); @@ -340,6 +338,7 @@ class Seminar_Auth page_close(); die(); } else { + $news_entries = StudipNews::GetNewsByRange('login', true, false); unset($_SESSION['semi_logged_in']); // used by email activation $login_template = $GLOBALS['template_factory']->open('loginform'); if (isset($this->auth['uname']) && $this->error_msg) { @@ -348,13 +347,9 @@ class Seminar_Auth $login_template->set_attribute('error_msg', $this->error_msg); $login_template->set_attribute('uname', (isset($this->auth["uname"]) ? $this->auth["uname"] : Request::username('loginname'))); $login_template->set_attribute('self_registration_activated', Config::get()->ENABLE_SELF_REGISTRATION); - - $query = "SHOW TABLES LIKE 'login_faq'"; - $result = DBManager::get()->query($query); - - if ($result && $result->rowCount() > 0) { - $login_template->set_attribute('faq_entries', LoginFaq::findBySQL("1")); - } + $login_template->set_attribute('logout', Request::bool('logout', false)); + $login_template->set_attribute('faq_entries', LoginFaq::findBySQL("1")); + $login_template->set_attribute('news_entries', array_values($news_entries)); } PageLayout::setHelpKeyword('Basis.AnmeldungLogin'); $header_template = $GLOBALS['template_factory']->open('header'); diff --git a/lib/visual.inc.php b/lib/visual.inc.php index 2282a685124c5511e515ae88b680cf18f3da212f..751663f46dc4d243c6e41f932f29e8b273358f96 100644 --- a/lib/visual.inc.php +++ b/lib/visual.inc.php @@ -416,7 +416,7 @@ function tooltip2($text, $with_alt = TRUE, $with_popup = FALSE) { * @param bool $important render icon in "important" style * @param bool $html tooltip text is HTML content */ -function tooltipIcon($text, $important = false, $html = false): string +function tooltipIcon($text, $important = false, $html = false, bool $alt_info= false): string { if (!trim($text)) { return ''; @@ -424,7 +424,7 @@ function tooltipIcon($text, $important = false, $html = false): string // render tooltip $template = $GLOBALS['template_factory']->open('shared/tooltip'); - return $template->render(compact('text', 'important', 'html')); + return $template->render(compact('text', 'important', 'html', 'alt_info')); } /** diff --git a/public/assets/images/icons/black/faq.svg b/public/assets/images/icons/black/faq.svg new file mode 100644 index 0000000000000000000000000000000000000000..7775766a15c6a8ebdf2cdc99ec6049304e8de9db --- /dev/null +++ b/public/assets/images/icons/black/faq.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" d="M0 0h64v64H0z"/><g fill="##000000"><path d="M53.48 7.54H10.53c-3.59 0-6.52 2.94-6.52 6.52v25.45c0 3.59 2.94 6.52 6.52 6.52h8.65l.03 10.5c6.46-.02 11.93-4.5 13.5-10.5h20.78c3.59 0 6.52-2.94 6.52-6.52V14.06c0-3.59-2.94-6.52-6.52-6.52Zm3.02 31.97c0 1.67-1.36 3.02-3.02 3.02H29.67c0 4.55-2.92 8.44-6.98 9.89l-.02-9.89H10.53c-1.67 0-3.02-1.36-3.02-3.02V14.06c0-1.67 1.36-3.02 3.02-3.02h42.95c1.67 0 3.02 1.36 3.02 3.02z"/><path d="M15.39 20.31v4.6h5.83v2.31h-5.83v6.34h-2.91V18h9.81v2.3h-6.91Zm21.32 13.26h-2.24c-.25 0-.46-.06-.61-.19s-.28-.28-.36-.47l-1.16-3.17H25.9l-1.16 3.17q-.09.255-.33.45c-.17.14-.37.2-.61.2h-2.26L27.66 18h2.95l6.11 15.56Zm-5.11-5.88-1.89-5.18c-.09-.23-.19-.5-.29-.82q-.15-.48-.3-1.02a17 17 0 0 1-.58 1.86l-1.88 5.15h4.95Zm21.92 8.92h-2.39c-.34 0-.65-.05-.93-.14s-.53-.27-.76-.52l-2.28-2.52a8.6 8.6 0 0 1-2.32.31c-1.18 0-2.25-.2-3.22-.6s-1.8-.95-2.49-1.66-1.23-1.55-1.61-2.52-.57-2.03-.57-3.17.19-2.2.57-3.17.92-1.81 1.61-2.52 1.52-1.26 2.49-1.66 2.04-.6 3.22-.6c.79 0 1.53.09 2.23.27s1.33.44 1.92.77 1.1.74 1.57 1.22c.46.48.85 1.01 1.18 1.6.32.59.57 1.23.74 1.92s.25 1.41.25 2.17a8.7 8.7 0 0 1-.84 3.78c-.27.55-.6 1.06-.98 1.52-.39.46-.83.87-1.32 1.22l3.95 4.3ZM39.91 25.79c0 .85.12 1.62.34 2.3s.56 1.25.99 1.72.94.83 1.55 1.08 1.29.38 2.05.38 1.44-.13 2.05-.38 1.12-.61 1.54-1.08a4.9 4.9 0 0 0 .98-1.72c.23-.68.34-1.44.34-2.3s-.12-1.62-.34-2.3c-.23-.68-.56-1.25-.98-1.73-.42-.47-.94-.84-1.54-1.09s-1.29-.38-2.05-.38-1.44.13-2.05.38-1.12.61-1.55 1.09c-.43.47-.76 1.05-.99 1.73s-.34 1.44-.34 2.3"/></g></svg> \ No newline at end of file diff --git a/public/assets/images/icons/blue/faq.svg b/public/assets/images/icons/blue/faq.svg new file mode 100644 index 0000000000000000000000000000000000000000..1af2e2edb0041a35c02f37af987db7e281c7b4da --- /dev/null +++ b/public/assets/images/icons/blue/faq.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" d="M0 0h64v64H0z"/><g fill="#28497c"><path d="M53.48 7.54H10.53c-3.59 0-6.52 2.94-6.52 6.52v25.45c0 3.59 2.94 6.52 6.52 6.52h8.65l.03 10.5c6.46-.02 11.93-4.5 13.5-10.5h20.78c3.59 0 6.52-2.94 6.52-6.52V14.06c0-3.59-2.94-6.52-6.52-6.52Zm3.02 31.97c0 1.67-1.36 3.02-3.02 3.02H29.67c0 4.55-2.92 8.44-6.98 9.89l-.02-9.89H10.53c-1.67 0-3.02-1.36-3.02-3.02V14.06c0-1.67 1.36-3.02 3.02-3.02h42.95c1.67 0 3.02 1.36 3.02 3.02z"/><path d="M15.39 20.31v4.6h5.83v2.31h-5.83v6.34h-2.91V18h9.81v2.3h-6.91Zm21.32 13.26h-2.24c-.25 0-.46-.06-.61-.19s-.28-.28-.36-.47l-1.16-3.17H25.9l-1.16 3.17q-.09.255-.33.45c-.17.14-.37.2-.61.2h-2.26L27.66 18h2.95l6.11 15.56Zm-5.11-5.88-1.89-5.18c-.09-.23-.19-.5-.29-.82q-.15-.48-.3-1.02a17 17 0 0 1-.58 1.86l-1.88 5.15h4.95Zm21.92 8.92h-2.39c-.34 0-.65-.05-.93-.14s-.53-.27-.76-.52l-2.28-2.52a8.6 8.6 0 0 1-2.32.31c-1.18 0-2.25-.2-3.22-.6s-1.8-.95-2.49-1.66-1.23-1.55-1.61-2.52-.57-2.03-.57-3.17.19-2.2.57-3.17.92-1.81 1.61-2.52 1.52-1.26 2.49-1.66 2.04-.6 3.22-.6c.79 0 1.53.09 2.23.27s1.33.44 1.92.77 1.1.74 1.57 1.22c.46.48.85 1.01 1.18 1.6.32.59.57 1.23.74 1.92s.25 1.41.25 2.17a8.7 8.7 0 0 1-.84 3.78c-.27.55-.6 1.06-.98 1.52-.39.46-.83.87-1.32 1.22l3.95 4.3ZM39.91 25.79c0 .85.12 1.62.34 2.3s.56 1.25.99 1.72.94.83 1.55 1.08 1.29.38 2.05.38 1.44-.13 2.05-.38 1.12-.61 1.54-1.08a4.9 4.9 0 0 0 .98-1.72c.23-.68.34-1.44.34-2.3s-.12-1.62-.34-2.3c-.23-.68-.56-1.25-.98-1.73-.42-.47-.94-.84-1.54-1.09s-1.29-.38-2.05-.38-1.44.13-2.05.38-1.12.61-1.55 1.09c-.43.47-.76 1.05-.99 1.73s-.34 1.44-.34 2.3"/></g></svg> \ No newline at end of file diff --git a/public/assets/images/icons/green/faq.svg b/public/assets/images/icons/green/faq.svg new file mode 100644 index 0000000000000000000000000000000000000000..2b702afdd990247dd0eb71cd575c45861531f44e --- /dev/null +++ b/public/assets/images/icons/green/faq.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" d="M0 0h64v64H0z"/><g fill="#00962d"><path d="M53.48 7.54H10.53c-3.59 0-6.52 2.94-6.52 6.52v25.45c0 3.59 2.94 6.52 6.52 6.52h8.65l.03 10.5c6.46-.02 11.93-4.5 13.5-10.5h20.78c3.59 0 6.52-2.94 6.52-6.52V14.06c0-3.59-2.94-6.52-6.52-6.52Zm3.02 31.97c0 1.67-1.36 3.02-3.02 3.02H29.67c0 4.55-2.92 8.44-6.98 9.89l-.02-9.89H10.53c-1.67 0-3.02-1.36-3.02-3.02V14.06c0-1.67 1.36-3.02 3.02-3.02h42.95c1.67 0 3.02 1.36 3.02 3.02z"/><path d="M15.39 20.31v4.6h5.83v2.31h-5.83v6.34h-2.91V18h9.81v2.3h-6.91Zm21.32 13.26h-2.24c-.25 0-.46-.06-.61-.19s-.28-.28-.36-.47l-1.16-3.17H25.9l-1.16 3.17q-.09.255-.33.45c-.17.14-.37.2-.61.2h-2.26L27.66 18h2.95l6.11 15.56Zm-5.11-5.88-1.89-5.18c-.09-.23-.19-.5-.29-.82q-.15-.48-.3-1.02a17 17 0 0 1-.58 1.86l-1.88 5.15h4.95Zm21.92 8.92h-2.39c-.34 0-.65-.05-.93-.14s-.53-.27-.76-.52l-2.28-2.52a8.6 8.6 0 0 1-2.32.31c-1.18 0-2.25-.2-3.22-.6s-1.8-.95-2.49-1.66-1.23-1.55-1.61-2.52-.57-2.03-.57-3.17.19-2.2.57-3.17.92-1.81 1.61-2.52 1.52-1.26 2.49-1.66 2.04-.6 3.22-.6c.79 0 1.53.09 2.23.27s1.33.44 1.92.77 1.1.74 1.57 1.22c.46.48.85 1.01 1.18 1.6.32.59.57 1.23.74 1.92s.25 1.41.25 2.17a8.7 8.7 0 0 1-.84 3.78c-.27.55-.6 1.06-.98 1.52-.39.46-.83.87-1.32 1.22l3.95 4.3ZM39.91 25.79c0 .85.12 1.62.34 2.3s.56 1.25.99 1.72.94.83 1.55 1.08 1.29.38 2.05.38 1.44-.13 2.05-.38 1.12-.61 1.54-1.08a4.9 4.9 0 0 0 .98-1.72c.23-.68.34-1.44.34-2.3s-.12-1.62-.34-2.3c-.23-.68-.56-1.25-.98-1.73-.42-.47-.94-.84-1.54-1.09s-1.29-.38-2.05-.38-1.44.13-2.05.38-1.12.61-1.55 1.09c-.43.47-.76 1.05-.99 1.73s-.34 1.44-.34 2.3"/></g></svg> \ No newline at end of file diff --git a/public/assets/images/icons/grey/faq.svg b/public/assets/images/icons/grey/faq.svg new file mode 100644 index 0000000000000000000000000000000000000000..6c949d2b2654a5a6b7d08766059a393a828854b3 --- /dev/null +++ b/public/assets/images/icons/grey/faq.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" d="M0 0h64v64H0z"/><g fill="#6e6e6e"><path d="M53.48 7.54H10.53c-3.59 0-6.52 2.94-6.52 6.52v25.45c0 3.59 2.94 6.52 6.52 6.52h8.65l.03 10.5c6.46-.02 11.93-4.5 13.5-10.5h20.78c3.59 0 6.52-2.94 6.52-6.52V14.06c0-3.59-2.94-6.52-6.52-6.52Zm3.02 31.97c0 1.67-1.36 3.02-3.02 3.02H29.67c0 4.55-2.92 8.44-6.98 9.89l-.02-9.89H10.53c-1.67 0-3.02-1.36-3.02-3.02V14.06c0-1.67 1.36-3.02 3.02-3.02h42.95c1.67 0 3.02 1.36 3.02 3.02z"/><path d="M15.39 20.31v4.6h5.83v2.31h-5.83v6.34h-2.91V18h9.81v2.3h-6.91Zm21.32 13.26h-2.24c-.25 0-.46-.06-.61-.19s-.28-.28-.36-.47l-1.16-3.17H25.9l-1.16 3.17q-.09.255-.33.45c-.17.14-.37.2-.61.2h-2.26L27.66 18h2.95l6.11 15.56Zm-5.11-5.88-1.89-5.18c-.09-.23-.19-.5-.29-.82q-.15-.48-.3-1.02a17 17 0 0 1-.58 1.86l-1.88 5.15h4.95Zm21.92 8.92h-2.39c-.34 0-.65-.05-.93-.14s-.53-.27-.76-.52l-2.28-2.52a8.6 8.6 0 0 1-2.32.31c-1.18 0-2.25-.2-3.22-.6s-1.8-.95-2.49-1.66-1.23-1.55-1.61-2.52-.57-2.03-.57-3.17.19-2.2.57-3.17.92-1.81 1.61-2.52 1.52-1.26 2.49-1.66 2.04-.6 3.22-.6c.79 0 1.53.09 2.23.27s1.33.44 1.92.77 1.1.74 1.57 1.22c.46.48.85 1.01 1.18 1.6.32.59.57 1.23.74 1.92s.25 1.41.25 2.17a8.7 8.7 0 0 1-.84 3.78c-.27.55-.6 1.06-.98 1.52-.39.46-.83.87-1.32 1.22l3.95 4.3ZM39.91 25.79c0 .85.12 1.62.34 2.3s.56 1.25.99 1.72.94.83 1.55 1.08 1.29.38 2.05.38 1.44-.13 2.05-.38 1.12-.61 1.54-1.08a4.9 4.9 0 0 0 .98-1.72c.23-.68.34-1.44.34-2.3s-.12-1.62-.34-2.3c-.23-.68-.56-1.25-.98-1.73-.42-.47-.94-.84-1.54-1.09s-1.29-.38-2.05-.38-1.44.13-2.05.38-1.12.61-1.55 1.09c-.43.47-.76 1.05-.99 1.73s-.34 1.44-.34 2.3"/></g></svg> \ No newline at end of file diff --git a/public/assets/images/icons/red/faq.svg b/public/assets/images/icons/red/faq.svg new file mode 100644 index 0000000000000000000000000000000000000000..faec143d6bcf027aa6978ac861d609ff1e1a9ae9 --- /dev/null +++ b/public/assets/images/icons/red/faq.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" d="M0 0h64v64H0z"/><g fill="#cb1800"><path d="M53.48 7.54H10.53c-3.59 0-6.52 2.94-6.52 6.52v25.45c0 3.59 2.94 6.52 6.52 6.52h8.65l.03 10.5c6.46-.02 11.93-4.5 13.5-10.5h20.78c3.59 0 6.52-2.94 6.52-6.52V14.06c0-3.59-2.94-6.52-6.52-6.52Zm3.02 31.97c0 1.67-1.36 3.02-3.02 3.02H29.67c0 4.55-2.92 8.44-6.98 9.89l-.02-9.89H10.53c-1.67 0-3.02-1.36-3.02-3.02V14.06c0-1.67 1.36-3.02 3.02-3.02h42.95c1.67 0 3.02 1.36 3.02 3.02z"/><path d="M15.39 20.31v4.6h5.83v2.31h-5.83v6.34h-2.91V18h9.81v2.3h-6.91Zm21.32 13.26h-2.24c-.25 0-.46-.06-.61-.19s-.28-.28-.36-.47l-1.16-3.17H25.9l-1.16 3.17q-.09.255-.33.45c-.17.14-.37.2-.61.2h-2.26L27.66 18h2.95l6.11 15.56Zm-5.11-5.88-1.89-5.18c-.09-.23-.19-.5-.29-.82q-.15-.48-.3-1.02a17 17 0 0 1-.58 1.86l-1.88 5.15h4.95Zm21.92 8.92h-2.39c-.34 0-.65-.05-.93-.14s-.53-.27-.76-.52l-2.28-2.52a8.6 8.6 0 0 1-2.32.31c-1.18 0-2.25-.2-3.22-.6s-1.8-.95-2.49-1.66-1.23-1.55-1.61-2.52-.57-2.03-.57-3.17.19-2.2.57-3.17.92-1.81 1.61-2.52 1.52-1.26 2.49-1.66 2.04-.6 3.22-.6c.79 0 1.53.09 2.23.27s1.33.44 1.92.77 1.1.74 1.57 1.22c.46.48.85 1.01 1.18 1.6.32.59.57 1.23.74 1.92s.25 1.41.25 2.17a8.7 8.7 0 0 1-.84 3.78c-.27.55-.6 1.06-.98 1.52-.39.46-.83.87-1.32 1.22l3.95 4.3ZM39.91 25.79c0 .85.12 1.62.34 2.3s.56 1.25.99 1.72.94.83 1.55 1.08 1.29.38 2.05.38 1.44-.13 2.05-.38 1.12-.61 1.54-1.08a4.9 4.9 0 0 0 .98-1.72c.23-.68.34-1.44.34-2.3s-.12-1.62-.34-2.3c-.23-.68-.56-1.25-.98-1.73-.42-.47-.94-.84-1.54-1.09s-1.29-.38-2.05-.38-1.44.13-2.05.38-1.12.61-1.55 1.09c-.43.47-.76 1.05-.99 1.73s-.34 1.44-.34 2.3"/></g></svg> \ No newline at end of file diff --git a/public/assets/images/icons/white/accessibility.svg b/public/assets/images/icons/white/accessibility.svg new file mode 100644 index 0000000000000000000000000000000000000000..7bf95ab7f27e1d88101b4a88ab5ab22f3f70fb78 --- /dev/null +++ b/public/assets/images/icons/white/accessibility.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 54 54" xmlns="http://www.w3.org/2000/svg"><g fill="#fff"><path d="M27 8c10.5 0 19 8.5 19 19s-8.5 19-19 19S8 37.4 8 27 16.5 8 27 8m0-5C13.7 3 3 13.7 3 27s10.7 24 24 24 24-10.7 24-24S40.3 3 27 3"/><circle cx="27" cy="15" r="4"/><path d="M38.2 19.1c-.6-.9-1.7-1.1-2.7-.8l-5.8 2.1c-.8.4-1.8.6-2.7.6h-.2c-.9 0-1.9-.2-2.8-.5l-5.8-2.1c-1-.4-2.1-.1-2.7.8-.8 1.2-.2 2.8 1.1 3.3l7.4 2.7c.3.1.5.4.5.7v3.7c0 .3-.1.6-.2.9l-4.5 7.9c-.5.9-.4 2.1.3 2.8 1.1 1 2.7.7 3.4-.5l3.5-6.1 3.6 6.2c.6 1 1.9 1.4 3 .8 1-.6 1.4-2 .8-3.1l-4.6-7.9c-.2-.3-.2-.6-.2-.9v-3.8c0-.3.2-.6.5-.7l7.2-2.6c1.2-.6 1.8-2.2.9-3.5"/></g></svg> \ No newline at end of file diff --git a/public/assets/images/icons/white/faq.svg b/public/assets/images/icons/white/faq.svg new file mode 100644 index 0000000000000000000000000000000000000000..830012826ac955e24de916e9b7edee14c3a5ebf0 --- /dev/null +++ b/public/assets/images/icons/white/faq.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" d="M0 0h64v64H0z"/><g fill="#fff"><path d="M53.48 7.54H10.53c-3.59 0-6.52 2.94-6.52 6.52v25.45c0 3.59 2.94 6.52 6.52 6.52h8.65l.03 10.5c6.46-.02 11.93-4.5 13.5-10.5h20.78c3.59 0 6.52-2.94 6.52-6.52V14.06c0-3.59-2.94-6.52-6.52-6.52Zm3.02 31.97c0 1.67-1.36 3.02-3.02 3.02H29.67c0 4.55-2.92 8.44-6.98 9.89l-.02-9.89H10.53c-1.67 0-3.02-1.36-3.02-3.02V14.06c0-1.67 1.36-3.02 3.02-3.02h42.95c1.67 0 3.02 1.36 3.02 3.02z"/><path d="M15.39 20.31v4.6h5.83v2.31h-5.83v6.34h-2.91V18h9.81v2.3h-6.91Zm21.32 13.26h-2.24c-.25 0-.46-.06-.61-.19s-.28-.28-.36-.47l-1.16-3.17H25.9l-1.16 3.17q-.09.255-.33.45c-.17.14-.37.2-.61.2h-2.26L27.66 18h2.95l6.11 15.56Zm-5.11-5.88-1.89-5.18c-.09-.23-.19-.5-.29-.82q-.15-.48-.3-1.02a17 17 0 0 1-.58 1.86l-1.88 5.15h4.95Zm21.92 8.92h-2.39c-.34 0-.65-.05-.93-.14s-.53-.27-.76-.52l-2.28-2.52a8.6 8.6 0 0 1-2.32.31c-1.18 0-2.25-.2-3.22-.6s-1.8-.95-2.49-1.66-1.23-1.55-1.61-2.52-.57-2.03-.57-3.17.19-2.2.57-3.17.92-1.81 1.61-2.52 1.52-1.26 2.49-1.66 2.04-.6 3.22-.6c.79 0 1.53.09 2.23.27s1.33.44 1.92.77 1.1.74 1.57 1.22c.46.48.85 1.01 1.18 1.6.32.59.57 1.23.74 1.92s.25 1.41.25 2.17a8.7 8.7 0 0 1-.84 3.78c-.27.55-.6 1.06-.98 1.52-.39.46-.83.87-1.32 1.22l3.95 4.3ZM39.91 25.79c0 .85.12 1.62.34 2.3s.56 1.25.99 1.72.94.83 1.55 1.08 1.29.38 2.05.38 1.44-.13 2.05-.38 1.12-.61 1.54-1.08a4.9 4.9 0 0 0 .98-1.72c.23-.68.34-1.44.34-2.3s-.12-1.62-.34-2.3c-.23-.68-.56-1.25-.98-1.73-.42-.47-.94-.84-1.54-1.09s-1.29-.38-2.05-.38-1.44.13-2.05.38-1.12.61-1.55 1.09c-.43.47-.76 1.05-.99 1.73s-.34 1.44-.34 2.3"/></g></svg> \ No newline at end of file diff --git a/public/assets/images/icons/yellow/faq.svg b/public/assets/images/icons/yellow/faq.svg new file mode 100644 index 0000000000000000000000000000000000000000..9a39678af13b2f1344fc38884b39a06ce64c968d --- /dev/null +++ b/public/assets/images/icons/yellow/faq.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="none" d="M0 0h64v64H0z"/><g fill="#ffad00"><path d="M53.48 7.54H10.53c-3.59 0-6.52 2.94-6.52 6.52v25.45c0 3.59 2.94 6.52 6.52 6.52h8.65l.03 10.5c6.46-.02 11.93-4.5 13.5-10.5h20.78c3.59 0 6.52-2.94 6.52-6.52V14.06c0-3.59-2.94-6.52-6.52-6.52Zm3.02 31.97c0 1.67-1.36 3.02-3.02 3.02H29.67c0 4.55-2.92 8.44-6.98 9.89l-.02-9.89H10.53c-1.67 0-3.02-1.36-3.02-3.02V14.06c0-1.67 1.36-3.02 3.02-3.02h42.95c1.67 0 3.02 1.36 3.02 3.02z"/><path d="M15.39 20.31v4.6h5.83v2.31h-5.83v6.34h-2.91V18h9.81v2.3h-6.91Zm21.32 13.26h-2.24c-.25 0-.46-.06-.61-.19s-.28-.28-.36-.47l-1.16-3.17H25.9l-1.16 3.17q-.09.255-.33.45c-.17.14-.37.2-.61.2h-2.26L27.66 18h2.95l6.11 15.56Zm-5.11-5.88-1.89-5.18c-.09-.23-.19-.5-.29-.82q-.15-.48-.3-1.02a17 17 0 0 1-.58 1.86l-1.88 5.15h4.95Zm21.92 8.92h-2.39c-.34 0-.65-.05-.93-.14s-.53-.27-.76-.52l-2.28-2.52a8.6 8.6 0 0 1-2.32.31c-1.18 0-2.25-.2-3.22-.6s-1.8-.95-2.49-1.66-1.23-1.55-1.61-2.52-.57-2.03-.57-3.17.19-2.2.57-3.17.92-1.81 1.61-2.52 1.52-1.26 2.49-1.66 2.04-.6 3.22-.6c.79 0 1.53.09 2.23.27s1.33.44 1.92.77 1.1.74 1.57 1.22c.46.48.85 1.01 1.18 1.6.32.59.57 1.23.74 1.92s.25 1.41.25 2.17a8.7 8.7 0 0 1-.84 3.78c-.27.55-.6 1.06-.98 1.52-.39.46-.83.87-1.32 1.22l3.95 4.3ZM39.91 25.79c0 .85.12 1.62.34 2.3s.56 1.25.99 1.72.94.83 1.55 1.08 1.29.38 2.05.38 1.44-.13 2.05-.38 1.12-.61 1.54-1.08a4.9 4.9 0 0 0 .98-1.72c.23-.68.34-1.44.34-2.3s-.12-1.62-.34-2.3c-.23-.68-.56-1.25-.98-1.73-.42-.47-.94-.84-1.54-1.09s-1.29-.38-2.05-.38-1.44.13-2.05.38-1.12.61-1.55 1.09c-.43.47-.76 1.05-.99 1.73s-.34 1.44-.34 2.3"/></g></svg> \ No newline at end of file diff --git a/public/logout.php b/public/logout.php index 76d079df29e4aae3e2bf4fa922be52992c24c385..6f941949c4cc5cf585d92c726484a0d6859f94cc 100644 --- a/public/logout.php +++ b/public/logout.php @@ -90,4 +90,4 @@ if ($auth->auth['uid'] !== 'nobody') { page_close(); } -header('Location: ' . URLHelper::getURL('index.php')); +header('Location: ' . URLHelper::getURL('index.php?logout=1')); diff --git a/resources/assets/stylesheets/scss/index.scss b/resources/assets/stylesheets/scss/index.scss index 046d027940f972c07d704d4b906eb88e3b28c432..134fd9a97b7b2960284f7155d6de856f653df163 100644 --- a/resources/assets/stylesheets/scss/index.scss +++ b/resources/assets/stylesheets/scss/index.scss @@ -34,11 +34,8 @@ $gap-between-boxes: calc($login-page-margin / 2); z-index: -1; } -#index, -#login { - #content { - padding: $login-page-margin; - } +#index #content { + padding: $login-page-margin; } #login_flex { @@ -50,83 +47,299 @@ $gap-between-boxes: calc($login-page-margin / 2); align-items: flex-start; } -#loginbox { - background-color: var(--white); +#login-wrapper { + margin: auto; + display: flex; + flex-direction: column; + position: relative; + top: -100px; +} + +#login-content-wrapper { + position: relative; + height: 540px; + display: flex; box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); - padding: 20px; - width: 450px; - float: left; - header { - margin: 0 0 0 0; + #login-infobox { + max-width: 540px; + min-width: 540px; + height: calc(100% - 64px); + padding: 32px 64px 32px 32px; + background-color: rgba(255, 255, 255, 0.8); + color: var(--black); + position: relative; + + &.no-toggle { + padding: 32px; + } - h1 { - border-bottom: 0; + &.hide { + display: none; } - } - nav { - ul { - display: inline-block; - list-style-type: none; - margin: 0; - width: 450px; - padding-inline-start: 0; - - .login_link { - display: inline-block; - width: 180px; - vertical-align: top; - padding-right: 25px; - - a { - font-size: 1.5em; - - p { - font-size: 0.5em; - color: var(--black); - } + #login-infobox-button-wrapper { + position: absolute; + right: 24px; + top: 32px; + gap: 4px; + display: flex; + flex-direction: column; + background-color: var(--white); + + button { + border: none; + background-color: transparent; + cursor: pointer; + padding: 4px 4px 4px 8px; + border-left: solid 4px var(--white); + + &.selected { + border-color: var(--base-color); + } + + &:hover:not(.selected) { + border-color: var(--content-color); } } } + + .hidden { + visibility: hidden; + height: 0; + padding: 0; + overflow: hidden; + } } +} - footer { - overflow: auto; +#login-faq-box { + background-color: var(--white); + padding: 8px 16px 8px 32px; + height: calc(100% - 16px); + position: relative; + overflow-y: auto; - #languages, - #contrast { - display: flex; - align-items: center; - gap: 5px; - border-top: 1px solid var(--light-gray-color); - font-size: 0.9em; - padding: 10px; + #login-faq-content-wrapper { + height: calc(100% - 32px); + } + + .login-box-header { + h2 { + margin-bottom: 20px; + margin-left: 0.5ex; + } + } + .login-faq-content { + overflow-y: auto; + padding-right: 16px; + height: calc(100% - 64px); + + article.studip { + margin-bottom: 1.5ex; } + } +} - #contrast { - padding-bottom: 0; +#login-news-box { + display: flex; + flex-direction: column; + height: 100%; + justify-content: space-between; + + #login-news-content-wrapper { + height: calc(100% - 60px); + flex-grow: 1; + background-color: var(--white); + padding: 8px 16px 8px 32px; + margin-bottom: 16px; + position: relative; + + #show-faq { + position: absolute; + top: 16px; + right: 16px; + border: none; + background-color: transparent; + text-align: right; + cursor: pointer; } + } - div.login_info { - border-top: 1px solid var(--light-gray-color); - font-size: 0.8em; - div { - text-align: right; - float: left; - padding: 5px; + .login-news { + height: 100%; + visibility: visible; + .hidden { + visibility: hidden; + height: 0; + } - &:last-child { - float:right; - } + .login-news-details { + max-height: 340px; + overflow-y: auto; + margin: 0 0 16px 0; + padding-right: 16px; + } + } + + #login-news-nav { + display: flex; + flex-direction: row; + justify-content: center; + margin: 0 64px; + height: 36px; + + .login-news-nav { + margin-left: 8px; + width: 48px; + height: 48px; + border: none; + @include background-icon('bullet-dot', clickable, 24); + background-repeat: no-repeat; + background-color: transparent; + background-position: center; + cursor: pointer; + + &.active-news-bullet { + background-size: 28px; } } - > a { - margin-left: 12px; + } +} + +#loginbox { + display: flex; + flex-direction: column; + align-content: space-between; + background-color: var(--white); + padding: 32px; + min-width: 340px; + width: 340px; + + header h1 { + margin: 32px 0; + text-align: center; + } + + .login-message { + display: flex; + margin: 0 32px 16px 32px; + &#login-error { + background-color: var(--red-20); + } + + &#logout-info { + background-color: var(--base-color-20); + } + + img { + height: calc(100% - 8px); + padding: 4px 8px; + } + + .login-message-content { + padding: 8px; + + p { + margin: 0; + } } } + form#login-form { + margin: 0; + padding: 0 32px; + border-top: none; + border-bottom: solid thin var(--content-color-40); + + &.login-bottom { + border-top: solid thin var(--content-color-40); + border-bottom: none; + padding-top: 1em; + } + + section { + padding-top: 0; + + input { + margin-top: 0; + } + } + + label { + display: inline-block; + min-width: 100%; + text-indent: 0; + + &.with-tooltip { + min-width: calc(100% - 24px); + } + } + + .tooltip { + line-height: 36px; + margin-left: 4px; + } + + .login-button-wrapper { + margin: 1em 0; + + button { + width: 100%; + font-weight: 700; + } + } + } + + nav { + margin: 1em; + padding: 0 16px; + text-align: center; + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: flex-end; + + a { + display: block; + margin: 0 auto; + padding: 4px 8px; + width: 100%; + text-align: left; + color: var(--base-color); + + .title { + font-size: 1.25em; + font-weight: 700; + margin: 0 0 4px; + } + .description { + font-size: 0.75em; + max-width: 75%; + white-space: collapse; + color: var(--black); + } + + &:hover { + color: var(--active-color); + } + + &.link-registration { + margin-top: 1em; + } + } + + &.login-bottom { + justify-content: flex-start; + } + } + + footer { + border-top: solid thin #ccc; + padding-top: 1em; + margin-top: 1em; + } input#loginname, input#password { @@ -142,10 +355,6 @@ $gap-between-boxes: calc($login-page-margin / 2); right: 7px; bottom: 0; cursor: pointer; - - #visible-password, - #invisible-password { - } } } @@ -155,14 +364,10 @@ $gap-between-boxes: calc($login-page-margin / 2); padding: 20px; width: 450px; float: left; - > header { - margin: 0 0 0 0; - } } #index, #login { - #current-page-structure { display: none; } @@ -177,38 +382,63 @@ $gap-between-boxes: calc($login-page-margin / 2); display: none; } - -#login-form { - max-height: 300px; - overflow: hidden; - transition: max-height var(--transition-duration-slow) linear; - - // This prevents the focus border from being cut due to overflow: hidden - margin-left: -5px; - margin-right: -5px; - padding-left: 5px; - padding-right: 5px; - - &.hide { - max-height: 0px; +#top-bar { + #language-selector { + margin-right: 4px; } +} - #submit_login { - margin-top: 0 !important; - float: left !important; +#header-links { + #contrast { + margin-left: 4px; + button.as-link { + color: var(--white); + line-height: 28px; + &:hover { + text-decoration: underline; + } + } + img { + vertical-align: middle; + } } +} - #login-footer-bottom { - display: flex; - align-items: flex-start; - justify-content: space-between; - margin-bottom: 1.5ex; +/* * * * * * * * * * +responsive settings +* * * * * * * * * */ +html:not(.size-large) { + #login-wrapper { + margin: 0 15px; + width: 100%; + top: 0; + #login-content-wrapper { + #login-infobox { + max-width: unset; + min-width: unset; + flex-grow: 1; + } + } } +} +html:not(.size-medium) { + #login-wrapper { + margin: 0; + #login-content-wrapper { + height: unset; + + flex-wrap: wrap; + + #loginbox { + min-width: unset; + width: unset; + flex-grow: 1; + } - #login-footer-top { - display: flex; - align-items: flex-start; - justify-content: space-between; + #login-infobox { + width: 100%; + } + } } } diff --git a/resources/assets/stylesheets/scss/layouts.scss b/resources/assets/stylesheets/scss/layouts.scss index b76791ff20bc86acabb620a5a81be18dd1315202..5d65beab137e464a236e8ff55c057a335cb58438 100644 --- a/resources/assets/stylesheets/scss/layouts.scss +++ b/resources/assets/stylesheets/scss/layouts.scss @@ -111,6 +111,7 @@ body { } #main-footer-navigation { + flex-grow: 1; ul { display: flex; flex: 1; diff --git a/resources/assets/stylesheets/scss/system-notifications.scss b/resources/assets/stylesheets/scss/system-notifications.scss index d4795f9b67dc4638045add7b8b4a75b6b59c1e29..57c00a098d35cca93b7be70676a2a83abbc40b57 100644 --- a/resources/assets/stylesheets/scss/system-notifications.scss +++ b/resources/assets/stylesheets/scss/system-notifications.scss @@ -63,8 +63,9 @@ } &.system-notifications-login { - margin-bottom: 15px; - overflow: hidden; + min-height: 100px; + width: 404px; + margin: auto; } overflow: visible; diff --git a/resources/assets/stylesheets/scss/tooltip.scss b/resources/assets/stylesheets/scss/tooltip.scss index 34e635241ea35f2d0400bf67bbe9428c0837ce0a..223b72b1a95338236153bee71fc9bc15aa5b58a2 100644 --- a/resources/assets/stylesheets/scss/tooltip.scss +++ b/resources/assets/stylesheets/scss/tooltip.scss @@ -35,6 +35,12 @@ &.tooltip-important { @include icon(before, info-circle, attention, $icon-size-inline); } + &.tooltip-info-alt { + @include icon(before, info-circle, info-alt); + &::before { + vertical-align: middle; + } + } .tooltip-content { @extend %tooltip; diff --git a/templates/_standard_loginform.php b/templates/_standard_loginform.php deleted file mode 100644 index 5335d19fae2d56def88fea4be74fab9b3512d732..0000000000000000000000000000000000000000 --- a/templates/_standard_loginform.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -use Studip\Button; - -/** - * @var bool $hidden - * @var string $uname; - */ -$username_tooltip_text = (string)Config::get()->USERNAME_TOOLTIP_TEXT; -$password_tooltip_text = (string)Config::get()->PASSWORD_TOOLTIP_TEXT; -?> - -<form class="default <?= $hidden ? 'hide' : '' ?>" - name="login_form" - id="login-form" - method="post" - action="<?= URLHelper::getLink(Request::url(), ['cancel_login' => null]) ?>" - <? if ($hidden) echo 'hidden'; ?> -> - <section> - <label> - <span class="required"><?= _('Benutzername') ?></span> - <? if ($username_tooltip_text) : ?> - <?= tooltipIcon($username_tooltip_text) ?> - <? endif ?> - <input type="text" <?= (mb_strlen($uname ?? '') || $hidden) ? '' : 'autofocus' ?> - id="loginname" - name="loginname" - value="<?= htmlReady($uname ?? '') ?>" - size="20" - spellcheck="false" - autocapitalize="off" - autocomplete="username" - required> - </label> - <label for="password" style="position: relative"> - <span class="required"><?= _('Passwort') ?></span> - <? if ($password_tooltip_text) : ?> - <?= tooltipIcon($password_tooltip_text) ?> - <? endif ?> - <input type="password" <?= mb_strlen($uname ?? '') && !$hidden ? 'autofocus' : '' ?> - id="password" - name="password" - autocomplete="current-password" - size="20" - required - > - - <i id="password-toggle" tabindex="0" role="button" class="enter-accessible"> - <?= Icon::create('visibility-checked')->asImg([ - 'id ' => 'visible-password', - 'title' => _('Passwort anzeigen'), - ]) ?> - <?= Icon::create('visibility-invisible')->asImg([ - 'id' => 'invisible-password', - 'style' => 'display: none', - 'title' => _('Passwort verstecken'), - ]) ?> - </i> - - </label> - <p id="password-caps" style="display: none"><?= _('Feststelltaste ist aktiviert!') ?></p> - </section> - - <?= CSRFProtection::tokenTag() ?> - <input type="hidden" name="login_ticket" value="<?= Seminar_Session::get_ticket() ?>"> - <input type="hidden" name="resolution" value=""> - - <div id="<?=$login_footer_id?>"> - <?= Button::createAccept(_('Anmelden'), _('Login'), ['id' => 'submit_login']); ?> - - <? if (Config::get()->ENABLE_REQUEST_NEW_PASSWORD_BY_USER && in_array('Standard', $GLOBALS['STUDIP_AUTH_PLUGIN'])): ?> - <a style="line-height: 1 !important" href="<?= URLHelper::getLink('dispatch.php/new_password?cancel_login=1') ?>"> - <? else: ?> - <a style="line-height: 1 !important" href="mailto:<?= $GLOBALS['UNI_CONTACT'] ?>?subject=<?= rawurlencode('Stud.IP Passwort vergessen - '.Config::get()->UNI_NAME_CLEAN) ?>&body=<?= rawurlencode('Ich habe mein Passwort vergessen. Bitte senden Sie mir ein Neues.\nMein Nutzername: ' . htmlReady($uname) . "\n") ?>"> - <? endif; ?> - <?= _('Passwort vergessen?') ?> - </a> - </div> -</form> diff --git a/templates/footer.php b/templates/footer.php index 63cb06471d63ea48321d097c5c6b3948bf489a2c..37389c660701659c42477baef1f1603d50021e6a 100644 --- a/templates/footer.php +++ b/templates/footer.php @@ -12,26 +12,22 @@ </div> <? endif; ?> -<? if (Navigation::hasItem('/footer')) : ?> - <nav id="main-footer-navigation" aria-label="<?= _('Fußzeilennavigation') ?>"> - <ul> - <? foreach (Navigation::getItem('/footer') as $nav): ?> - <? if ($nav->isVisible()): ?> - <li> - <a - <? if (is_internal_url($url = $nav->getURL())) : ?> - href="<?= URLHelper::getLink($url, $link_params ?? null) ?>" - <? else: ?> - href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer" - <? endif ?> - <?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?> - ><?= htmlReady($nav->getTitle()) ?></a> - </li> - <? endif; ?> - <? endforeach; ?> - </ul> - </nav> -<? endif; ?> -</footer> + <? if (Navigation::hasItem('/footer')): ?> + <nav id="main-footer-navigation" aria-label="<?= _('Fußzeilennavigation') ?>"> + <ul> + <? foreach (Navigation::getItem('/footer') as $nav): ?> + <? if ($nav->isVisible()): ?> + <li> + <a <? if (is_internal_url($url = $nav->getURL())): ?> + href="<?= URLHelper::getLink($url, $link_params ?? null) ?>" <? else: ?> + href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer" <? endif ?> + <?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?>><?= htmlReady($nav->getTitle()) ?></a> + </li> + <? endif; ?> + <? endforeach; ?> + </ul> + </nav> + <? endif; ?> + </footer> <? endif; ?> <!-- Ende Footer --> diff --git a/templates/header.php b/templates/header.php index 75a87b4dbabc0c22faf451cf2c031443b51996c0..7cb271c19a7db70d252564a4c18ac5dad2af4750 100644 --- a/templates/header.php +++ b/templates/header.php @@ -82,7 +82,6 @@ if ($navigation) { <!-- Dynamische Links ohne Icons --> <div id="header-links"> <ul> - <? if (Navigation::hasItem('/links')): ?> <? foreach (Navigation::getItem('/links') as $nav): ?> <? if ($nav->isVisible()) : ?> @@ -207,6 +206,26 @@ if ($navigation) { </form> <? endif; ?> </li> + <? else: ?> + <li> + <form method="post" action="<?= URLHelper::getLink(Request::url(), ['cancel_login' => null]) ?>"> + <?= CSRFProtection::tokenTag() ?> + <input type="hidden" name="user_config_submitted" value="1"> + <div id="contrast"> + <? if (!empty($_SESSION['contrast'])): ?> + <?= Icon::create('accessibility', Icon::ROLE_INFO_ALT)->asImg(24) ?> + <button class="as-link" name="unset_contrast"><?= _('Normalen Kontrast aktivieren') ?></button> + <?= tooltipIcon(_('Aktiviert standardmäßige, nicht barrierefreie Kontraste.'), false, false, true); ?> + <? else: ?> + <?= Icon::create('accessibility', Icon::ROLE_INFO_ALT)->asImg(24) ?> + <button class="as-link" name="set_contrast"><?= _('Hohen Kontrast aktivieren') ?></button> + <?= tooltipIcon(_('Aktiviert einen hohen Kontrast gemäß WCAG 2.1. Diese Einstellung wird nach dem Login übernommen. + Sie können sie in Ihren persönlichen Einstellungen ändern.'), false, false, true); ?> + <? endif ?> + </div> + </form> + </li> + <li><?= $this->render_partial('login/_header_languages') ?></li> <? endif; ?> <li id="responsive-toggle-fullscreen"> @@ -225,7 +244,6 @@ if ($navigation) { </div> </div> <!-- End top bar --> - <!-- Main navigation and right-hand logo --> <nav id="navigation-level-1" aria-label="<?= _('Hauptnavigation') ?>"> <? if (!empty($header_nav['visible'])) : ?> diff --git a/templates/login/_header_languages.php b/templates/login/_header_languages.php new file mode 100644 index 0000000000000000000000000000000000000000..b04c1f31c4c65e75de2ac7c2d8f14f9da4859efa --- /dev/null +++ b/templates/login/_header_languages.php @@ -0,0 +1,35 @@ +<form id="language-selector" method="POST" action="<?= URLHelper::getLink(Request::url(), ['cancel_login' => null]) ?>"> + <?= CSRFProtection::tokenTag() ?> + <input type="hidden" name="user_config_submitted" value="1"> + <select id="languages" name="set_language" class="select2" onchange="this.form.submit()"> + <? foreach ($GLOBALS['INSTALLED_LANGUAGES'] as $temp_language_key => $temp_language): ?> + <option value="<?= htmlReady($temp_language_key) ?>" <?= array_key_exists('forced_language', $_SESSION) && $_SESSION['forced_language'] === $temp_language_key ? 'selected' : '' ?> + data-flag="<?= URLHelper::getLink('assets/images/languages/' . $temp_language['picture']) ?>"> + <?= htmlReady($temp_language['name']) ?> + </option> + <? endforeach; ?> + </select> + </div> +</form> + +<script> + jQuery(function ($) { + let format = function (state) { + if (!state.id) { // optgroup + return state.text; + } + let flagUrl = $(state.element).data('flag'); + let flag = $(`<img src="${flagUrl}" style="vertical-align: text-top;">`); + let span = $('<span>'); + span.text(state.text); + $(flag).prependTo(span); + return span; + }; + $('#languages').select2({ + minimumResultsForSearch: -1, + width: '100%', + templateResult: format, + templateSelection: format + }); + }); +</script> \ No newline at end of file diff --git a/templates/login/_login_faq.php b/templates/login/_login_faq.php new file mode 100644 index 0000000000000000000000000000000000000000..75dcc2cc9f8a720877c2dd8afe0e80755461d81e --- /dev/null +++ b/templates/login/_login_faq.php @@ -0,0 +1,18 @@ +<section id="login-faq-content-wrapper"> + <header class="login-box-header"> + <h2><?= htmlReady(Config::get()->LOGIN_FAQ_TITLE) ?></h2> + </header> + <div class="login-faq-content"> + <? foreach ($faq_entries as $entry): ?> + <article class="studip toggle"> + <header> + <h1><a href="#"><?= htmlReady($entry->title) ?></a></h1> + </header> + <section><?= formatReady($entry->description) ?> + </section> + </article> + <? endforeach ?> + </div> + +</section> + diff --git a/templates/login/_login_news.php b/templates/login/_login_news.php new file mode 100644 index 0000000000000000000000000000000000000000..bcf8f147037fee30d489c71960157d5022a416c6 --- /dev/null +++ b/templates/login/_login_news.php @@ -0,0 +1,59 @@ +<section id="login-news-content-wrapper"> + <? foreach ($news_entries as $entry): ?> + <article class="login-news hidden" id="login-news-<?= htmlReady($entry['news_id']) ?>"> + <header> + <h2><?= htmlReady($entry['topic']) ?></h2> + </header> + <section class="login-news-details"> + <p> + <?= formatReady($entry['body']) ?> + </p> + </section> + </article> + <? endforeach; ?> +</section> +<? if (count($news_entries) > 1): ?> +<nav id="login-news-nav"> + <? foreach ($news_entries as $entry): ?> + <button class="login-news-nav" id="login-news-nav-<?= $entry['news_id'] ?>"> + </button> + <? endforeach; ?> +</nav> +<? endif; ?> + +<? if (!empty($news_entries)) : ?> +<script> + const entries = <?= json_encode($news_entries) ?>; + let currentEntryId = entries[0]['news_id']; + const first = document.getElementById("login-news-<?= htmlReady($news_entries[0]['news_id']) ?>"); + first.classList.remove('hidden'); + const NewsNav = document.getElementById('login-news-nav'); + if (NewsNav) { + const firstTeaserBullet = document.getElementById('login-news-nav-<?= htmlReady($news_entries[0]['news_id']) ?>'); + firstTeaserBullet.classList.add('active-news-bullet'); + entries.forEach(entry => { + document.getElementById(`login-news-nav-${entry.news_id}`).addEventListener('click', e => { + setTeaserById(entry.news_id); + }); + }); + } + +function setTeaserById(id) { + document.querySelectorAll('.login-news-nav').forEach(el => { + el.classList.remove("active-news-bullet"); + }); + + currentEntryId = id; + + document.querySelectorAll('.login-news').forEach(el => { + el.classList.add('hidden'); + }); + + const news = document.getElementById(`login-news-${id}`); + news.classList.remove('hidden'); + + const teaserBullet = document.getElementById(`login-news-nav-${id}`); + teaserBullet.classList.add('active-news-bullet'); +} +</script> +<? endif ?> \ No newline at end of file diff --git a/templates/login/_standard_loginform.php b/templates/login/_standard_loginform.php new file mode 100644 index 0000000000000000000000000000000000000000..e111453fd3d8165a2c1af970e94dbb30fa49ebf3 --- /dev/null +++ b/templates/login/_standard_loginform.php @@ -0,0 +1,69 @@ +<?php + +use Studip\Button; + +/** + * @var bool $hidden + * @var string $uname; + */ +$username_tooltip_text = (string) Config::get()->USERNAME_TOOLTIP_TEXT; +$password_tooltip_text = (string) Config::get()->PASSWORD_TOOLTIP_TEXT; +?> + +<form class="default <?= $hidden ? 'hide' : '' ?> <?= $login_form_class ?>" name="login_form" id="login-form" method="post" + action="<?= URLHelper::getLink(Request::url(), ['cancel_login' => null]) ?>" <? if ($hidden) + echo 'hidden'; ?>> + <section> + <? $withTooltip = $username_tooltip_text !== '' || $password_tooltip_text !== ''; ?> + <label class="<?= $withTooltip ? 'with-tooltip' : ''?>"> + <span class="sr-only"><?= _('Benutzername') ?></span> + <input type="text" <?= (mb_strlen($uname ?? '') || $hidden) ? '' : 'autofocus' ?> id="loginname" + name="loginname" value="<?= htmlReady($uname ?? '') ?>" size="20" spellcheck="false" + autocapitalize="off" autocomplete="username" placeholder="<?= _('Benutzername') ?>" required> + </label> + <? if ($username_tooltip_text): ?> + <?= tooltipIcon($username_tooltip_text) ?> + <? endif ?> + <label class="<?= $withTooltip ? 'with-tooltip' : ''?>" style="position: relative"> + <span class="sr-only"><?= _('Passwort') ?></span> + + <input type="password" <?= mb_strlen($uname ?? '') && !$hidden ? 'autofocus' : '' ?> id="password" + name="password" autocomplete="current-password" size="20" required placeholder="<?= _('Passwort') ?>" + > + + <i id="password-toggle" tabindex="0" role="button" class="enter-accessible"> + <?= Icon::create('visibility-checked')->asImg(20, [ + 'id' => 'visible-password', + 'title' => _('Passwort anzeigen'), + ]) ?> + <?= Icon::create('visibility-invisible')->asImg(20, [ + 'id' => 'invisible-password', + 'style' => 'display: none', + 'title' => _('Passwort verstecken'), + ]) ?> + </i> + + </label> + <? if ($password_tooltip_text): ?> + <?= tooltipIcon($password_tooltip_text) ?> + <? endif ?> + <p id="password-caps" style="display: none"><?= _('Feststelltaste ist aktiviert!') ?></p> + </section> + <? if (Config::get()->ENABLE_REQUEST_NEW_PASSWORD_BY_USER && in_array('Standard', $GLOBALS['STUDIP_AUTH_PLUGIN'])): ?> + <a style="line-height: 1 !important" + href="<?= URLHelper::getLink('dispatch.php/new_password', ['cancel_login' => 1]) ?>"> + <? else: ?> + <a style="line-height: 1 !important" + href="mailto:<?= $GLOBALS['UNI_CONTACT'] ?>?subject=<?= rawurlencode('Stud.IP Passwort vergessen - ' . Config::get()->UNI_NAME_CLEAN) ?>&body=<?= rawurlencode('Ich habe mein Passwort vergessen. Bitte senden Sie mir ein Neues.\nMein Nutzername: ' . htmlReady($uname) . "\n") ?>"> + <? endif; ?> + <?= _('Passwort vergessen?') ?> + </a> + + <?= CSRFProtection::tokenTag() ?> + <input type="hidden" name="login_ticket" value="<?= htmlReady(Seminar_Session::get_ticket()) ?>"> + <input type="hidden" name="resolution" value=""> + + <div class="login-button-wrapper"> + <?= Button::create(_('Anmelden'), _('Login'), ['id' => 'submit_login']); ?> + </div> +</form> \ No newline at end of file diff --git a/templates/loginform.php b/templates/loginform.php index 96ed42bcee633bd5aae8baee898c34e65d3ae11b..2274032a657eb3d2f883ce0b97dc225c57d4029c 100644 --- a/templates/loginform.php +++ b/templates/loginform.php @@ -23,127 +23,140 @@ if (!match_route('web_migrate.php')) { $bg_desktop = URLHelper::getURL('pictures/loginbackgrounds/1.jpg'); $bg_mobile = URLHelper::getURL('pictures/loginbackgrounds/2.jpg'); } -$show_login = !(current(StudipAuthAbstract::getInstance()) instanceOf StudipAuthSSO) && StudipAuthAbstract::isLoginEnabled(); +$show_login = !(current(StudipAuthAbstract::getInstance()) instanceof StudipAuthSSO) && StudipAuthAbstract::isLoginEnabled(); $show_hidden_login = !$show_login && StudipAuthAbstract::isLoginEnabled(); +$enable_faq = Config::get()->LOGIN_FAQ_VISIBILITY && count($faq_entries) > 0; +$enable_news = Config::get()->LOGIN_NEWS_VISIBILITY && count($news_entries) > 0; ?> <main id="content" class="loginpage"> <div id="background-desktop" style="background: url(<?= $bg_desktop ?>) no-repeat top left/cover;"></div> <div id="background-mobile" style="background: url(<?= $bg_mobile ?>) no-repeat top left/cover;"></div> - <div id="login_flex"> - <div> + <div id="login-wrapper"> + <?= Studip\VueApp::create('SystemNotificationManager') + ->withProps([ + 'id' => 'system-notifications', + 'class' => 'system-notifications-login', + 'notifications' => PageLayout::getMessages(MessageBox::class), + ]) + ?> + <div id="login-content-wrapper"> <div id="loginbox"> <header> - <?= Studip\VueApp::create('SystemNotificationManager') - ->withProps([ - 'id' => 'system-notifications', - 'class' => 'system-notifications-login', - 'notifications' => PageLayout::getMessages(MessageBox::class), - 'append-all-to' => '#loginbox' - ]) ?> - - <h1><?= htmlReady(Config::get()->UNI_NAME_CLEAN) ?></h1> + <h1><?= _('Login') ?></h1> </header> - - <? if ($show_login) : ?> - <?= $this->render_partial('_standard_loginform', [ + <? if ($show_login): ?> + <?= $this->render_partial('login/_standard_loginform', [ 'hidden' => false, - 'login_footer_id' => 'login-footer-top' + 'login_form_class' => 'login-top' ]) ?> <? endif ?> - <nav> - <ul> - <? foreach (Navigation::getItem('/login') as $key => $nav) : ?> - <? if ($nav->isVisible()) : ?> - <? if ($key === 'standard_login' && $show_login) continue; ?> - <? $name_and_title = explode(' - ', $nav->getTitle()) ?> - <li class="login_link"> - <? if (is_internal_url($url = $nav->getURL())) : ?> - <? SkipLinks::addLink($name_and_title[0], URLHelper::getLink($url, ['cancel_login' => 1])) ?> - <a href="<?= URLHelper::getLink($url, ['cancel_login' => 1]) ?>" <?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?>> - <? else : ?> - <a href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer"> - <? endif ?> - <?= htmlReady($name_and_title[0]) ?> - <p> - <?= htmlReady(!empty($name_and_title[1]) ? $name_and_title[1] : $nav->getDescription()) ?> - </p> - </a> - </li> - <? endif ?> + <nav class="<?= $show_hidden_login ? 'login-bottom' : '' ?>"> + <? foreach (Navigation::getItem('/login') as $key => $nav): ?> + <? if ($nav->isVisible()): ?> + <? if ($key === 'standard_login' && $show_login) + continue; ?> + <? endif ?> + <? $name_and_title = explode(' - ', $nav->getTitle()) ?> + <? if (is_internal_url($url = $nav->getURL())): ?> + <? SkipLinks::addLink($name_and_title[0], URLHelper::getLink($url, ['cancel_login' => 1])) ?> + <a href="<?= URLHelper::getLink($url, ['cancel_login' => 1]) ?>" + <?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?>> + <? else: ?> + <a href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer"> + <? endif ?> + <p class="title"><?= htmlReady($name_and_title[0]) ?></p> + <p class="description"> + <?= htmlReady(!empty($name_and_title[1]) ? $name_and_title[1] : $nav->getDescription()) ?> + </p> + </a> <? endforeach ?> - </ul> + + <? if (Config::get()->ENABLE_SELF_REGISTRATION): ?> + <a href="<?= URLHelper::getLink('dispatch.php/registration', ['cancel_login' => 1]) ?>" + title="<?= _('Registrieren, um das System erstmalig zu nutzen') ?>" class="link-registration"> + <?= _('Kein Zugang? Jetzt registrieren') ?> + </a> + <? endif; ?> </nav> - <? if ($show_hidden_login) : ?> - <?= $this->render_partial('_standard_loginform', [ + + <? if ($show_hidden_login): ?> + <?= $this->render_partial('login/_standard_loginform', [ 'hidden' => empty($loginerror), - 'login_footer_id' => 'login-footer-bottom' + 'login_form_class' => 'login-bottom' ]) ?> <? endif ?> - - <footer> - <? if ($GLOBALS['UNI_LOGIN_ADD']) : ?> + <? if ($GLOBALS['UNI_LOGIN_ADD']): ?> + <footer> <div class="uni_login_add"> <?= $GLOBALS['UNI_LOGIN_ADD'] ?> </div> - <? endif ?> - - <form method="POST" action="<?=URLHelper::getLink(Request::url(), ['cancel_login' => null])?>"> - <?=CSRFProtection::tokenTag()?> - <input type="hidden" name="user_config_submitted" value="1"> - <div id="languages"> - <? foreach ($GLOBALS['INSTALLED_LANGUAGES'] as $temp_language_key => $temp_language): ?> - <?= Assets::img('languages/' . $temp_language['picture'], ['alt' => $temp_language['name'], 'size' => '24']) ?> - <button class="as-link" name="set_language_<?=$temp_language_key?>"> - <?= htmlReady($temp_language['name']) ?> - </button> - <? endforeach; ?> + </footer> + <? endif ?> + </div> + <div id="login-infobox" class="<?= !$enable_news && !$enable_faq ? 'hide' :'' ?> <?= !($enable_faq && $enable_news) ? 'no-toggle' : ''?>"> + <? if ($enable_faq && $enable_news): ?> + <div id="login-infobox-button-wrapper"> + <button id="hide-faq" class="selected" title="<?= _('Ankündigungen anzeigen') ?>"> + <?= Icon::create('news')->asImg(24, ['style' => 'align-self: end;']) ?> + </button> + <button id="show-faq" title="<?= _('Hinweise zum Login anzeigen')?>"> + <?= Icon::create('faq')->asImg(24, ['style' => 'align-self: end;']) ?> + </button> + </div> - <div id="contrast"> - <?=CSRFProtection::tokenTag()?> - <? if (!empty($_SESSION['contrast'])) : ?> - <?= Icon::create('accessibility')->asImg(24) ?> - <button class="as-link" name="unset_contrast"><?= _('Normalen Kontrast aktivieren') ?></button> - <?= tooltipIcon(_('Aktiviert standardmäßige, nicht barrierefreie Kontraste.')); ?> - <? else : ?> - <?= Icon::create('accessibility')->asImg(24) ?> - <button class="as-link" name="set_contrast"><?= _('Hohen Kontrast aktivieren') ?></button> - <?= tooltipIcon(_('Aktiviert einen hohen Kontrast gemäß WCAG 2.1. Diese Einstellung wird nach dem Login übernommen. - Sie können sie in Ihren persönlichen Einstellungen ändern.')); ?> - <? endif ?> + <? endif; ?> + <? if ($enable_faq): ?> + <div id="login-faq-box" class="<?= !$enable_news && $enable_faq ? '' : 'hidden' ?>"> + <?= $this->render_partial('login/_login_faq', [ + 'faq_entries' => $faq_entries, + ]) ?> </div> - </form> - - </footer> + <? endif ?> + <? if ($enable_news): ?> + <div id="login-news-box"> + <?= $this->render_partial('login/_login_news', [ + 'news_entries' => $news_entries, + 'enable_faq' => $enable_faq + ]) ?> + </div> + <? endif; ?> </div> </div> - - <? if (Config::get()->LOGIN_FAQ_VISIBILITY && count($faq_entries) > 0) : ?> - <div id="faq_box"> - <header><h1><?= htmlReady(Config::get()->LOGIN_FAQ_TITLE) ?></h1></header> - <? foreach ($faq_entries as $entry) : ?> - <article class="studip toggle"> - <header> - <h1><a href="#"><?= htmlReady($entry->title) ?></a></h1> - </header> - <section><?= formatReady($entry->description) ?> - </section> - </article> - <? endforeach ?> - </div> - <? endif ?> - </div> - </main> -<script type="text/javascript" language="javascript"> -//<![CDATA[ -$(function () { - $('form[name=login]').submit(function () { - $('input[name=resolution]', this).val( screen.width + 'x' + screen.height ); - $('input[name=device_pixel_ratio]').val(window.devicePixelRatio || 1); +<script> + //<![CDATA[ + $(function () { + $('form[name=login]').submit(function () { + $('input[name=resolution]', this).val(screen.width + 'x' + screen.height); + $('input[name=device_pixel_ratio]').val(window.devicePixelRatio || 1); + }); }); -}); -// --> -</script> + // --> + + <? if ($enable_faq && $enable_news): ?> + const faqButton = document.getElementById('show-faq'); + const newsButton = document.getElementById('hide-faq'); + + faqButton.addEventListener('click', e => { + const faqBox = document.getElementById('login-faq-box'); + const newsBox = document.getElementById('login-news-box'); + newsBox.classList.add('hidden'); + faqBox.classList.remove('hidden'); + faqButton.classList.add('selected'); + newsButton.classList.remove('selected'); + }); + + newsButton.addEventListener('click', e => { + const faqBox = document.getElementById('login-faq-box'); + const newsBox = document.getElementById('login-news-box'); + faqBox.classList.add('hidden'); + newsBox.classList.remove('hidden'); + newsButton.classList.add('selected'); + faqButton.classList.remove('selected'); + }); + <? endif ?> + +</script> \ No newline at end of file diff --git a/templates/shared/tooltip.php b/templates/shared/tooltip.php index 207eaa2779c3e4d8b699997eb62d17594c62c670..9b9cb64fc971f3580426370fd1749fe9277ecb36 100644 --- a/templates/shared/tooltip.php +++ b/templates/shared/tooltip.php @@ -5,10 +5,13 @@ * @var string $text */ ?> -<span class="as-link tooltip tooltip-icon <? if ($important) echo 'tooltip-important'; ?>" - tabindex="0" - data-tooltip - aria-label="<?= htmlReady($html ? strip_tags($text) : $text) ?>" +<span + class="as-link tooltip tooltip-icon + <? if ($important) echo 'tooltip-important'; ?> + <? if ($alt_info) echo 'tooltip-info-alt'; ?>" + tabindex="0" + data-tooltip + aria-label="<?= htmlReady($html ? strip_tags($text) : $text) ?>" > <span class="tooltip-content"><?= $html ? $text : htmlReady($text) ?></span> -</span> +</span> \ No newline at end of file