1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-11 11:23:52 +02:00

MDL-84951 theme_boost: Fix deprecated Bootstrap class usages

This commit is contained in:
Mikel Martín 2025-03-26 16:52:21 +01:00 committed by Laurent David
parent b2b5e32058
commit afc113f33c
21 changed files with 31 additions and 43 deletions
admin
classes/reportbuilder/local/systemreports
tool
componentlibrary/content/moodle/themes
generator/templates
ai/classes/table
course/format/templates/local/overview
grade
lib/templates/datafilter/filtertypes
message/output/email/templates
mod
data/classes
quiz/classes/output
question/bank/managecategories/templates
theme
boost
scss/moodle
style
classic/style

@ -159,11 +159,11 @@ class users extends system_report {
->add_callback(static function(string $fullname, \stdClass $row): string {
if ($row->suspended) {
$fullname .= ' ' . \html_writer::tag('span', get_string('suspended', 'moodle'),
['class' => 'badge badge-secondary ms-1']);
['class' => 'badge text-bg-secondary ms-1']);
}
if (!$row->confirmed) {
$fullname .= ' ' . \html_writer::tag('span', get_string('confirmationpending', 'admin'),
['class' => 'badge badge-danger ms-1']);
['class' => 'badge text-bg-danger ms-1']);
}
return $fullname;
});

@ -48,7 +48,7 @@ These colours are used throughout Moodle in text, buttons
{{< example show_markup=false >}}
<p>
<span class="badge badge-success">Badges</span>
<span class="badge text-bg-success">Badges</span>
</p>
<p>
<button class="btn btn-success">Buttons</button>

