Skip to content

Commit 2c92b48

Browse files
committed
Fix colors on the proctor login page for dark mode.
The colors for this were inline style. Colors cannot be inline anymore since the server cannot detect if the user will have the browser in dark mode or not. So this switches to using Bootstrap alerts instead.
1 parent d1560a4 commit 2c92b48

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

templates/ContentGenerator/LoginProctor.html.ep

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
% # Print a message about submission times if we're submitting an answer.
1717
% if (param('submitAnswers')) {
1818
% my $dueTime = $userSet->due_date;
19-
% my ($color, $msg) = ('#ddddff', '');
19+
% my ($alertClass, $msg) = ('alert-primary', '');
2020
% if ($dueTime + $ce->{gatewayGracePeriod} < $submitTime) {
21-
% $color = '#ffffaa';
21+
% $alertClass = ' alert-warning';
2222
% $msg = maketext('The time limit on this assignment was exceeded. The assignment may be checked, '
2323
% . 'but the result will not be counted.');
2424
% }
2525
%
26-
<div class="card mb-2" style="background-color:<%= $color %>;">
26+
<div class="alert mb-2<%= $alertClass %>" role="alert">
2727
<div class="card-body p-2">
2828
<div class="card-title"><strong><%= maketext('Grading Assignment') %></strong></div>
2929
<div class="card-text">
@@ -52,7 +52,7 @@
5252
% || ($userSet->restricted_login_proctor eq '' || $userSet->restricted_login_proctor eq 'No'))
5353
% {
5454
% # The user info and username field for the proctor.
55-
<div class="card p-2 mb-2" style="background-color:#ddddff;">
55+
<div class="alert alert-primary card p-2 mb-2" role="alert">
5656
<div><%= maketext(q{User's username is:}) %> <strong><%= param('effectiveUser') // '' %></strong></div>
5757
<div>
5858
<%= maketext(q{User's name is:}) %>
@@ -68,7 +68,7 @@
6868
</div>
6969
% } else {
7070
% # Restricted set login
71-
<div class="card p-2 mb-2" style="background-color:#ddddff;">
71+
<div class="alert alert-primary card p-2 mb-2" role="alert">
7272
<em>
7373
<%= maketext(
7474
'This set has a set-level proctor password to authorize logins. Enter the password below.') =%>

0 commit comments

Comments
 (0)