MDL-61575 message_notification: replace lp/dialogue with core/modal
[moodle.git] / message / templates / preferences_processor.mustache
CommitLineData
a0eabdd3
RW
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{{!
643b015d 18 @template core_message/preferences_processor
a0eabdd3
RW
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:
e48a092a 29 * userid The logged in user id
14617a56
RW
30 * displayname The display name for the processor form
31 * name The name of the processor
32 * formhtml The form HTML
a0eabdd3
RW
33
34 Example context (json):
e48a092a
RW
35 {
36 "userid": 1,
643b015d
RW
37 "displayname": "Email",
38 "name": "email",
39 "formhtml": "<input name='test' type='text' />"
e48a092a 40 }
a0eabdd3 41}}
e0c67b89 42<h4>{{displayname}}</h4>
643b015d
RW
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>
a0eabdd3
RW
55</div>
56{{#js}}
643b015d
RW
57require(['jquery', 'core_message/preferences_processor_form'], function($, ProcessorForm) {
58 new ProcessorForm($('[data-processor-id="{{uniqid}}"]'));
a0eabdd3
RW
59});
60{{/js}}