@ -47,7 +47,7 @@
{{{given}}}
{{#example}}
<div class="alert alert-info mb-0 mt-2" role="alert" style="overflow: auto;">
<div class="fw-bold mr-2 ">{{#str}} step_example, tool_generator {{/str}}</div>
<div class="fw-bold me-2 ">{{#str}} step_example, tool_generator {{/str}}</div>
<pre class="mb-0">{{example}}</pre>
</div>
{{/example}}

@ -272,7 +272,7 @@ class aiprovider_management_table extends flexible_table implements dynamic_tabl
],
'title' => $labelstr,
'label' => $labelstr,
'labelclasses' => 'sr-only',
'labelclasses' => 'visually-hidden',
];
return $OUTPUT->render_from_template('core_admin/setting_configtoggle', $params);

@ -26,7 +26,7 @@
{
"key": "name",
"name": "Activity Name",
"textalign": "text-left"
"textalign": "text-start"
},
{
"key": "completion",
@ -42,7 +42,7 @@
"overview": "name",
"value": "Assignment 1",
"content": "Assignment 1",
"textalign": "text-left"
"textalign": "text-start"
},
{
"overview": "completion",
@ -61,7 +61,7 @@
"overview": "name",
"value": "Quiz 1",
"content": "Quiz 1",
"textalign": "text-left"
"textalign": "text-start"
},
{
"overview": "completion",

@ -43,13 +43,13 @@
{{{title}}}
</div>
<div class="navitem ml-auto">
<div class="ml-1">
<div class="navitem ms-auto">
<div class="ms-1">
<button id="addrulebutton" type="button" class="btn btn-primary">{{# str }} addrule, gradepenalty_duedate {{/ str }}</button>
</div>
{{#deleteallrulebutton }}
<div id="deleteallrulesbuttoncontainer" class="ml-1">
<div id="deleteallrulesbuttoncontainer" class="ms-1">
{{>core/single_button}}
</div>
{{/deleteallrulebutton }}

@ -54,15 +54,15 @@
{{{title}}}
</div>
<div class="navitem ml-auto">
<div class="navitem ms-auto">
{{#editbutton}}
<div class="ml-1">
<div class="ms-1">
{{>core/single_button}}
</div>
{{/editbutton}}
{{#resetbutton}}
<div class="ml-1">
<div class="ms-1">
{{>core/single_button}}
</div>
{{/resetbutton}}

@ -36,16 +36,16 @@
<div class="container">
<div class="row">
<div class="mr-0">{{#str}}originalgrade, core_grades{{/str}}: </div>
<div class="me-0">{{#str}}originalgrade, core_grades{{/str}}: </div>
{{>core_grades/grades/grader/input}}
</div>
<div class="row">
<div class="mr-0">{{#str}}currentgrade, core_grades{{/str}}: {{{effectivegrade}}}</div>
<div class="me-0">{{#str}}currentgrade, core_grades{{/str}}: {{{effectivegrade}}}</div>
</div>
<div class="row">
<div class="mr-0" title="{{exemptiontooltip}}">{{#str}}exemptpenalty, core_grades{{/str}}:</div>
<div class="me-0" title="{{exemptiontooltip}}">{{#str}}exemptpenalty, core_grades{{/str}}:</div>
<label for="{{exemptionid}}" class="accesshide">{{{exemptionlabel}}}</label>
<input type="checkbox" name="{{exemptionname}}"
value="{{deductedmark}}" id="{{exemptionid}}"

@ -50,7 +50,7 @@
]
}
}}
<label for="core-filter_row-{{filtertype}}-mode-{{uniqid}}" class="sr-only">{{label}}</label>
<label for="core-filter_row-{{filtertype}}-mode-{{uniqid}}" class="visually-hidden">{{label}}</label>
<select
id="core-filter_row-{{filtertype}}-mode-{{uniqid}}"
name="{{filtertype}}-mode"

@ -41,7 +41,7 @@
<div class="d-flex flex-column flex-md-row align-items-md-center" data-required="{{required}}">
<span id="core-filter_row-{{filtertype}}-mode-{{uniqid}}"></span>
<span class="{{filtertype}}-afterwrapper">
<label for="core-filter_row-{{filtertype}}-after-{{uniqid}}" class="sr-only">{{afterlabel}}</label>
<label for="core-filter_row-{{filtertype}}-after-{{uniqid}}" class="visually-hidden">{{afterlabel}}</label>
<input
id="core-filter_row-{{filtertype}}-after-{{uniqid}}"
type="datetime-local"
@ -57,7 +57,7 @@
{{#str}} operator_and {{/str}}
</span>
<span class="{{filtertype}}-beforewrapper">
<label for="core-filter_row-{{filtertype}}-before-{{uniqid}}" class="sr-only">{{beforelabel}}</label>
<label for="core-filter_row-{{filtertype}}-before-{{uniqid}}" class="visually-hidden">{{beforelabel}}</label>
<input
id="core-filter_row-{{filtertype}}-before-{{uniqid}}"
type="datetime-local"

@ -70,10 +70,10 @@
padding: 10px;
vertical-align: top;
}
.text-left {
.text-start {
text-align: left;
}
.text-right {
.text-end {
text-align: right;
}
.float-right {
@ -124,11 +124,11 @@
<th width="40px">
<img src="{{{ grouppictureurl }}}" class="round" width="40px" height="40px"/>
</th>
<th class="text-left">
<th class="text-start">
<strong>{{ groupname }}</strong><br>
{{ coursename }}
</th>
<th class="nowrap text-right">
<th class="nowrap text-end">
<span class="badge">{{ numberofunreadmessages }}</span> <span class="gray-light">{{#str}} emaildigestunreadmessages, message_email {{/str}}</span>
</th>
</tr>

@ -480,7 +480,7 @@ class template {
'classes' => 'recordcheckbox',
'value' => $entry->id,
'label' => get_string('selectfordeletion', 'data'),
'labelclasses' => 'sr-only',
'labelclasses' => 'visually-hidden',
]);
return $OUTPUT->render($checkbox);
}

@ -1079,7 +1079,7 @@ class edit_renderer extends \plugin_renderer_base {
$output .= html_writer::span($title);
$output .= html_writer::span(
get_string('invalidquestiontype', 'question', $question->originalqtype),
'badge bg-danger text-white ml-3'
'badge bg-danger text-white ms-3'
);
} else {

@ -31,7 +31,7 @@
"courseid": "1234"
}
}}
<div id="qbank_managecategories-addcategory" class="pl-3">
<div id="qbank_managecategories-addcategory" class="ps-3">
<button type="submit" data-action="addeditcategory" data-actiontype="add"
data-contextid="{{contextid}}"
data-cmid="{{cmid}}" data-courseid="{{courseid}}" class="btn btn-primary">

@ -49,7 +49,7 @@
}
}}
<div id="categoryroot"
class="editing col-11 col-md-12 mt-3 pl-0{{#showdescriptions}} showdescriptions{{/showdescriptions}}"
class="editing col-11 col-md-12 mt-3 ps-0{{#showdescriptions}} showdescriptions{{/showdescriptions}}"
data-contextid="{{{contextid}}}">
{{#categoriesrendered}}
<h3 class="context-heading">{{heading}}</h3>

@ -37,7 +37,7 @@
}
}}
<div>
<div class="pl-3">
<div class="ps-3">
{{{helpstringhead}}}
</div>
</div>

@ -52,7 +52,7 @@
data-sortorder="{{sortorder}}">
<div class="container{{#haschildren}} pb-0{{/haschildren}}">
<div class="d-flex flex-wrap m-0">
<div class="p-2 mr-2 qbank_managecategories-handlecontainer">
<div class="p-2 me-2 qbank_managecategories-handlecontainer">
<span class="qbank_managecategories-draghandle">
<i class="fa fa-grip-vertical"></i>
</span>

@ -46,7 +46,7 @@
<a title="{{#str}}editquestions, question{{/str}}" href="{{{questionbankurl}}}" role="button">
{{categoryname}}
{{#idnumber}}
<span class="badge badge-primary">
<span class="badge text-bg-primary">
<span class="accesshide">
{{#str}}idnumber, question{{/str}}
</span>

@ -527,10 +527,6 @@ $message-day-color: color-contrast($message-app-bg) !default;
&:hover {
color: $white;
background-color: $primary;
.badge-primary {
background-color: $white;
color: $primary;
}
}
&:first-child {
border-top: 0;

@ -33589,10 +33589,6 @@ a.ygtvspacer:hover {
color: #fff;
background-color: #0f6cbf;
}
.message-app .list-group .list-group-item:hover .badge-primary {
background-color: #fff;
color: #0f6cbf;
}
.message-app .list-group .list-group-item:first-child {
border-top: 0;
}

@ -33589,10 +33589,6 @@ a.ygtvspacer:hover {
color: #fff;
background-color: #0f6cbf;
}
.message-app .list-group .list-group-item:hover .badge-primary {
background-color: #fff;
color: #0f6cbf;
}
.message-app .list-group .list-group-item:first-child {
border-top: 0;
}