blob: 2f1787b75f78761d8ad2fb0b7be0bc07f171e4cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[%#
# product: product object
# groups:
# invalid => [{ id, name, description, checked }...]
# mandatory => "
# optional => "
#%]
[% PROCESS group_list
type = "invalid"
label = "Groups that are not valid for the '" _ product.name _ "' product:"
enabled = 0
disabled = 1
%]
[% PROCESS group_list
type = "mandatory"
label = "Mandatory '" _ product.name _ "' groups:"
enabled = 1
disabled = 1
%]
[% PROCESS group_list
type = "optional"
label = "Optional '" _ product.name _ "' groups:"
enabled = 1
disabled = 0
%]
<input type="hidden" name="group_verified" value="1">
[% BLOCK group_list %]
[% RETURN UNLESS groups.$type.size %]
[% FILTER collapse %]
<div>
<div>
[% label FILTER html %]
</div>
[% FOREACH g = groups.$type %]
<div>
[% IF g.checked %]
<input type="hidden" name="defined_groups" value="[% g.name FILTER html %]">
[% END %]
<input type="checkbox" value="[% g.name FILTER html %]"
id="group_[% g.id FILTER none %]"
[%= IF enabled %]name="groups"[% END %]
[%= "checked" IF g.checked %]
[%= "disabled" IF disabled %]
[%= 'data-mandatory="1"' IF type == "mandatory" %]>
<label for="group_[% g.id FILTER none %]" [%= IF disabled %]class="group-disabled"[% END %]>
[% g.description FILTER html %]
</label>
</div>
[% END %]
</div>
[% END %]
[% END %]
|