diff --git a/calendar/templates/month_detailed.mustache b/calendar/templates/month_detailed.mustache index 364397e1389..e1273ecee1b 100644 --- a/calendar/templates/month_detailed.mustache +++ b/calendar/templates/month_detailed.mustache @@ -46,7 +46,7 @@ {{# daynames }} - + {{shortname}} {{/ daynames }} diff --git a/calendar/templates/month_mini.mustache b/calendar/templates/month_mini.mustache index d5cef7239f7..ff10a747274 100644 --- a/calendar/templates/month_mini.mustache +++ b/calendar/templates/month_mini.mustache @@ -78,8 +78,8 @@ {{# daynames }} - - {{shortname}} + + {{shortname}} {{/ daynames }} diff --git a/lib/form/templates/element-date_selector.mustache b/lib/form/templates/element-date_selector.mustache index 250c4916c21..1f3897d7ea9 100644 --- a/lib/form/templates/element-date_selector.mustache +++ b/lib/form/templates/element-date_selector.mustache @@ -1,10 +1,13 @@ -{{< core_form/element-template }} +{{< core_form/element-group }} {{$element}} - - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} - +
+ {{label}} + + {{#element.elements}} + {{{separator}}} + {{{html}}} + {{/element.elements}} + +
{{/element}} -{{/ core_form/element-template }} +{{/ core_form/element-group }} diff --git a/lib/form/templates/element-date_time_selector.mustache b/lib/form/templates/element-date_time_selector.mustache index 225c4eefdc3..a78ad2e6800 100644 --- a/lib/form/templates/element-date_time_selector.mustache +++ b/lib/form/templates/element-date_time_selector.mustache @@ -1,10 +1,13 @@ -{{< core_form/element-template }} +{{< core_form/element-group }} {{$element}} -
- {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} -
+
+ {{label}} +
+ {{#element.elements}} + {{{separator}}} + {{{html}}} + {{/element.elements}} +
+
{{/element}} -{{/ core_form/element-template }} +{{/ core_form/element-group }} diff --git a/lib/form/templates/element-group.mustache b/lib/form/templates/element-group.mustache index 9af767f3680..7a53d379e31 100644 --- a/lib/form/templates/element-group.mustache +++ b/lib/form/templates/element-group.mustache @@ -1,8 +1,28 @@ {{< core_form/element-template }} + {{$label}} + {{^element.hiddenlabel}} + + {{/element.hiddenlabel}} + {{/label}} {{$element}} - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} +
+ {{label}} +
+ {{#element.elements}} + {{{separator}}} + {{{html}}} + {{/element.elements}} +
+
{{/element}} {{/ 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}} diff --git a/lib/form/templates/element-template-inline.mustache b/lib/form/templates/element-template-inline.mustache index d445e4858c2..b8f3c481f69 100644 --- a/lib/form/templates/element-template-inline.mustache +++ b/lib/form/templates/element-template-inline.mustache @@ -1,9 +1,14 @@
- + {{$ element }} diff --git a/lib/form/templates/element-template.mustache b/lib/form/templates/element-template.mustache index 6ad5489a041..bbf538dbe9a 100644 --- a/lib/form/templates/element-template.mustache +++ b/lib/form/templates/element-template.mustache @@ -49,16 +49,18 @@ {{#advanced}}!{{/advanced}} {{{helpbutton}}} - {{^element.staticlabel}} - - {{/element.staticlabel}} - {{#element.staticlabel}} - - {{{label}}} - - {{/element.staticlabel}} + {{$ label }} + {{^element.staticlabel}} + + {{/element.staticlabel}} + {{#element.staticlabel}} + + {{{label}}} + + {{/element.staticlabel}} + {{/ label }}
{{$ element }} diff --git a/theme/boost/scss/moodle/question.scss b/theme/boost/scss/moodle/question.scss index 4831fe58dbc..5e6a8bb246f 100644 --- a/theme/boost/scss/moodle/question.scss +++ b/theme/boost/scss/moodle/question.scss @@ -221,12 +221,7 @@ body.path-question-type { /* Hacks to display the labels within a form group. */ - .fitem_fgroup .accesshide { - font: inherit; - position: static; - padding-right: .3em; - } - .form-group .sr-only { + .form-group .sr-only:not(legend) { position: static; width: auto; height: auto; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index b097199aac8..6a5a1c52ebf 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -14917,11 +14917,7 @@ a.ygtvspacer:hover { body.path-question-type { /* Hacks to display the labels within a form group. */ } - body.path-question-type .fitem_fgroup .accesshide { - font: inherit; - position: static; - padding-right: .3em; } - body.path-question-type .form-group .sr-only { + body.path-question-type .form-group .sr-only:not(legend) { position: static; width: auto; height: auto; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 67821109c18..415f3ef6145 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -15135,11 +15135,7 @@ a.ygtvspacer:hover { body.path-question-type { /* Hacks to display the labels within a form group. */ } - body.path-question-type .fitem_fgroup .accesshide { - font: inherit; - position: static; - padding-right: .3em; } - body.path-question-type .form-group .sr-only { + body.path-question-type .form-group .sr-only:not(legend) { position: static; width: auto; height: auto;