summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/groups/delete.html.tmpl
blob: 78a1352d326c46f681cd453118102dea36cc0239 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[%# 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.
  #%]

[%# INTERFACE:
  # group: A Bugzilla::Group object representing the group that is
  #        about to be deleted.
  # shared_queries: int; The number of queries being shared with this
  #                 group.
  #%]

[% title = BLOCK %]Delete group '[% group.name FILTER html %]'[% END %]
[% PROCESS global/header.html.tmpl
  title = title
  style_urls = ['skins/standard/admin.css']
  doc_section = "administration.html#groups-and-group-security"
%]

<table id="admin_table">
  <tr class="column_header">
    <th>Field</th>
    <th>Value</th>
  </tr>
  <tr>
    <td>Id</td>
    <td>[% group.id FILTER html %]</td>
  </tr>
  <tr>
    <td>Name</td>
    <td>[% group.name FILTER html %]</td>
  </tr>
  <tr>
    <td>Description</td>
    <td>[% group.description FILTER html_light %]</td>
  </tr>
</table>

<form method="post" action="editgroups.cgi">
  [% IF group.members_non_inherited.size %]
    <p><b>[% group.members_non_inherited.size FILTER html %] users belong
      directly to this group. You cannot delete this group while there are
      users in it.</b>

    <br><a href="editusers.cgi?action=list&amp;groupid=
                 [%- group.id FILTER uri %]&amp;grouprestrict=1">Show
    me which users</a> - <label><input type="checkbox" name="removeusers">Remove
    all users from this group for me.</label></p>
  [% END %]

  [% IF group.granted_by_direct(constants.GROUP_MEMBERSHIP).size %]
    <p><b>Members of this group inherit membership in the following groups:</b></p>
    <ul>
      [% FOREACH grantor = group.granted_by_direct(constants.GROUP_MEMBERSHIP) %]
        <li>[% grantor.name FILTER html %]</li>
      [% END %]
    </ul>
  [% END %]

  [% IF group.bugs.size %]
    <p><b>[% group.bugs.size FILTER html %] [%+ terms.bug %] reports are
     visible only to this group. You cannot delete this group while any 
     [%+ terms.bugs %] are using it.</b>

    <br><a href="buglist.cgi?field0-0-0=bug_group&amp;type0-0-0=equals&amp;value0-0-0=
                 [%- group.name FILTER uri %]">Show me
    which [% terms.bugs %]</a> - 
    <label><input type="checkbox" name="removebugs">Remove
    all [% terms.bugs %] from this group restriction for me.</label></p>

    <p><b>NOTE:</b> It's quite possible to make confidential [% terms.bugs %]
    public by checking this box.  It is <B>strongly</B> suggested
    that you review the [% terms.bugs %] in this group before checking
    the box.</p>
  [% END %]

  [% IF group.products.size %]
    <p><b>This group is tied to the following products:</b></p>
    [% SET any_hidden = 0 %]
    <ul>
      [% FOREACH data = group.products %]

        [% SET active = [] %]
        [% FOREACH control = data.controls.keys.sort %]
          [% NEXT IF !data.controls.$control %]
          [% IF control == 'othercontrol' OR control == 'membercontrol' %]
            [% SWITCH data.controls.$control %]
              [% CASE constants.CONTROLMAPMANDATORY %]
                [% SET type = "Mandatory" %]
              [% CASE constants.CONTROLMAPSHOWN %]
                [% SET type = "Shown" %]
              [% CASE constants.CONTROLMAPDEFAULT %]
                [% SET type = "Default" %]
            [% END %]
            [% active.push("$control: $type") %]
          [% ELSE %]
            [% active.push(control) %]
          [% END %]
        [% END %]

        [% SET hidden = 0 %]
        [% IF data.controls.othercontrol == constants.CONTROLMAPMANDATORY
              AND data.controls.membercontrol == constants.CONTROLMAPMANDATORY
              AND data.controls.entry 
        %]
          [% SET hidden = 1 %]
        [% END %]

        <li><a href="editproducts.cgi?action=editgroupcontrols&amp;product=
                    [%- data.product.name FILTER uri %]">
          [%- data.product.name FILTER html %]</a>
          ([% active.join(', ') FILTER html %])
          [% IF hidden %]
            <strong>WARNING: This product is currently hidden.
            Deleting this group could make this product publicly visible
            if no other group applies.
            </strong>
          [% END %]</li>
      [% END %]
    </ul>

    <p><label><input type="checkbox" name="unbind">Delete this group anyway,
      and remove these controls.</label></p>
  [% END %]
  
  [% IF group.flag_types.size %]
    <p><b>This group restricts who can make changes to flags of certain types.
    You cannot delete this group while there are flag types using it.</b>

    <br><a href="editflagtypes.cgi?action=list&amp;group=
                 [%- group.id FILTER uri %]">Show
    me which types</a> - 
    <label><input type="checkbox" name="removeflags">Remove all
    flag types from this group for me.</label></p>
  [% END %]

  [% IF shared_queries %]
    <p>
      <b>There
      [% IF shared_queries > 1 %]
        are [% shared_queries %] saved searches
      [% ELSE %]
        is a saved search
      [% END %]
      being shared with this group.</b>
      If you delete this group,
      [% IF shared_queries > 1 %]
        these saved searches
      [% ELSE %]
        this saved search
      [% END %]
      will fall back to being private again.
    </p>
  [% END %]

  <h2>Confirmation</h2>

  <p class="confirmation">
    Do you really want to delete this group?
  </p>
  [% IF group.users.size || group.bugs.size || group.products.size 
        || group.flags.size
  %]
    <p><b>You must check all of the above boxes or correct the
          indicated problems first before you can proceed.</b></p>
  [% END %]

  <p>
    <input type="submit" id="delete" value="Yes, delete">
    <input type="hidden" name="action" value="delete">
    <input type="hidden" name="group" value="[% group.id FILTER html %]">
    <input type="hidden" name="token" value="[% token FILTER html %]">
  </p>
</form>

Go back to the <a href="editgroups.cgi">group list</a>.

[% PROCESS global/footer.html.tmpl %]