"Fossies" - the Fresh Open Source Software Archive

Member "moodle/theme/boost/templates/core_form/element-radio.mustache" (6 Sep 2019, 2274 Bytes) of package /linux/www/moodle-3.6.6.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "element-radio.mustache": 3.6.5_vs_3.6.6.

    1 {{!
    2     @template theme_boost/core_form/element-radio
    3 
    4     Example context (json):
    5     {
    6         "element": {
    7             "id": "id_test_radio0",
    8             "name": "test_radio_button"
    9         }
   10     }
   11 
   12 }}
   13 <div class="form-group row {{#error}}has-danger{{/error}} fitem {{#advanced}}advanced{{/advanced}} {{{element.extraclasses}}}">
   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">
   22         <div class="form-check">
   23         <span>
   24             <label class="form-check-label">
   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}}
   33                         autofocus aria-describedby="id_error_{{element.name}}"
   34                     {{/error}} {{{element.attributes}}} >
   35                 {{#text}}
   36                     {{{.}}}
   37                 {{/text}}
   38                 {{^text}}
   39                     {{{label}}}
   40                 {{/text}}
   41             </label>
   42             {{#required}}<abbr class="initialism text-danger" title="{{#str}}required{{/str}}">{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}</abbr>{{/required}}
   43             {{#advanced}}<abbr class="initialism text-info" title="{{#str}}advanced{{/str}}">!</abbr>{{/advanced}}
   44             {{{helpbutton}}}
   45             </span>
   46         </div>
   47         <div class="form-control-feedback invalid-feedback" id="id_error_{{element.name}}" {{#error}} style="display: block;"{{/error}}>
   48             {{{error}}}
   49         </div>
   50     </div>
   51 </div>
   52 {{^element.frozen}}
   53 {{#js}}
   54 require(['theme_boost/form-display-errors'], function(module) {
   55     module.enhance({{#quote}}{{element.id}}{{/quote}});
   56 });
   57 {{/js}}
   58 {{/element.frozen}}