MDL-59079 core_analytics: Refactor community of inquiry indicators
[moodle.git] / lib / templates / dataformat_selector.mustache
blob6f5110161dbb9fab5255b57b65da6d28e1373be6
1 {{!
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/>.
17 {{!
18     @template core/dataformat_selector
20     Template for dataformat selection and download form.
22     Context variables required for this template:
23     * label
24     * base
25     * name
26     * params
27     * options
28     * sesskey
29     * submit
31     Example context (json):
32     {
33         "base": "http://example.org/",
34         "name": "test",
35         "label": "Download table data as",
36         "params": false,
37         "options": [{"label": "CSV", "name": "csv"}, {"label": "Excel", "name": "excel"}],
38         "submit": "Download"
39     }
41 <form method="get" action="{{base}}" class="dataformatselector">
42     <div class="mdl-align">
43         <input type="hidden" name="sesskey" value="{{sesskey}}">
44         <label for="downloadtype_{{name}}">{{label}}</label>
45         <select name="{{name}}" id="downloadtype_{{name}}">
46         {{#options}}
47             <option value="{{value}}">{{label}}</option>
48         {{/options}}
49         </select>
50         <input type="submit" value="{{submit}}">
51         {{#params}}
52         <input type="hidden" name="{{name}}" value="{{value}}" />
53         {{/params}}
54     </div>
55 </form>