1 |
efrain |
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 tiny_h5p/modal
|
|
|
19 |
|
|
|
20 |
Modal to manage an H5P activity within the Tiny Edigtor.
|
|
|
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 |
|
|
|
30 |
Example context (json):
|
|
|
31 |
{
|
|
|
32 |
"elementid": "exampleId"
|
|
|
33 |
}
|
|
|
34 |
}}
|
|
|
35 |
|
|
|
36 |
{{< core/modal }}
|
|
|
37 |
|
|
|
38 |
{{$title}}
|
|
|
39 |
{{#str}} modaltitle, tiny_h5p {{/str}}
|
|
|
40 |
{{/title}}
|
|
|
41 |
|
|
|
42 |
{{$body}}
|
|
|
43 |
<form class="mform">
|
|
|
44 |
|
|
|
45 |
{{# noh5pcontent }}
|
|
|
46 |
<div role="alert" class="alert alert-warning mb-1">
|
|
|
47 |
{{#str}} noh5pcontent, tiny_h5p{{/str}}
|
|
|
48 |
</div>
|
|
|
49 |
{{/ noh5pcontent }}
|
|
|
50 |
|
|
|
51 |
{{# invalidUrl }}
|
|
|
52 |
<div role="alert" class="alert alert-warning mb-1">
|
|
|
53 |
{{#str}} invalidh5purl, tiny_h5p{{/str}}
|
|
|
54 |
</div>
|
|
|
55 |
{{/ invalidUrl }}
|
|
|
56 |
|
|
|
57 |
{{#canUploadAndEmbed}}
|
|
|
58 |
<div class="mt-2 mb-4">{{#str}} instructions, tiny_h5p{{/str}}</div>
|
|
|
59 |
{{/canUploadAndEmbed}}
|
|
|
60 |
|
|
|
61 |
<div class="mb-4">
|
|
|
62 |
<label for="{{elementid}}-{{uniqid}}-filepath">
|
|
|
63 |
{{#canUploadAndEmbed}}
|
|
|
64 |
{{#str}} h5pfileorurl, tiny_h5p{{/str}}
|
|
|
65 |
{{/canUploadAndEmbed}}
|
|
|
66 |
{{^canUploadAndEmbed}}
|
|
|
67 |
{{#canUpload}}
|
|
|
68 |
{{#str}} h5pfile, tiny_h5p{{/str}}
|
|
|
69 |
{{/canUpload}}
|
|
|
70 |
{{#canEmbed}}
|
|
|
71 |
{{#str}} h5purl, tiny_h5p{{/str}}
|
|
|
72 |
{{/canEmbed}}
|
|
|
73 |
{{/canUploadAndEmbed}}
|
|
|
74 |
</label>
|
|
|
75 |
|
|
|
76 |
<div class="input-group input-append w-100">
|
|
|
77 |
<input name="url" class="form-control" type="url" value="{{fileURL}}"{{!
|
|
|
78 |
}} id="{{elementid}}-{{uniqid}}-filepath"{{!
|
|
|
79 |
}} size="32"{{!
|
|
|
80 |
}} />
|
|
|
81 |
{{#canUpload}}
|
|
|
82 |
<span class="input-group-append">
|
|
|
83 |
<button class="btn btn-secondary" type="button" data-target="filepicker">
|
|
|
84 |
{{#str}} browserepositories, tiny_h5p{{/str}}</button>
|
|
|
85 |
</span>
|
|
|
86 |
{{/canUpload}}
|
|
|
87 |
</div>
|
|
|
88 |
|
|
|
89 |
{{#canUpload}}
|
|
|
90 |
<fieldset class="mt-2 collapsible" id="{{elementid}}-{{uniqid}}-options">
|
|
|
91 |
<legend class="d-flex align-items-center px-1">
|
|
|
92 |
<div class="position-relative d-flex ftoggler align-items-center position-relative mr-1">
|
|
|
93 |
<a role="button" data-toggle="collapse"{{!
|
|
|
94 |
}} href="#h5poptions"{{!
|
|
|
95 |
}} aria-expanded="{{#showOptions}}true{{/showOptions}}{{^showOptions}}false{{/showOptions}}"{{!
|
|
|
96 |
}} aria-controls="h5poptions"{{!
|
|
|
97 |
}} class="btn btn-icon mr-1 icons-collapse-expand stretched-link fheader {{^showOptions}}collapsed{{/showOptions}}"{{!
|
|
|
98 |
}}>
|
|
|
99 |
<span class="expanded-icon icon-no-margin p-2"
|
|
|
100 |
title="{{#str}} collapse, moodle {{/str}}">
|
|
|
101 |
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
|
|
|
102 |
</span>
|
|
|
103 |
<span class="collapsed-icon icon-no-margin p-2"
|
|
|
104 |
title="{{#str}} expand, moodle {{/str}}">
|
|
|
105 |
<span class="dir-rtl-hide">
|
|
|
106 |
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
|
|
|
107 |
</span>
|
|
|
108 |
<span class="dir-ltr-hide">
|
|
|
109 |
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
|
|
|
110 |
</span>
|
|
|
111 |
</span>
|
|
|
112 |
<span class="sr-only">{{#str}} h5poptions, tiny_h5p{{/str}}</span>
|
|
|
113 |
</a>
|
|
|
114 |
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
|
|
|
115 |
{{#str}} h5poptions, tiny_h5p{{/str}}
|
|
|
116 |
</h3>
|
|
|
117 |
</div>
|
|
|
118 |
</legend>
|
|
|
119 |
<div id="h5poptions" class="fcontainer collapseable collapse px-1 {{#showOptions}}show{{/showOptions}}">
|
|
|
120 |
<div class="form-check">
|
|
|
121 |
<input type="checkbox" {{!
|
|
|
122 |
}} name="download"{{!
|
|
|
123 |
}} {{# download }}checked{{/ download }}{{!
|
|
|
124 |
}} class="form-check-input"{{!
|
|
|
125 |
}} aria-label="{{#str}} downloadbutton, tiny_h5p{{/str}}"{{!
|
|
|
126 |
}} id="{{elementid}}-{{uniqid}}_h5p-option-allow-download"{{!
|
|
|
127 |
}} />
|
|
|
128 |
<label class="form-check-label" for="{{elementid}}-{{uniqid}}_h5p-option-allow-download">
|
|
|
129 |
{{#str}} downloadbutton, tiny_h5p{{/str}}
|
|
|
130 |
</label>
|
|
|
131 |
</div>
|
|
|
132 |
<div class="form-check">
|
|
|
133 |
<input type="checkbox"{{!
|
|
|
134 |
}} name="embed"{{!
|
|
|
135 |
}} {{# embed }}checked{{/ embed }}{{!
|
|
|
136 |
}} class="form-check-input"{{!
|
|
|
137 |
}} aria-label="{{#str}} embedbutton, tiny_h5p{{/str}}"{{!
|
|
|
138 |
}} id="{{elementid}}-{{uniqid}}_h5p-option-embed-button"{{!
|
|
|
139 |
}} />
|
|
|
140 |
<label class="form-check-label" for="{{elementid}}-{{uniqid}}_h5p-option-embed-button">
|
|
|
141 |
{{#str}} embedbutton, tiny_h5p{{/str}}
|
|
|
142 |
</label>
|
|
|
143 |
</div>
|
|
|
144 |
<div class="form-check mb-2">
|
|
|
145 |
<input type="checkbox"{{!
|
|
|
146 |
}} name="copyright"{{!
|
|
|
147 |
}} {{# copyright }}checked{{/ copyright }}{{!
|
|
|
148 |
}} class="form-check-input"{{!
|
|
|
149 |
}} aria-label="{{#str}} copyrightbutton, tiny_h5p{{/str}}"{{!
|
|
|
150 |
}} id="{{elementid}}-{{uniqid}}_h5p-option-copyright-button" {{!
|
|
|
151 |
}}/>
|
|
|
152 |
<label class="form-check-label" for="{{elementid}}-{{uniqid}}_h5p-option-copyright-button">
|
|
|
153 |
{{#str}} copyrightbutton, tiny_h5p{{/str}}
|
|
|
154 |
</label>
|
|
|
155 |
</div>
|
|
|
156 |
</div>
|
|
|
157 |
</fieldset>
|
|
|
158 |
{{/canUpload}}
|
|
|
159 |
</div>
|
|
|
160 |
</form>
|
|
|
161 |
{{/body}}
|
|
|
162 |
|
|
|
163 |
{{$footer}}
|
|
|
164 |
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
|
|
|
165 |
<button type="button" class="btn btn-primary" data-action="save">{{#str}} insert, tiny_h5p{{/str}}</button>
|
|
|
166 |
{{/footer}}
|
|
|
167 |
{{/ core/modal }}
|