aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2026-02-27 09:29:45 +0100
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2026-02-27 09:52:42 +0100
commit428fae6b25255de039f7ab60face5cce1b3ff05a (patch)
tree346458f7eeed2f492967bade04ea834101381bdb
parente054142db233a409b17f7205b202d8ec2436e69b (diff)
add confirm for tabula rasa actions, fixes #6293
Closes #6293 Merge request studip/studip!4771
-rw-r--r--app/controllers/my_courses.php11
-rw-r--r--app/controllers/my_institutes.php8
2 files changed, 16 insertions, 3 deletions
diff --git a/app/controllers/my_courses.php b/app/controllers/my_courses.php
index 8970907..1dad709 100644
--- a/app/controllers/my_courses.php
+++ b/app/controllers/my_courses.php
@@ -96,7 +96,8 @@ class MyCoursesController extends AuthenticatedController
$this->deputies_edit_about_enabled = Config::get()->DEPUTIES_EDIT_ABOUT_ENABLE;
// Check for new contents
- if ($tabularasa = $this->flash['tabularasa']) {
+ $tabularasa = $this->flash['tabularasa'];
+ if ($tabularasa) {
$details = [];
if ($this->check_for_new($sem_courses, $group_field)) {
$details[] = sprintf(
@@ -706,7 +707,13 @@ class MyCoursesController extends AuthenticatedController
$setting_widget->addLink(
_('Alles als gelesen markieren'),
$this->url_for("my_courses/tabularasa/{$sem}/" . time()),
- Icon::create('accept')
+ Icon::create('accept'),
+ [
+ 'data-confirm' => implode("\n", [
+ _('Sie sind dabei alle Veranstaltungen auf gelesen zu setzen.'),
+ _('Diesen Schritt können sie nicht rückgängig machen.')
+ ]),
+ ]
);
}
$setting_widget->addLink(
diff --git a/app/controllers/my_institutes.php b/app/controllers/my_institutes.php
index 31e25a6..bf9d646 100644
--- a/app/controllers/my_institutes.php
+++ b/app/controllers/my_institutes.php
@@ -109,7 +109,13 @@ class MyInstitutesController extends AuthenticatedController
$links->addLink(
_('Alles als gelesen markieren'),
$this->tabularasaURL(time()),
- Icon::create('accept')
+ Icon::create('accept'),
+ [
+ 'data-confirm' => implode("\n", [
+ _('Sie sind dabei alle Einrichtungen auf gelesen zu setzen.'),
+ _('Diesen Schritt können sie nicht rückgängig machen.')
+ ]),
+ ]
);
}
if ($GLOBALS['perm']->have_perm('dozent') && count($institutes) > 0) {