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
 
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 mod_unilabel/edit_element_base
19
    Template to get the form items for a single element
20
 
21
    Example context (json):
22
    {
23
        "formid": "mform_jflajfldsa",
24
        "repeatindex": 1,
25
        "repeatnr": 2,
26
        "sortorderelement": "<div>Dummy sortorderelement</div>",
27
        "headingelement": "<div>Dummy heading</div>",
28
        "contentelement": "<div>Dummy content</div>"
29
    }
30
}}
31
 
32
<fieldset class="clearfix collapsible collapsed" id="id_singleelementheader_{{repeatindex}}">
33
    <legend class="sr-only">{{elementsname}}-{{repeatnr}}</legend>
34
    <div class="d-flex align-items-center mb-2">
35
        <div class="position-relative d-flex ftoggler align-items-center position-relative mr-1">
36
                <a data-toggle="collapse" href="#id_singleelementheader_{{repeatindex}}container" role="button" aria-expanded="true" aria-controls="id_singleelementheader_{{repeatindex}}container" class="btn btn-icon mr-1 icons-collapse-expand stretched-link fheader collapsed">
37
                    <span class="expanded-icon icon-no-margin p-2" title="Collapse">
38
                        <i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
39
                    </span>
40
                    <span class="collapsed-icon icon-no-margin p-2" title="Expand">
41
                        <span class="dir-rtl-hide"><i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i></span>
42
                        <span class="dir-ltr-hide"><i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i></span>
43
                    </span>
44
                    <span class="sr-only">{{elementsname}}-{{repeatnr}}</span>
45
                </a>
46
            <h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
47
                {{elementsname}}-{{repeatnr}}
48
            </h3>
49
        </div>
50
        {{> mod_unilabel/element_action_buttons }}
51
    </div>
52
    <div id="id_singleelementheader_{{repeatindex}}container" class="collapse">
53
    {{#sortorderelement}}
54
        <div class="d-none">
55
            {{{.}}}
56
        </div>
57
    {{/sortorderelement}}
58
        {{#elements}}
59
            <div>
60
                {{{.}}}
61
            </div>
62
        {{/elements}}
63
    </div>
64
</fieldset>