aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/start.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2025-10-16 11:11:37 +0200
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2025-10-16 11:11:37 +0200
commit3aed9159d6601aa4db9822ec7d7bc8efe877b99f (patch)
treec89ac542125d16dd7f213027a77e92bb43fb31bc /app/controllers/start.php
parent609e0bf8fa3dc7981da685163f4dde2f53572ecb (diff)
use message box instead of notification and ensure that buttons are readable, fixes #5945
Closes #5945 Merge request studip/studip!4546
Diffstat (limited to 'app/controllers/start.php')
-rw-r--r--app/controllers/start.php32
1 files changed, 22 insertions, 10 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]
);
}