MDL-64506 templates: Remove BS2 spans from elements.
[moodle.git] / admin / tool / langimport / templates / langimport.mustache
CommitLineData
3adf4b18
JP
1{{!
2 This file is part of Moodle - http://moodle.org/
3
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.
8
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.
13
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/>.
16}}
17{{!
18 @template tool_langimport/langimport
19
20 Template for the language import page.
21
22 Classes required for JS:
23 * none
24
25 Data attributes required for JS:
26 * none
27
28 Context variables required for this template:
29 * sesskey string The session key.
30 * uninstallurl string The URL for the uninstall action.
31 * updateurl string The URL for the update-language-packs action.
32 * installurl string The URL for the install action.
33 * installedoptions array The list of languages installed.
34 * toinstalloptions array The list of languages to be installed.
35 * caninstall boolean Flag to indicate if there are language packs that can be installed.
36
37 Example context (json):
38 {
39 "sesskey": "sesskey",
40 "uninstallurl": "#",
41 "updateurl": "#",
42 "installurl": "#",
43 "installedoptions": [
44 {
45 "value": "en",
46 "text": "English",
47 "selected": true
48 }
49 ],
50 "toinstalloptions": [
51 {
52 "value": "ja",
53 "text": "Japanese"
54 },
55 {
56 "value": "fr",
57 "text": "French"
58 },
59 {
60 "value": "es",
61 "text": "Spanish"
62 }
63 ],
64 "caninstall": true
65 }
66}}
67<div class="container-fluid langimport">
68 <div class="row row-fluid rtl-compatible">
69 <div class="col-md-{{#caninstall}}6{{/caninstall}}{{^caninstall}}12{{/caninstall}} span{{#caninstall}}6{{/caninstall}}{{^caninstall}}12{{/caninstall}} m-b-1">
70 <form id="uninstallform" action="{{uninstallurl}}" method="post">
71 <fieldset>
72 <div class="form-group">
73 <label for="menuuninstalllang">{{#str}}installedlangs, tool_langimport{{/str}}</label>
74 <select size="15" multiple="multiple" id="menuuninstalllang" class="form-control input-block-level" name="uninstalllang[]">
75 {{#installedoptions}}
76 <option value="{{value}}" {{#selected}}selected="selected"{{/selected}}>{{{text}}}‎</option>
77 {{/installedoptions}}
78 </select>
79 </div>
80 <div class="form-group">
81 <input type="hidden" name="sesskey" value="{{sesskey}}">
82 <input id="languninstallbutton" type="submit" value="{{#str}}uninstall, tool_langimport{{/str}}" class="btn btn-default">
83 </div>
84 </fieldset>
85 </form>
86 {{#updateurl}}
87 <div>
88 <form id="updateform" action="{{updateurl}}" method="post">
89 <fieldset>
90 <input type="submit" value="{{#str}}updatelangs, tool_langimport{{/str}}" class="btn btn-default">
91 </fieldset>
92 </form>
93 </div>
94 {{/updateurl}}
95 </div>
96 {{#caninstall}}
6ecc4459 97 <div class="col-md-6 m-b-1">
3adf4b18
JP
98 <form id="installform" action="{{installurl}}" method="post">
99 <fieldset>
100 <div class="form-group">
101 <label for="menupack">{{#str}}availablelangs, install{{/str}}</label>
102 <select size="15" multiple="multiple" class="form-control input-block-level" id="menupack" name="pack[]">
103 {{#toinstalloptions}}
104 <option value="{{value}}" {{#selected}}selected="selected"{{/selected}}>{{{text}}}‎</option>
105 {{/toinstalloptions}}
106 </select>
107 </div>
108 <div class="form-group">
109 <input type="hidden" name="sesskey" value="{{sesskey}}">
110 <input type="submit" value="{{#str}}install, tool_langimport{{/str}}" class="btn btn-default">
111 </div>
112 </fieldset>
113 </form>
114 </div>
115 {{/caninstall}}
116 </div>
117</div>