Skip to content

Commit f4d40cd

Browse files
committed
Fix external launch page
1 parent 17507d6 commit f4d40cd

8 files changed

Lines changed: 44 additions & 95 deletions

File tree

assets/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/aplus.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -856,14 +856,6 @@ $(document).ready(function() {
856856
});
857857
// Change "collapse in" to "collapse show" to correct initial visibility with BS5
858858
$('.collapse.in').removeClass('in').addClass('show');
859-
860-
// If the sidebar menu is not in the DOM, apply different margin for site-alert and site-messages
861-
const sidebarElement = document.getElementById('bs-navbar-collapse');
862-
if (!sidebarElement) {
863-
// Element is not in DOM, apply different margin
864-
document.querySelector('.site-content > .site-alert')?.style.setProperty('marginLeft', '0px');
865-
document.querySelector('.site-content > .site-messages')?.style.setProperty('paddingLeft', '12px');
866-
}
867859
});
868860

869861
// Prevent tooltips from showing in the sidebar when the navbar is not minimised

assets/sass/base/_general.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ legend {
115115
margin-left: 0px;
116116
}
117117
}
118+
119+
// Override styles when sidebar doesn't exist
120+
body:not(:has(#bs-navbar-collapse)) .site-content > .site-messages {
121+
padding-left: 12px;
122+
margin-left: -12px;
123+
}
118124
}
119125

120126
@media (min-width: 768px) {
@@ -125,4 +131,9 @@ legend {
125131
margin-left: 36px;
126132
}
127133
}
134+
135+
// Override styles when sidebar doesn't exist
136+
body:not(:has(#bs-navbar-collapse)) .site-content > .site-alert {
137+
margin-left: 0px;
138+
}
128139
}

course/templates/course/staff/groups.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<p>
1717
{% translate "NUMBER_OF_GROUPS" %} <strong>{{ groups|length }}</strong>
18-
<a class="aplus-button--secondary aplus-button--xs" role="button" href="{{ instance|url:'groups-add' }}">
18+
<a class="aplus-button--default aplus-button--xs" role="button" href="{{ instance|url:'groups-add' }}">
1919
<i class="far fa-plus-sign" aria-hidden="true"></i>
2020
{% translate "ADD_NEW" %}
2121
</a>

external_services/static/css/external_services.css

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -13,63 +13,3 @@
1313
.external-service .well p:last-child {
1414
margin-bottom: 0;
1515
}
16-
17-
/* Fancy checkbox */
18-
19-
.external-service .external-service-auto input {
20-
display: block;
21-
height: 53px;
22-
margin: 0 0 -53px -9999px;
23-
outline: none;
24-
}
25-
26-
.external-service .external-service-auto label {
27-
display: block;
28-
position: relative;
29-
min-height: 60px;
30-
padding: 10px 5px 10px 45px;
31-
border-radius: 4px;
32-
cursor: pointer;
33-
font-size: 1em;
34-
-webkit-transition: background-color 200ms linear;
35-
-ms-transition: background-color 200ms linear;
36-
transition: background-color 200ms linear;
37-
}
38-
39-
.external-service .external-service-auto label::before {
40-
font-weight: 400;
41-
content: '\f111'; /* circle outline */
42-
display: block;
43-
position: absolute;
44-
top: 15px;
45-
left: 10px;
46-
font: 2em 'Font Awesome 5 Free';
47-
}
48-
49-
.external-service .external-service-auto input:checked + label::before {
50-
content: '\f058'; /* circle checkmark */
51-
font-weight: 900;
52-
}
53-
54-
.external-service .external-service-auto input:focus + label {
55-
background-color: #f2f2f2;
56-
}
57-
58-
.external-service .external-service-auto input:focus + label:hover,
59-
.external-service .external-service-auto label:hover {
60-
background-color: #e6e6e6;
61-
}
62-
63-
.external-service .external-service-auto input:checked + label {
64-
background-color: #a0ffa0;
65-
}
66-
67-
.external-service .external-service-auto input:checked:focus + label {
68-
background-color: #a8f5a8;
69-
}
70-
71-
.external-service .external-service-auto input:checked:focus + label:hover,
72-
.external-service .external-service-auto input:checked + label:hover {
73-
background-color: #c7fdc7;
74-
}
75-

