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 comments.
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/>.
18 @template tool_dataprivacy/data_registry_compliance
20 Data registry main page.
22 Classes required for JS:
25 Data attributes required for JS:
28 Context variables required for this template:
31 Example context (json):
34 "plugin_type_raw" : "mod",
35 "plugin_type" : "Activities and Modules"
39 <div class="dataprivacy-main">
40 <h2>{{#str}}pluginregistrytitle, tool_dataprivacy{{/str}}</h2>
42 <p><strong>{{#str}}explanationtitle, tool_dataprivacy{{/str}}</strong></p>
44 <dt>{{#pix}}i/risk_xss, moodle, {{#str}}requiresattention, tool_dataprivacy{{/str}}{{/pix}}</dt>
45 <dd>{{#str}}requiresattentionexplanation, tool_dataprivacy{{/str}}</dd>
46 <dt><span class="badge badge-pill badge-notice">{{#str}}external, tool_dataprivacy{{/str}}</span></dt>
47 <dd>{{#str}}externalexplanation, tool_dataprivacy{{/str}}</dd>
48 <dt><span class="badge badge-pill badge-warning">{{#str}}deprecated, tool_dataprivacy{{/str}}</span></dt>
49 <dd>{{#str}}deprecatedexplanation, tool_dataprivacy{{/str}}</dd>
50 <dt><span class="badge badge-pill badge-warning">{{#str}}userlistnoncompliant, tool_dataprivacy{{/str}}</span></dt>
51 <dd>{{#str}}userlistexplanation, tool_dataprivacy{{/str}}</dd>
54 <div class="clearfix"><a class="tool_dataprivacy-expand-all float-right" href="#" data-visibility-state='visible'>{{#str}}visible, tool_dataprivacy{{/str}}</a></div>
58 <a class="type-expand" href='#' data-plugin="{{plugin_type_raw}}">
59 <h3 id="{{plugin_type_raw}}">{{#pix}}t/collapsed, moodle, {{#str}}expandplugintype, tool_dataprivacy{{/str}}{{/pix}}{{plugin_type}}</h3>
62 <div class="hide p-b-1" data-plugintarget="{{plugin_type_raw}}" aria-expanded="false" role="contentinfo">
64 {{> tool_dataprivacy/component_status}}
71 require(['jquery', 'tool_dataprivacy/expand_contract'], function($, ec) {
73 $('.type-expand').click(function(e) {
76 var thisnode = $(this);
77 var plugin = thisnode.data('plugin');
78 var metadata = $('[data-plugintarget=\'' + plugin + '\']');
79 ec.expandCollapse(metadata, thisnode);
82 $('.component-expand').click(function(e) {
85 var thisnode = $(this);
86 var plugin = thisnode.data('component');
87 var metadata = $('[data-section=\'' + plugin + '\']');
88 ec.expandCollapse(metadata, thisnode);
91 $('.tool_dataprivacy-expand-all').click(function(e) {
94 var nextstate = $(this).data('visibilityState');
95 ec.expandCollapseAll(nextstate);