MDL-65595 core: Remove the nowrap from the form's radio template
[moodle.git] / lib / form / templates / element-radio.mustache
CommitLineData
e816b872
DP
1{{!
2 @template theme_boost/core_form/element-radio
3
4 Example context (json):
5 {
6 "element": {
c03f1de1
DM
7 "id": "id_test_radio0",
8 "name": "test_radio_button"
e816b872
DP
9 }
10 }
11
12}}
58488d0f 13<div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
dc801cb6
MN
14 <div class="col-md-3">
15 {{#text}}
16 <label for="{{element.id}}">
17 {{{label}}}
18 </label>
19 {{/text}}
20 </div>
21 <div class="col-md-9 checkbox">
d2d150b2 22 <div class="form-check">
02754b51 23 <span>
d2d150b2 24 <label class="form-check-label">
fba3c3be
LB
25 {{^element.hardfrozen}}{{#element.frozen}}{{#element.checked}}
26 <input type="hidden" name="{{element.name}}" value="{{element.value}}">
27 {{/element.checked}}{{/element.frozen}}{{/element.hardfrozen}}
28 <input type="radio" class="form-check-input" {{^element.frozen}}name="{{element.name}}"{{/element.frozen}}
29 id="{{element.id}}" value="{{element.value}}"
30 {{#element.checked}}checked{{/element.checked}}
31 {{#element.frozen}}disabled{{/element.frozen}}
32 {{#error}}
521989ec 33 autofocus aria-describedby="{{element.iderror}}"
fba3c3be
LB
34 {{/error}} {{{element.attributes}}} >
35 {{#text}}
36 {{{.}}}
37 {{/text}}
38 {{^text}}
39 {{{label}}}
40 {{/text}}
d2d150b2 41 </label>
348aed80 42 {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}}
d91cbe1e 43 {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
dc801cb6 44 {{{helpbutton}}}
fba3c3be
LB
45 </span>
46 </div>
521989ec 47 <div class="form-control-feedback invalid-feedback" id="{{element.iderror}}" {{#error}} style="display: block;"{{/error}}>
344321e1
DW
48 {{{error}}}
49 </div>
50 </div>
51</div>
63e4df60 52{{^element.frozen}}
344321e1 53{{#js}}
2ede86d7 54require(['theme_boost/form-display-errors'], function(module) {
4691b2d0 55 module.enhance({{#quote}}{{element.id}}{{/quote}});
344321e1 56});
63e4df60
DW
57{{/js}}
58{{/element.frozen}}