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 core_message/preferences_processor
19
 
20
    The message processor configuration block for the preferences page
21
 
22
    Classes required for JS:
23
    * None
24
 
25
    Data attibutes required for JS:
26
    * None
27
 
28
    Context variables required for this template:
29
    * userid The logged in user id
30
    * displayname The display name for the processor form
31
    * name The name of the processor
32
    * formhtml The form HTML
33
 
34
    Example context (json):
35
    {
36
        "userid": 1,
37
        "displayname": "Email",
38
        "name": "email",
39
        "formhtml": "<input name='test' type='text' />"
40
    }
41
}}
42
<h4>{{displayname}}</h4>
43
<div class="processor-container"
44
    data-user-id="{{userid}}"
45
    data-processor-name="{{name}}"
46
    data-processor-id="{{uniqid}}">
47
 
48
    <div class="loading-container">
49
        <div class="vertical-align"></div>
50
        {{> core/loading }}
51
    </div>
52
    <form>
53
        {{{formhtml}}}
54
    </form>
55
</div>
56
{{#js}}
57
require(['jquery', 'core_message/preferences_processor_form'], function($, ProcessorForm) {
58
    new ProcessorForm($('[data-processor-id="{{uniqid}}"]'));
59
});
60
{{/js}}