forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodal.mustache
67 lines (57 loc) · 2.17 KB
/
modal.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core/modal
Moodle modal template.
The purpose of this template is to render a modal
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* title A cleaned string (use clean_text()) to display.
* body HTML content for the boday
* footer HTML content for the footer
Example context (json):
{
"title": "Example modal",
"body": "Some example content for the body",
"footer": "Footer text, right here!"
}
}}
<div class="modal-container moodle-has-zindex hide" data-region="modal-container" aria-hidden="true" role="dialog">
<div class="modal {{$classes}}{{/classes}}"
data-region="modal"
aria-labelledby="{{uniqid}}-modal-title"
role="document">
<div class="modal-header" data-region="header">
<button type="button" class="close" data-action="hide" title="{{#str}} closebuttontitle {{/str}}"></button>
{{$header}}
<h3 id="{{uniqid}}-modal-title" data-region="title" tabindex="0">
{{$title}}{{title}}{{/title}}
</h3>
{{/header}}
</div>
<div class="modal-body" data-region="body">
{{$body}}
{{{body}}}
{{/body}}
</div>
<div class="modal-footer" data-region="footer">
{{$footer}}
{{{footer}}}
{{/footer}}
</div>
</div>
</div>