Merge branch 'MDL-67968-master' of git://github.com/rezaies/moodle

This commit is contained in:
Sara Arjona 2020-03-09 18:16:56 +01:00
commit cd717e8ba8
10 changed files with 72 additions and 52 deletions

View file

@ -46,7 +46,7 @@
<thead> <thead>
<tr> <tr>
{{# daynames }} {{# daynames }}
<th class="header text-xs-center"> <th class="header text-xs-center" aria-label="{{fullname}}">
{{shortname}} {{shortname}}
</th> </th>
{{/ daynames }} {{/ daynames }}

View file

@ -78,8 +78,8 @@
<thead> <thead>
<tr> <tr>
{{# daynames }} {{# daynames }}
<th class="header text-xs-center" scope="col"> <th class="header text-xs-center" scope="col" aria-label="{{fullname}}">
<abbr title="{{fullname}}">{{shortname}}</abbr> {{shortname}}
</th> </th>
{{/ daynames }} {{/ daynames }}
</tr> </tr>

View file

@ -1,10 +1,13 @@
{{< core_form/element-template }} {{< core_form/element-group }}
{{$element}} {{$element}}
<span class="fdate_selector d-flex"> <fieldset class="m-0 p-0 border-0" id="{{element.id}}">
{{#element.elements}} <legend class="sr-only">{{label}}</legend>
{{{separator}}} <span class="fdate_selector d-flex">
{{{html}}} {{#element.elements}}
{{/element.elements}} {{{separator}}}
</span> {{{html}}}
{{/element.elements}}
</span>
</fieldset>
{{/element}} {{/element}}
{{/ core_form/element-template }} {{/ core_form/element-group }}

View file

@ -1,10 +1,13 @@
{{< core_form/element-template }} {{< core_form/element-group }}
{{$element}} {{$element}}
<div class="fdate_time_selector d-flex flex-wrap align-items-center"> <fieldset class="m-0 p-0 border-0" id="{{element.id}}">
{{#element.elements}} <legend class="sr-only">{{label}}</legend>
{{{separator}}} <div class="fdate_time_selector d-flex flex-wrap align-items-center">
{{{html}}} {{#element.elements}}
{{/element.elements}} {{{separator}}}
</div> {{{html}}}
{{/element.elements}}
</div>
</fieldset>
{{/element}} {{/element}}
{{/ core_form/element-template }} {{/ core_form/element-group }}

View file

@ -1,8 +1,28 @@
{{< core_form/element-template }} {{< core_form/element-template }}
{{$label}}
{{^element.hiddenlabel}}
<p id="{{element.id}}_label" class="col-form-label d-inline" aria-hidden="true">
{{{label}}}
</p>
{{/element.hiddenlabel}}
{{/label}}
{{$element}} {{$element}}
{{#element.elements}} <fieldset class="m-0 p-0 border-0">
{{{separator}}} <legend class="sr-only">{{label}}</legend>
{{{html}}} <div class="d-flex flex-wrap">
{{/element.elements}} {{#element.elements}}
{{{separator}}}
{{{html}}}
{{/element.elements}}
</div>
</fieldset>
{{/element}} {{/element}}
{{/ core_form/element-template }} {{/ core_form/element-template }}
{{#js}}
require(['jquery'], function($) {
$('#{{element.id}}_label').css('cursor', 'default');
$('#{{element.id}}_label').click(function() {
$('#{{element.id}}').find('button, a, input, select, textarea, [tabindex]:not([tabindex="-1"])').filter(':enabled').first().focus();
});
});
{{/js}}

View file

@ -1,9 +1,14 @@
<div class="form-group {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}" {{#element.groupname}}data-groupname="{{.}}"{{/element.groupname}}> <div class="form-group {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}" {{#element.groupname}}data-groupname="{{.}}"{{/element.groupname}}>
<label class="col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}"> {{#label}}
{{{label}}} {{{helpbutton}}} <label class="col-form-label {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
{{{label}}}
</label>
{{/label}}
<span>
{{{helpbutton}}}
{{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}} {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}}
{{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}} {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
</label> </span>
<span data-fieldtype="{{element.type}}"> <span data-fieldtype="{{element.type}}">
{{$ element }} {{$ element }}
<!-- Element goes here --> <!-- Element goes here -->

View file

@ -49,16 +49,18 @@
{{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}} {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
{{{helpbutton}}} {{{helpbutton}}}
</span> </span>
{{^element.staticlabel}} {{$ label }}
<label class="col-form-label d-inline {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}"> {{^element.staticlabel}}
{{{label}}} <label class="col-form-label d-inline {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}" for="{{element.id}}">
</label> {{{label}}}
{{/element.staticlabel}} </label>
{{#element.staticlabel}} {{/element.staticlabel}}
<span class="col-form-label d-inline-block {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}"> {{#element.staticlabel}}
{{{label}}} <span class="col-form-label d-inline-block {{#element.hiddenlabel}}sr-only{{/element.hiddenlabel}}">
</span> {{{label}}}
{{/element.staticlabel}} </span>
{{/element.staticlabel}}
{{/ label }}
</div> </div>
<div class="col-md-9 form-inline felement" data-fieldtype="{{element.type}}"> <div class="col-md-9 form-inline felement" data-fieldtype="{{element.type}}">
{{$ element }} {{$ element }}

View file

@ -221,12 +221,7 @@
body.path-question-type { body.path-question-type {
/* Hacks to display the labels within a form group. */ /* Hacks to display the labels within a form group. */
.fitem_fgroup .accesshide { .form-group .sr-only:not(legend) {
font: inherit;
position: static;
padding-right: .3em;
}
.form-group .sr-only {
position: static; position: static;
width: auto; width: auto;
height: auto; height: auto;

View file

@ -14917,11 +14917,7 @@ a.ygtvspacer:hover {
body.path-question-type { body.path-question-type {
/* Hacks to display the labels within a form group. */ } /* Hacks to display the labels within a form group. */ }
body.path-question-type .fitem_fgroup .accesshide { body.path-question-type .form-group .sr-only:not(legend) {
font: inherit;
position: static;
padding-right: .3em; }
body.path-question-type .form-group .sr-only {
position: static; position: static;
width: auto; width: auto;
height: auto; height: auto;

View file

@ -15135,11 +15135,7 @@ a.ygtvspacer:hover {
body.path-question-type { body.path-question-type {
/* Hacks to display the labels within a form group. */ } /* Hacks to display the labels within a form group. */ }
body.path-question-type .fitem_fgroup .accesshide { body.path-question-type .form-group .sr-only:not(legend) {
font: inherit;
position: static;
padding-right: .3em; }
body.path-question-type .form-group .sr-only {
position: static; position: static;
width: auto; width: auto;
height: auto; height: auto;