external_services/templates/external_services/_launch.html

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,29 @@ <h1>{% blocktranslate trimmed with brand=brand name=service_label|parse_localiza
2929
{% else %}
3030
<h4>{% blocktranslate trimmed with name=service_label|parse_localization %}EXTERNAL_SERVICE_LAUNCH_EXERCISE_HOSTED_ON -- {{ name }}{% endblocktranslate %}</h4>
3131
{% endif %}
32-
<div class="card">
33-
{% include "external_services/_privacy.html" %}
32+
<div class="card bg-info-subtle">
33+
<div class="card-body">
34+
{% include "external_services/_privacy.html" %}
35+
</div>
3436
</div>
35-
<p class="external-service-auto">
36-
<input id="extserv-auto-{{ form_id }}" name="auto_accept" type="checkbox" value="1" />
37-
<label for="extserv-auto-{{ form_id }}">
38-
{% if exercise %}
39-
{% if exercise.open_in_iframe %}
40-
{% translate "EXTERNAL_SERVICE_LAUNCH_AUTOMATICALLY_LOAD_EXERCISE_NEXT_TIME" %}
37+
<div class="card bg-secondary-subtle mt-2">
38+
<div class="external-service-auto form-check card-body d-flex align-items-center gap-3 py-2">
39+
<input id="extserv-auto-{{ form_id }}" name="auto_accept" type="checkbox" value="1" />
40+
<label for="extserv-auto-{{ form_id }}">
41+
{% if exercise %}
42+
{% if exercise.open_in_iframe %}
43+
{% translate "EXTERNAL_SERVICE_LAUNCH_AUTOMATICALLY_LOAD_EXERCISE_NEXT_TIME" %}
44+
{% else %}
45+
{% translate "EXTERNAL_SERVICE_LAUNCH_AUTOMATICALLY_OPEN_EXERCISE_NEXT_TIME" %}
46+
{% endif %}
4147
{% else %}
42-
{% translate "EXTERNAL_SERVICE_LAUNCH_AUTOMATICALLY_OPEN_EXERCISE_NEXT_TIME" %}
48+
{% translate "EXTERNAL_SERVICE_LAUNCH_AUTOMATICALLY_CONTINUE_TO_SERVICE_NEXT_TIME" %}
4349
{% endif %}
44-
{% else %}
45-
{% translate "EXTERNAL_SERVICE_LAUNCH_AUTOMATICALLY_CONTINUE_TO_SERVICE_NEXT_TIME" %}
46-
{% endif %}
47-
<br>
48-
{% translate "EXTERNAL_SERVICE_LAUNCH_CHOICE_SAVED_ON_DEVICE_AND_WHERE_TO_REMOVE" %}
49-
</label>
50-
</p>
50+
<br>
51+
{% translate "EXTERNAL_SERVICE_LAUNCH_CHOICE_SAVED_ON_DEVICE_AND_WHERE_TO_REMOVE" %}
52+
</label>
53+
</div>
54+
</div>
5155
<p>
5256
<form method="{{ service.method }}" action="{{ url }}"
5357
target="{% if exercise %}{% if exercise.open_in_iframe %}extserv-frame-{{ form_id }}{% else %}_blank{% endif %}{% else %}_self{% endif %}">
@@ -64,13 +68,15 @@ <h4>{% blocktranslate trimmed with name=service_label|parse_localization %}EXTER
6468
</form>
6569
</p>
6670
{% if parameters %}
67-
<div class="collapse well" id="extserv-more-{{ form_id }}">
68-
<p>{{ service.method }} {{ url }}</p>
69-
<table class="card card-block table">
70-
{% for name, value in parameters|dictsort:0 %}
71-
<tr><th>{{ name }}</th><td>{{ value }}</td></tr>
72-
{% endfor %}
73-
</table>
71+
<div class="collapse card" id="extserv-more-{{ form_id }}">
72+
<div class="card-body">
73+
<p>{{ service.method }} {{ url }}</p>
74+
<table class="table">
75+
{% for name, value in parameters|dictsort:0 %}
76+
<tr><th>{{ name }}</th><td>{{ value }}</td></tr>
77+
{% endfor %}
78+
</table>
79+
</div>
7480
</div>
7581
{% endif %}
7682
</div>

external_services/templates/external_services/_privacy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
{% elif service.destination_region == service.DESTINATION_REGION.GDPR_COMPLIANT %}
9898
{% if service.sends_user_info %}
9999
<p class="alert alert-{{service.is_anonymous|yesno:'info,warning' }}">
100-
<i class="glyphicon glyphicon-exclamation-sign"></i><span>
100+
<i class="bi-exclamation-sign"></i><span>
101101
{% else %}
102102
<p><span>
103103
{% endif %}

0 commit comments

Comments
 (0)