Skip to content

Commit 39be9ad

Browse files
committed
Upgrade: Update Bootstrap classes for Moodle 4.4.
1 parent e40f641 commit 39be9ad

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Changes
66

77
### Unreleased
88

9+
* 2024-08-24 - Upgrade: Update Bootstrap classes for Moodle 4.4.
910
* 2024-08-11 - Updated Moodle Plugin CI to latest upstream recommendations
1011
* 2024-07-24 - Test: Fix broken Behat scenario 'Suppress 'Chat to course participants' link', resolves #696
1112
* 2024-07-23 - Bugfix: Fix unparsable example JSON in Mustache template

classes/table/flavours_overview.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ public function col_appliesto($data) {
152152
if ($data->applytocategories == true) {
153153
$badges[] = \html_writer::tag('span',
154154
get_string('categories'),
155-
['class' => 'badge badge-primary']);
155+
['class' => 'badge bg-primary text-light']);
156156
}
157157

158158
// If apply-to-cohorts is enabled, add a badge.
159159
if ($data->applytocohorts == true) {
160160
$badges[] = \html_writer::tag('span',
161161
get_string('cohorts', 'cohort'),
162-
['class' => 'badge badge-primary']);
162+
['class' => 'badge bg-primary text-light']);
163163
}
164164

165165
// Implode and return the badges.

classes/table/smartmenus_items.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function col_type($data) {
116116
$type = \theme_boost_union\smartmenu_item::get_types($data->type);
117117

118118
// Return the type as badge.
119-
return \html_writer::tag('span', $type, ['class' => 'badge badge-primary']);
119+
return \html_writer::tag('span', $type, ['class' => 'badge bg-primary text-light']);
120120
}
121121

122122
/**
@@ -138,7 +138,7 @@ public function col_restrictions($data) {
138138
$rolelist = $DB->get_records_list('role', 'id', $roles);
139139
$rolenames = role_fix_names($rolelist);
140140
array_walk($rolenames, function(&$value) {
141-
$value = \html_writer::tag('span', $value->localname, ['class' => 'badge badge-primary']);
141+
$value = \html_writer::tag('span', $value->localname, ['class' => 'badge bg-primary text-light']);
142142
});
143143

144144
// Amend rule list.
@@ -154,7 +154,7 @@ public function col_restrictions($data) {
154154
$cohorts = json_decode($data->cohorts);
155155
$cohortlist = $DB->get_records_list('cohort', 'id', $cohorts);
156156
array_walk($cohortlist, function(&$value) {
157-
$value = \html_writer::tag('span', $value->name, ['class' => 'badge badge-primary']);
157+
$value = \html_writer::tag('span', $value->name, ['class' => 'badge bg-primary text-light']);
158158
});
159159

160160
// Amend rule list.
@@ -172,7 +172,7 @@ public function col_restrictions($data) {
172172
$languagelist = [];
173173
foreach ($languages as $lang) {
174174
if (isset($options[$lang])) {
175-
$languagelist[] = \html_writer::tag('span', $options[$lang], ['class' => 'badge badge-primary']);
175+
$languagelist[] = \html_writer::tag('span', $options[$lang], ['class' => 'badge bg-primary text-light']);
176176
}
177177
}
178178

@@ -198,7 +198,7 @@ public function col_restrictions($data) {
198198
}
199199

200200
array_walk($datelist, function(&$value) {
201-
$value = \html_writer::tag('span', $value, ['class' => 'badge badge-primary']);
201+
$value = \html_writer::tag('span', $value, ['class' => 'badge bg-primary text-light']);
202202
});
203203

204204
// Amend rule list.

classes/table/smartmenus_menus.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function col_location($data) {
122122
// Implode all given locations and show a badge for each of them.
123123
return (!empty($locations)) ? implode(' ', array_map(function($value) {
124124
$location = \theme_boost_union\smartmenu::get_location($value);
125-
return \html_writer::tag('span', $location, ['class' => 'badge badge-primary']);
125+
return \html_writer::tag('span', $location, ['class' => 'badge bg-primary text-light']);
126126
}, $locations)) : "";
127127
}
128128

@@ -137,7 +137,7 @@ public function col_type($data) {
137137
$type = \theme_boost_union\smartmenu::get_type($data->type);
138138

139139
// Return the type as badge.
140-
return \html_writer::tag('span', $type, ['class' => 'badge badge-primary']);
140+
return \html_writer::tag('span', $type, ['class' => 'badge bg-primary text-light']);
141141
}
142142

143143
/**

templates/localloginform.mustache

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
<h1 class="login-heading mb-4">{{#str}}loginlocalloginformhead, theme_boost_union{{/str}}</h1>
3636
<form class="login-form" action="{{loginurl}}" method="post" id="login">
3737
<input type="hidden" name="logintoken" value="{{logintoken}}">
38-
<div class="login-form-username form-group">
38+
<div class="login-form-username mb-3">
3939
<label for="username" class="sr-only">{{#str}}username{{/str}}</label>
4040
<input type="text" name="username" id="username" class="form-control form-control-lg" placeholder="{{#cleanstr}}username{{/cleanstr}}">
4141
</div>
42-
<div class="login-form-password form-group">
42+
<div class="login-form-password mb-3">
4343
<label for="password" class="sr-only">{{#str}} password {{/str}}</label>
4444
<input type="password" name="password" id="password" value="" class="form-control form-control-lg" placeholder="{{#cleanstr}}password{{/cleanstr}}">
4545
</div>
46-
<div class="login-form-submit form-group">
46+
<div class="login-form-submit mb-3">
4747
<button class="btn btn-primary btn-lg" type="submit" id="loginbtn">{{#str}}login{{/str}}</button>
4848
</div>
4949
</form>

0 commit comments

Comments
 (0)