Merge branch 'MDL-85040-405-new' of https://github.com/meirzamoodle/moodle into MOODLE_405_STABLE
This commit is contained in:
@@ -50,8 +50,8 @@
|
||||
{{/text}}
|
||||
<div class="ms-2 d-flex align-items-center align-self-start">
|
||||
{{#required}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}">
|
||||
{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}" aria-hidden="true">
|
||||
{{#pix}}req, core{{/pix}}
|
||||
</div>
|
||||
{{/required}}
|
||||
{{{helpbutton}}}
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
{{/text}}
|
||||
<div class="ms-2 d-flex align-items-center align-self-start">
|
||||
{{#required}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}">
|
||||
{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}" aria-hidden="true">
|
||||
{{#pix}}req, core{{/pix}}
|
||||
</div>
|
||||
{{/required}}
|
||||
{{{helpbutton}}}
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
</label>
|
||||
<div class="ms-2 d-flex align-items-center align-self-start">
|
||||
{{#required}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}">
|
||||
{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}" aria-hidden="true">
|
||||
{{#pix}}req, core{{/pix}}
|
||||
</div>
|
||||
{{/required}}
|
||||
{{{helpbutton}}}
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
{{/ label }}{{/ label}}
|
||||
<div class="form-label-addon d-flex align-items-center align-self-start">
|
||||
{{#required}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}">
|
||||
{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}
|
||||
<div class="text-danger" title="{{#str}}required{{/str}}" aria-hidden="true">
|
||||
{{#pix}}req, core{{/pix}}
|
||||
</div>
|
||||
{{/required}}
|
||||
{{{helpbutton}}}
|
||||
|
||||
+12
-2
@@ -1776,7 +1776,17 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
|
||||
}
|
||||
$this->_reqHTML = '<span class="req">' . $OUTPUT->pix_icon('req', get_string('requiredelement', 'form')) . '</span>';
|
||||
$this->_advancedHTML = '<span class="adv">' . $OUTPUT->pix_icon('adv', get_string('advancedelement', 'form')) . '</span>';
|
||||
$this->setRequiredNote(get_string('somefieldsrequired', 'form', $OUTPUT->pix_icon('req', get_string('requiredelement', 'form'))));
|
||||
$this->setRequiredNote(
|
||||
get_string(
|
||||
identifier: 'somefieldsrequired',
|
||||
component: 'form',
|
||||
a: $OUTPUT->pix_icon(
|
||||
pix: 'req',
|
||||
alt: get_string('requiredelement', 'form'),
|
||||
attributes: ['aria-hidden' => 'true'],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3194,7 +3204,7 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{
|
||||
|
||||
/** @var string Required Note template string */
|
||||
var $_requiredNoteTemplate =
|
||||
"\n\t\t<div class=\"fdescription required\">{requiredNote}</div>";
|
||||
"\n\t\t<div class=\"fdescription required\" aria-hidden=\"true\">{requiredNote}</div>";
|
||||
|
||||
/**
|
||||
* Collapsible buttons string template.
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
* pix
|
||||
* title
|
||||
* extraclasses
|
||||
* aria-hidden - whether the icon is hidden from assistive technologies
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
@@ -38,12 +39,13 @@
|
||||
"title": "Meh",
|
||||
"alt": "Meh Meh",
|
||||
"extraclasses": "fa-spin",
|
||||
"unmappedIcon": false
|
||||
"unmappedIcon": false,
|
||||
"aria-hidden": false
|
||||
}
|
||||
|
||||
}}
|
||||
{{^unmappedIcon}}
|
||||
<i class="icon {{key}} fa-fw {{extraclasses}}" {{#aria-hidden}}aria-hidden="true"{{/aria-hidden}} {{#title}}title="{{title}}"{{/title}} {{#alt}}role="img" aria-label="{{alt}}"{{/alt}}></i>
|
||||
<i class="icon {{key}} fa-fw {{extraclasses}}"{{#aria-hidden}} aria-hidden="true"{{/aria-hidden}} {{#title}} title="{{title}}"{{/title}}{{^aria-hidden}}{{#alt}} role="img" aria-label="{{alt}}"{{/alt}}{{/aria-hidden}}></i>
|
||||
{{/unmappedIcon}}
|
||||
{{#unmappedIcon}}
|
||||
{{! We cannot include the pix_icon template directly here because we don't have all the mustache helpers loaded. }}
|
||||
|
||||
Reference in New Issue
Block a user