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 tool_langimport/langimport
20 Template for the language import page.
22 Classes required for JS:
25 Data attributes required for JS:
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.
37 Example context (json):
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">
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[]">
76 <option value="{{value}}" {{#selected}}selected="selected"{{/selected}}>{{{text}}}</option>
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">
88 <form id="updateform" action="{{updateurl}}" method="post">
90 <input type="submit" value="{{#str}}updatelangs, tool_langimport{{/str}}" class="btn btn-default">
97 <div class="col-md-6 span6 m-b-1">
98 <form id="installform" action="{{installurl}}" method="post">
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}}
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">