Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install
[moodle.git] / message / templates / message_drawer_view_settings_body_content.mustache
blob4acd27d4bba3e08e1edf5160a4de2c3195e5143d
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
17 {{!
18     @template core_message/message_drawer_view_settings_body_content
20     This template will render the content for the body of the settings page in the message drawer.
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * All data attributes are required
28     Context variables required for this template:
29     * userid The logged in user id
30     * urls The URLs for the popover
32     Example context (json):
33     {}
37 {{#settings}}
38 <div data-region="settings" class="p-3">
39     <h3 class="h6 font-weight-bold">{{#str}} privacy, message {{/str}}</h3>
40     <p>{{#str}} privacy_desc, message {{/str}}</p>
41     <div data-preference="blocknoncontacts" class="mb-3">
42         <fieldset>
43             <legend class="sr-only">{{#str}} contactableprivacy, message {{/str}}</legend>
44             {{#privacy}}
45                 <div class="custom-control custom-radio mb-2">
46                     <input
47                         type="radio"
48                         name="message_blocknoncontacts"
49                         class="custom-control-input"
50                         id="block-noncontacts-{{uniqid}}-{{value}}"
51                         value="{{value}}"
52                     >
53                     <label class="custom-control-label ml-2" for="block-noncontacts-{{uniqid}}-{{value}}">
54                         {{text}}
55                     </label>
56                 </div>
57             {{/privacy}}
58         </fieldset>
59     </div>
61     <div class="hidden" data-region="notification-preference-container">
62         <h3 class="mb-2 mt-4 h6 font-weight-bold">{{#str}} notificationpreferences, core_message {{/str}}</h3>
63     </div>
65     <h3 class="mb-2 mt-4 h6 font-weight-bold">{{#str}} general, core {{/str}}</h3>
66     <div data-preference="entertosend">
67         <div class="custom-control custom-switch">
68             <input type="checkbox" class="custom-control-input" id="enter-to-send-{{uniqid}}" {{#entertosend}}checked{{/entertosend}}>
69             <label class="custom-control-label" for="enter-to-send-{{uniqid}}">
70                 {{#str}} useentertosend, core_message {{/str}}
71             </label>
72         </div>
73     </div>
74 </div>
75 {{/settings}}