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 unilabeltype_grid/colourpicker
19
    Template to show a colour picker in the content settings form to choose the background colour.
20
 
21
    Example context (json):
22
    {
23
        "iconurl": "https://<url-to-moodle>/theme/image.php/svg_bootstrap4/core/1544826417/i/colourpicker",
24
        "inputname": "unilabeltype_grid_background",
25
        "inputid": "id_unilabeltype_grid_background_colourpicker",
26
        "label": "Background",
27
        "defaultvalue": "#A0E2FD"
28
    }
29
}}
30
 
31
<div class="form-group row  fitem   ">
32
    <div class="col-md-3">
33
        <span class="float-sm-right text-nowrap"> </span>
34
        <label class="col-form-label d-inline " for="{{inputid}}">
35
            {{label}}
36
        </label>
37
    </div>
38
 
39
    <div class="col-md-9 form-inline felement" data-fieldtype="text">
40
        <div class="form-colourpicker defaultsnext">
41
            <div class="admin_colourpicker clearfix">
42
                <img alt="" class="colourdialogue" src="{{{iconurl}}}">
43
                <div class="previewcolour" style="width: 50px; height: 50px; background-color: rgb(137, 27, 0);"></div>
44
                <div class="currentcolour" style="width: 50px; height: 49px; background-color: rgb(58, 69, 75);"></div>
45
            </div>
46
            <input name="{{inputname}}" id="{{inputid}}" value="{{{defaultvalue}}}" size="12" class="form-control text-ltr" type="text">
47
            <span>{{defaultvalue}}</span>
48
        </div>
49
    </div>
50
</div>