diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-02-27 09:29:45 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-02-27 09:52:44 +0100 |
| commit | 2627788b5e99f44235c6699ef44b0364dbc29737 (patch) | |
| tree | 4422b0051fc4ac17e72626916c29d0de1a3735ad | |
| parent | e26f9167e27957595f247009d3a2738a381c21f9 (diff) | |
add confirm for tabula rasa actions, fixes #6293
Closes #6293
Merge request studip/studip!4771
| -rw-r--r-- | app/controllers/my_courses.php | 11 | ||||
| -rw-r--r-- | app/controllers/my_institutes.php | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/app/controllers/my_courses.php b/app/controllers/my_courses.php index 06e78f1..beb0c6b 100644 --- a/app/controllers/my_courses.php +++ b/app/controllers/my_courses.php @@ -100,7 +100,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( @@ -904,7 +905,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 0e15489..5b1cd8e 100644 --- a/app/controllers/my_institutes.php +++ b/app/controllers/my_institutes.php @@ -111,7 +111,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) { |
