MDL-52167 admin: format dependencies in search results
[moodle.git] / admin / templates / setting.mustache
CommitLineData
df760229
FM
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{{!
10617d69
DW
18 @template core_admin/setting
19
20 Admin setting template.
21
22 Context variables required for this template:
23 * labelfor - id of the form element
24 * title - Setting title
25 * override - Overridden message
26 * warning - Warning message
27 * name - Setting name
28 * error - Error message
29 * element - The Element HTML
30 * forceltr - Force this element to be displayed LTR
31 * default - Default value
08163b20 32 * dependenton - optional message listing the settings this one is dependent on
10617d69
DW
33
34 Example context (json):
35 {
36 "title": "Setting title",
37 "labelfor": "id0",
38 "override": "Overidden",
39 "warning": "Warning",
40 "name": "Name",
41 "error": "Error",
42 "element": "Raw HTML",
43 "forceltr": false,
44 "default": "Default value"
45 }
df760229 46}}
56cc669c
MM
47{{!
48 Setting.
49}}
50<div class="form-item row" id="{{id}}">
51 <div class="form-label col-sm-3 text-sm-right">
df760229
FM
52 <label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
53 {{{title}}}
54 {{#override}}
55 <div class="form-overridden">{{override}}</div>
56 {{/override}}
57 {{#warning}}
58 <div class="form-warning">{{warning}}</div>
59 {{/warning}}
60 </label>
56cc669c 61 <span class="form-shortname d-block small text-muted">{{{name}}}</span>
df760229 62 </div>
56cc669c 63 <div class="form-setting col-sm-9">
df760229
FM
64 {{#error}}
65 <div><span class="error">{{error}}</span></div>
66 {{/error}}
67 {{{element}}}
68 {{#default}}
56cc669c 69 <div class="form-defaultinfo text-muted {{#forceltr}}text-ltr{{/forceltr}}">{{{default}}}</div>
df760229 70 {{/default}}
56cc669c 71 <div class="form-description mt-3">{{{description}}}</div>
6fb04e76 72 {{#dependenton}}<div class="form-dependenton mb-4 text-muted">{{{.}}}</div>{{/dependenton}}
df760229 73 </div>
df760229 74</div>