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 core/dataformat_selector
20 Context variables required for this template:
29 Example context (json):
31 "base": "http://example.org/",
34 "label": "Download table data as",
36 "options": [{"label": "CSV", "name": "csv"}, {"label": "Excel", "name": "excel"}],
41 <form method="get" action="{{base}}" class="dataformatselector m-1">
42 <div class="form-inline text-xs-right">
43 <input type="hidden" name="sesskey" value="{{sesskey}}">
44 <label for="downloadtype_{{name}}" class="mr-1">{{label}}</label>
45 <select name="{{name}}" id="downloadtype_{{name}}" class="form-control custom-select mr-1">
47 <option value="{{value}}">{{label}}</option>
50 <button type="submit" class="btn btn-secondary">{{submit}}</button>
52 <input type="hidden" name="{{name}}" value="{{value}}">