| 1441 |
ariadna |
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_backup/formselectall
|
|
|
19 |
|
|
|
20 |
Template that renders the "Select All/None" controls on the backup/restore UI.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"withuserdata": true,
|
|
|
25 |
"modules": [
|
|
|
26 |
{
|
|
|
27 |
"modname": "assign",
|
|
|
28 |
"heading": "Assignments"
|
|
|
29 |
},
|
|
|
30 |
{
|
|
|
31 |
"modname": "book",
|
|
|
32 |
"heading": "Books"
|
|
|
33 |
}
|
|
|
34 |
]
|
|
|
35 |
}
|
|
|
36 |
}}
|
|
|
37 |
<div class="grouped_settings section_level">
|
|
|
38 |
<div id="backup_selectors_included" class="include_setting section_level">
|
|
|
39 |
<div class="fitem fitem_fcheckbox backup_selector">
|
|
|
40 |
<div class="fitemtitle">{{#str}} select {{/str}}</div>
|
|
|
41 |
<div class="felement">
|
|
|
42 |
<a
|
|
|
43 |
data-mdl-action="selectall"
|
|
|
44 |
data-mdl-type="include"
|
|
|
45 |
href="#"
|
|
|
46 |
>{{#str}} all {{/str}}</a> /
|
|
|
47 |
<a
|
|
|
48 |
data-mdl-action="selectnone"
|
|
|
49 |
data-mdl-type="include"
|
|
|
50 |
href="#"
|
|
|
51 |
>{{#str}} none {{/str}}</a>
|
|
|
52 |
(<a
|
|
|
53 |
class="collapsed showmore-container"
|
|
|
54 |
id="mod_select_links_toggler"
|
|
|
55 |
data-bs-toggle="collapse"
|
|
|
56 |
href="#mod_select_links"
|
|
|
57 |
aria-expanded="false"
|
|
|
58 |
aria-controls="mod_select_links"
|
|
|
59 |
>{{!
|
|
|
60 |
}}<span class="collapsed-content">{{#str}} showtypes, backup {{/str}}</span>{{!
|
|
|
61 |
}}<span class="expanded-content">{{#str}} hidetypes, backup {{/str}}</span>{{!
|
|
|
62 |
}}</a>)
|
|
|
63 |
</div>
|
|
|
64 |
</div>
|
|
|
65 |
</div>
|
|
|
66 |
{{#withuserdata}}
|
|
|
67 |
<div id="backup_selectors_userdata" class="normal_setting">
|
|
|
68 |
<div class="fitem fitem_fcheckbox backup_selector">
|
|
|
69 |
<div class="fitemtitle">Select</div>
|
|
|
70 |
<div class="felement">
|
|
|
71 |
<a
|
|
|
72 |
data-mdl-action="selectall"
|
|
|
73 |
data-mdl-type="userdata"
|
|
|
74 |
href="#"
|
|
|
75 |
>{{#str}} all {{/str}}</a> /
|
|
|
76 |
<a
|
|
|
77 |
data-mdl-action="selectnone"
|
|
|
78 |
data-mdl-type="userdata"
|
|
|
79 |
href="#"
|
|
|
80 |
>{{#str}} none {{/str}}</a>
|
|
|
81 |
</div>
|
|
|
82 |
</div>
|
|
|
83 |
</div>
|
|
|
84 |
{{/withuserdata}}
|
|
|
85 |
<div id="mod_select_links" class="collapse" style="">
|
|
|
86 |
{{#modules}}
|
|
|
87 |
<div class="grouped_settings section_level">
|
|
|
88 |
<div id="backup_selectors_mod_{{modname}}" class="include_setting section_level">
|
|
|
89 |
<div class="fitem fitem_fcheckbox backup_selector">
|
|
|
90 |
<div class="fitemtitle">{{heading}}</div>
|
|
|
91 |
<div class="felement">
|
|
|
92 |
<a
|
|
|
93 |
data-mdl-action="selectall"
|
|
|
94 |
data-mdl-type="include"
|
|
|
95 |
data-mdl-mod="{{modname}}"
|
|
|
96 |
href="#"
|
|
|
97 |
>{{#str}} all {{/str}}</a> /
|
|
|
98 |
<a
|
|
|
99 |
data-mdl-action="selectnone"
|
|
|
100 |
data-mdl-type="include"
|
|
|
101 |
data-mdl-mod="{{modname}}"
|
|
|
102 |
href="#"
|
|
|
103 |
>{{#str}} none {{/str}}</a>
|
|
|
104 |
</div>
|
|
|
105 |
</div>
|
|
|
106 |
</div>
|
|
|
107 |
{{#withuserdata}}
|
|
|
108 |
<div class="normal_setting">
|
|
|
109 |
<div id="backup_selectors_userdata-mod_{{modname}}" class="fitem fitem_fcheckbox backup_selector">
|
|
|
110 |
<div class="fitemtitle">{{heading}}</div>
|
|
|
111 |
<div class="felement">
|
|
|
112 |
<a
|
|
|
113 |
data-mdl-action="selectall"
|
|
|
114 |
data-mdl-type="userdata"
|
|
|
115 |
data-mdl-mod="{{modname}}"
|
|
|
116 |
href="#"
|
|
|
117 |
>{{#str}} all {{/str}}</a> /
|
|
|
118 |
<a
|
|
|
119 |
data-mdl-action="selectnone"
|
|
|
120 |
data-mdl-type="userdata"
|
|
|
121 |
data-mdl-mod="{{modname}}"
|
|
|
122 |
href="#"
|
|
|
123 |
>{{#str}} none {{/str}}</a>
|
|
|
124 |
</div>
|
|
|
125 |
</div>
|
|
|
126 |
</div>
|
|
|
127 |
{{/withuserdata}}
|
|
|
128 |
</div>
|
|
|
129 |
{{/modules}}
|
|
|
130 |
</div>
|
|
|
131 |
</div>
|