Skip to content

Commit 8ea4f4e

Browse files
committed
INT-20592 mod_hsuforum: UI/UX changes
1 parent aa5f7ac commit 8ea4f4e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

renderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ public function discussion_template($d, $forumtype) {
615615
$revealed = "";
616616
if ($d->revealed) {
617617
$nonanonymous = get_string('nonanonymous', 'mod_hsuforum');
618-
$revealed = '<span class="label label-danger">'.$nonanonymous.'</span>';
618+
$revealed = '<span class="label bg-danger danger-label">'.$nonanonymous.'</span>';
619619
}
620620

621621
$arialabeldiscussion = get_string('discussionforum', 'hsuforum', $d->subject);
@@ -799,7 +799,7 @@ public function post_template($p) {
799799
$revealed = "";
800800
if ($p->revealed) {
801801
$nonanonymous = get_string('nonanonymous', 'mod_hsuforum');
802-
$revealed = '<span class="label label-danger">'.$nonanonymous.'</span>';
802+
$revealed = '<span class="label bg-danger danger-label">'.$nonanonymous.'</span>';
803803
}
804804

805805
return <<<HTML

route.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
$PAGE->set_activity_record($instance);
7373
$PAGE->set_context($context);
7474

75+
// Overriding the bfcache behavior to prevent the page from being cached and disabling the submit buttons.
76+
$PAGE->requires->js_init_code('window.addEventListener("unload", function(event) {});');
77+
7578
$router = new router();
7679
$router->add_controller(new posters_controller());
7780
$router->add_controller(new flag_controller());

styles.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,3 +1065,10 @@ li.activity.modtype_hsuforum .activityiconcontainer,
10651065
.modchoosercontainer div[data-internal="hsuforum"] .modicon_hsuforum {
10661066
filter: invert(64%) sepia(56%) saturate(361%) hue-rotate(41deg) brightness(98%) contrast(93%);
10671067
}
1068+
1069+
.hsuforum-post-body .danger-label,
1070+
.hsuforum-thread-author .danger-label {
1071+
color: white;
1072+
padding: 0 0.5em;
1073+
border-radius: 0.5rem;
1074+
}

0 commit comments

Comments
 (0)