2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template mod_bigbluebuttonbn/participant_single_select
20 Moodle template for a single select without the form and autosubmit
21 @see template core/single_select
23 The original select form produced two embedded form tags and would produce random
24 bugs (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-owner)
27 Context variables required for this template:
28 * name - Element name.
29 * method - get or post.
30 * action - the action url to submit to.
31 * classes - Element classes.
32 * label - Element label.
33 * disabled - true if this element is disabled.
34 * title - Element title.
35 * formid - optional id value for the form.
36 * id - id for the element.
37 * params - array of params with name and value attributes.
38 * options - Array of options for the select with value, name , slected and optgroup properites.
39 * labelattributes - Label attributes.
40 * helpicon - Help icon.
42 Example context (json):
46 "action": "http://localhost/stable_master/mod/scorm/player.php",
47 "classes": "langmenu",
48 "label": "Zombies are coming...",
52 "id": "single_select5833dd4f4b08d108",
68 "value": "eXeMapADrive4823c6301cf72b22b72"
74 "name": "English (en)",
85 "labelattributes": [],
90 <div class="{{classes}} d-inline-block">
92 <input type="hidden" name="{{name}}" value="{{value}}">
95 <label for="{{id}}"{{#labelattributes}} {{name}}="{{value}}"{{/labelattributes}}>
102 <select {{#attributes}}{{name}}="{{value}}" {{/attributes}} id="{{id}}" class="custom-select {{classes}}" name="{{name}}"
103 {{#title}}title="{{.}}"{{/title}} {{#disabled}}disabled{{/disabled}}>
106 <optgroup label="{{name}}">
108 <option value="{{value}}" {{#selected}}selected{{/selected}}>{{{name}}}</option>
113 <option {{ignore}} value="{{value}}" {{#selected}}selected{{/selected}}>{{{name}}}</option>
118 <input type="submit" class="btn btn-secondary ml-1" value="{{#str}}go, core{{/str}}">