aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/start.php32
-rw-r--r--app/views/start/index.php3
-rw-r--r--resources/assets/stylesheets/scss/system-notifications.scss2
3 files changed, 26 insertions, 11 deletions
diff --git a/app/controllers/start.php b/app/controllers/start.php
index 550120f..0bd3ca9 100644
--- a/app/controllers/start.php
+++ b/app/controllers/start.php
@@ -98,30 +98,42 @@ class StartController extends AuthenticatedController
)->asDialog();
}
}
- if ($GLOBALS['perm']->get_perm() == 'user') {
- PageLayout::postInfo(_('Sie haben noch nicht auf Ihre Bestätigungsmail geantwortet.'), [
- _('Bitte holen Sie dies nach, um Stud.IP Funktionen wie das Belegen von Veranstaltungen nutzen zu können.'),
- sprintf(_('Bei Problemen wenden Sie sich an: %s'), '<a href="mailto:'.$GLOBALS['UNI_CONTACT'].'">'.$GLOBALS['UNI_CONTACT'].'</a>')
- ]);
+
+ $this->messages = [];
+
+ if (User::findCurrent()->perms == 'user') {
+ $this->messages[] = MessageBox::info(
+ _('Sie haben noch nicht auf Ihre Bestätigungsmail geantwortet.'),
+ [
+ _('Bitte holen Sie dies nach, um Stud.IP Funktionen wie das Belegen von Veranstaltungen nutzen zu können.'),
+ sprintf(_('Bei Problemen wenden Sie sich an: %s'), '<a href="mailto:'.$GLOBALS['UNI_CONTACT'].'">'.$GLOBALS['UNI_CONTACT'].'</a>')
+ ]
+ );
$details = Studip\LinkButton::create(
_('Bestätigungsmail erneut verschicken'),
- $this->url_for('start/resend_validation_mail')
+ $this->resend_validation_mailURL()
);
- if (!StudipAuthAbstract::CheckField('auth_user_md5.Email', $GLOBALS['user']->auth_plugin) && !LockRules::check($GLOBALS['user']->id, 'email')) {
+ if (
+ !StudipAuthAbstract::CheckField('auth_user_md5.Email', User::findCurrent()->auth_plugin)
+ && !LockRules::check(User::findCurrent()->id, 'email')
+ ) {
$details .= ' ';
$details .= Studip\LinkButton::create(
_('E-Mail-Adresse ändern'),
- $this->url_for('start/edit_mail_address'),
+ $this->edit_mail_addressURL(),
[
'data-dialog' => 'size=auto',
'title' => _('E-Mail-Adresse')
]
);
}
- PageLayout::postInfo(
- sprintf(_('Haben Sie die Bestätigungsmail an Ihre Adresse "%s" nicht erhalten?'), htmlReady($GLOBALS['user']->Email)),
+ $this->messages[] = MessageBox::info(
+ sprintf(
+ _('Haben Sie die Bestätigungsmail an Ihre Adresse "%s" nicht erhalten?'),
+ htmlReady(User::findCurrent()->email)
+ ),
[$details]
);
}
diff --git a/app/views/start/index.php b/app/views/start/index.php
index 6a177f6..7d6cb1a 100644
--- a/app/views/start/index.php
+++ b/app/views/start/index.php
@@ -2,6 +2,7 @@
/**
* @var array $columns
* @var Flexi\Template $widget_layout
+ * @var MessageBox[] $messages
*/
?>
<h1 class="sr-only">
@@ -16,6 +17,8 @@
<? endif ?>
</h1>
+<?= implode('', $messages) ?>
+
<?php
// display a random banner if the module is enabled
if (Config::get()->BANNER_ADS_ENABLE) {
diff --git a/resources/assets/stylesheets/scss/system-notifications.scss b/resources/assets/stylesheets/scss/system-notifications.scss
index b1fbed1..24a15a7 100644
--- a/resources/assets/stylesheets/scss/system-notifications.scss
+++ b/resources/assets/stylesheets/scss/system-notifications.scss
@@ -141,7 +141,7 @@
display: none;
}
- a:not(.system-notification-message) {
+ a:not(.system-notification-message,.button) {
color: var(--color--white);
text-decoration-line: underline;