Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{{!
    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 mod_unilabel/edit_element_base
    Template to get the form items for a single element

    Example context (json):
    {
        "formid": "mform_jflajfldsa",
        "repeatindex": 1,
        "repeatnr": 2,
        "sortorderelement": "<div>Dummy sortorderelement</div>",
        "headingelement": "<div>Dummy heading</div>",
        "contentelement": "<div>Dummy content</div>"
    }
}}

<fieldset class="clearfix collapsible collapsed" id="id_singleelementheader_{{repeatindex}}">
    <legend class="sr-only">{{elementsname}}-{{repeatnr}}</legend>
    <div class="d-flex align-items-center mb-2">
        <div class="position-relative d-flex ftoggler align-items-center position-relative mr-1">
                <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">
                    <span class="expanded-icon icon-no-margin p-2" title="Collapse">
                        <i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
                    </span>
                    <span class="collapsed-icon icon-no-margin p-2" title="Expand">
                        <span class="dir-rtl-hide"><i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i></span>
                        <span class="dir-ltr-hide"><i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i></span>
                    </span>
                    <span class="sr-only">{{elementsname}}-{{repeatnr}}</span>
                </a>
            <h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
                {{elementsname}}-{{repeatnr}}
            </h3>
        </div>
        {{> mod_unilabel/element_action_buttons }}
    </div>
    <div id="id_singleelementheader_{{repeatindex}}container" class="collapse">
    {{#sortorderelement}}
        <div class="d-none">
            {{{.}}}
        </div>
    {{/sortorderelement}}
        {{#elements}}
            <div>
                {{{.}}}
            </div>
        {{/elements}}
    </div>
</fieldset>