Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
    Moodle is free software: you can redistribute it and/or modify
4
    it under the terms of the GNU General Public License as published by
5
    the Free Software Foundation, either version 3 of the License, or
6
    (at your option) any later version.
7
    Moodle is distributed in the hope that it will be useful,
8
    but WITHOUT ANY WARRANTY; without even the implied warranty of
9
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
    GNU General Public License for more details.
11
    You should have received a copy of the GNU General Public License
12
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
13
}}
14
{{!
15
    @template mod_data/preset_preview
16
 
17
    The preset preview.
18
 
19
    Example context (json):
20
    {
21
        "formactionurl": "#",
22
        "cmid": "42",
23
        "description": "Preset description",
24
        "preview": "<p>The preset preview HTML</p>",
25
        "userid": "0",
26
        "shortname": "imagegallery"
27
    }
28
}}
29
<div id="template-preview" class="mt-4">
30
    <div class="template-preview-content">
31
    {{{preview}}}
32
    </div>
33
</div>
34
{{< core/sticky_footer }}
35
    {{$ stickycontent }}
36
    <form method="post" action="{{formactionurl}}">
37
        <input type="hidden" name="cmid" value="{{cmid}}">
38
        <input type="hidden" name="mode" value="usepreset">
39
        <input type="hidden" name="action" value="select">
40
        <input type="hidden" name="fullname" value="{{userid}}/{{shortname}}">
41
        <input type="submit" name="selectpreset" data-action="selectpreset" value="{{#str}}usepreset, mod_data{{/str}}" class="btn btn-primary"
42
               data-cmid="{{cmid}}" data-presetname="{{userid}}/{{shortname}}">
43
    </form>
44
    {{/ stickycontent }}
45
{{/ core/sticky_footer }}
46
 
47
{{#js}}
48
    require(['mod_data/importmappingdialogue'], function(importPreset) {
49
        importPreset.init();
50
    });
51
{{/js}}