confirm-delete.html.tmpl 15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Bug Tracking System.
  #
  # Contributor(s): Marc Schumann <wurblzap@gmail.com>
  #%]

[%# INTERFACE:
  #
  # listselectionvalues:      selection values to recreate the current user
  #                           list.
  # editusers:                is viewing user member of editusers?
  # otheruser:                Bugzilla::User object of the viewed user.
22 23 24
  # reporter:                 number of bugs reported by the user
  # assignee_or_qa:           number of bugs the user is either the assignee
  #                           or the QA contact
25
  # bugs_activity:            number of bugs the viewed user has activity
26 27 28 29 30 31
  #                           entries on
  # cc                        number of bugs the viewed user is cc list member
  #                           of
  # flags.requestee:          number of flags the viewed user is being asked for
  # flags.setter:             number of flags the viewed user has set
  # longdescs:                number of bug comments the viewed user has written
32
  # namedqueries:             number of named queries the user has created
33
  # namedquery_group_map:     number of named queries the user has shared
34
  # profiles_activity:        number of changes made to other users' profiles
35 36 37 38 39 40 41 42 43 44
  # series:                   number of series the viewed user has created
  # votes:                    number of bugs the viewed user has voted on
  # watch.watched:            number of users the viewed user is being watched
  #                           by
  # watch.watcher:            number of users the viewed user is watching
  # whine_events:             number of whine events the viewed user has created
  # whine_schedules:          number of whine schedules the viewed user has
  #                           created
  #%]

45 46
[% title = BLOCK %]Confirm deletion of user [% otheruser.login FILTER html %][% END %]

47
[% PROCESS global/header.html.tmpl
48
  title = title
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
  style_urls = ['skins/standard/admin.css',
                'skins/standard/editusers.css']
%]

[% PROCESS admin/users/listselectvars.html.tmpl
  listselectionvalues = listselectionvalues
%]

<table class="main">
  <tr>
    <th>Login name:</th>
    <td>[% otheruser.login FILTER html %]</td>
  </tr>
  <tr>
    <th>Real name:</th>
    <td>[% otheruser.name FILTER html %]</td>
  </tr>
  <tr>
    <th>Group set:</th>
    <td>
69
      [% IF otheruser.groups.size %]
70
        <ul>
71 72
          [% FOREACH group = otheruser.groups.keys %]
            <li>[% group FILTER html %]</li>
73 74 75 76 77 78 79
          [% END %]
        </ul>
      [% ELSE %]
        None
      [% END %]
    </td>
  </tr>
80
  [% IF otheruser.product_responsibilities.size %]
81 82 83
    <tr>
      <th>Product responsibilities:</th>
      <td>
84
        [% PROCESS admin/users/responsibilities.html.tmpl otheruser = otheruser %]
85 86 87 88 89
      </td>
    </tr>
  [% END %]
</table>

90
[% IF otheruser.product_responsibilities.size %]
91 92 93 94 95 96
  <p>
    You can't delete this user at this time because
    [%+ otheruser.login FILTER html %] has got responsibilities for at least
    one product.
  </p>
  <p>
97
    [% IF user.in_group("editcomponents", component.product_id) %]
98 99 100 101 102 103 104 105
      Change this by clicking the product editing links above,
    [% ELSE %]
      For now, you can
    [% END %]
[% ELSE %]

  <h2>Confirmation</h2>

106 107
  [% display_warning = 0 %]

108
  [% IF reporter || bugs_activity || flags.setter || longdescs || profiles_activity %]
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
    <div class="criticalmessages">
      <p>The following deletions are <b>highly not recommended</b> and
      will generate referential integrity inconsistencies!</p>

      <ul>
        [% IF reporter %]
          <li>
            [% otheruser.login FILTER html %]
            <a href="buglist.cgi?emailreporter1=1&amp;emailtype1=exact&amp;email1=
               [%- otheruser.login FILTER url_quote %]">has reported
            [% IF reporter == 1 %]
              one [% terms.bug %]
            [% ELSE %]
              [%+ reporter %] [%+ terms.bugs %]
            [% END %]</a>.
124 125
            If you delete the user account, the database records will be
            inconsistent, resulting in
126 127
            [% IF reporter == 1 %]
              this [% terms.bug %]
128
            [% ELSE %]
129
              these [% terms.bugs %]
130
            [% END %]
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
            not appearing in [% terms.bug %] lists any more.
          </li>
        [% END %]
        [% IF bugs_activity %]
          <li>
            [% otheruser.login FILTER html %] has made
            [% IF bugs_activity == 1 %]
              a change on [% terms.abug %]
            [% ELSE %]
              changes on [% terms.bugs %]
            [% END %].
            If you delete the user account, the [% terms.bugs %] activity table in
            the database will be inconsistent, resulting in
            [% IF bugs_activity == 1 %]
              this change
146
            [% ELSE %]
147
              these changes
148
            [% END %]
149 150 151 152 153 154 155 156 157 158 159
            not showing up in [% terms.bug %] activity logs any more.
          </li>
        [% END %]
        [% IF flags.setter %]
          <li>
            [% otheruser.login FILTER html %] has
            <a href="buglist.cgi?field0-0-0=setters.login_name&amp;type0-0-0=equals&amp;value0-0-0=
               [%- otheruser.login FILTER url_quote %]">set
            or requested
            [% IF flags.setter == 1 %]
              a flag
160
            [% ELSE %]
161 162 163 164 165 166 167 168
              [%+ flags.setter %] flags
            [% END %]</a>.
            If you delete the user account, the flags table in the database
            will be inconsistent, resulting in
            [% IF flags.setter == 1 %]
              this flag
            [% ELSE %]
              these flags
169
            [% END %]
170 171 172 173 174 175 176 177 178 179
            not displaying correctly any more.
          </li>
        [% END %]
        [% IF longdescs %]
          <li>
            [% otheruser.login FILTER html %] has
            <a href="buglist.cgi?emaillongdesc1=1&amp;emailtype1=exact&amp;email1=
               [%- otheruser.login FILTER url_quote %]">commented
            [% IF longdescs == 1 %]
              once on [% terms.abug %]
180
            [% ELSE %]
181 182 183 184 185 186 187 188
              [%+ longdescs %] times on [% terms.bugs %]
            [% END %]</a>.
            If you delete the user account, the comments table in the database
            will be inconsistent, resulting in
            [% IF longdescs == 1 %]
              this comment
            [% ELSE %]
              these comments
189
            [% END %]
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
            not being visible any more.
          </li>
        [% END %]
        [% IF profiles_activity %]
          <li>
            [% otheruser.login FILTER html %] has made
            [% IF bugs_activity == 1 %]
              a change on a other user's profile
            [% ELSE %]
              changes on other users' profiles
            [% END %].
            If you delete the user account, the user profiles activity table in
            the database will be inconsistent.
          </li>
        [% END %]
      </ul>
    </div>
    [% display_warning = 1 %]
  [% END %]

210 211 212
  [% IF assignee_or_qa || cc || email_setting || flags.requestee ||
        namedqueries || profile_setting || series || votes || watch.watched ||
        watch.watcher || whine_events || whine_schedules %]
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
    <div class="warningmessages">
      <p>The following deletions are <b>safe</b> and will not generate
      referential integrity inconsistencies.</p>

      <ul>
        [% IF assignee_or_qa %]
          <li>
            [% otheruser.login FILTER html %]
            <a href="buglist.cgi?emailassigned_to1=1&amp;emailqa_contact1=1&amp;emailtype1=exact&amp;email1=
               [%- otheruser.login FILTER url_quote %]">is
            the assignee or the QA contact of
            [% IF assignee_or_qa == 1 %]
              one [% terms.bug %]
            [% ELSE %]
              [%+ assignee_or_qa %] [%+ terms.bugs %]
            [% END %]</a>.
            If you delete the user account, these roles will fall back to
            the default assignee or default QA contact.
          </li>
        [% END %]
        [% IF cc %]
          <li>
            [% otheruser.login FILTER html %]
            <a href="buglist.cgi?emailcc1=1&amp;emailtype1=exact&amp;email1=
               [%- otheruser.login FILTER url_quote %]">is
            on the CC list of
            [% IF cc == 1 %]
              [%+ terms.abug %]
            [% ELSE %]
              [%+ cc %] [%+ terms.bugs %]
            [% END %]</a>.
            If you delete the user account, it will be removed from these CC lists.
          </li>
        [% END %]
247 248 249 250 251 252
        [% IF email_setting %]
          <li>
            The user's e-mail settings will be deleted along with the user
            account.
          </li>
        [% END %]
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
        [% IF flags.requestee %]
          <li>
            [% otheruser.login FILTER html %] has been
            <a href="buglist.cgi?field0-0-0=requestees.login_name&amp;type0-0-0=equals&amp;value0-0-0=
               [%- otheruser.login FILTER url_quote %]">asked
            to set
            [% IF flags.requestee == 1 %]
              a flag
            [% ELSE %]
              [% flags.requestee %] flags
            [% END %]</a>.
            If you delete the user account,
            [% IF flags.requestee == 1 %]
              this flag
            [% ELSE %]
              these flags
            [% END %]
            will change to be unspecifically requested.
          </li>
        [% END %]
        [% IF namedqueries %]
          <li>
            [% otheruser.login FILTER html %] has
276
            [% IF namedqueries == 1 %]
277
              a [% 'shared' IF namedquery_group_map %] named search
278
            [% ELSE %]
279
              [%+ namedqueries FILTER html %] named searches
280
            [% END %].
281
            [% IF namedqueries == 1 %]
282
              This named search
283
            [% ELSE %]
284
              These named searches
285 286
            [% END %]
            will be deleted along with the user account.
287
            [% IF namedquery_group_map %]
288
              [% IF namedqueries > 1 %]
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
                Of these,
                [% IF namedquery_group_map > 1 %]
                  [%+ namedquery_group_map FILTER html %] are
                [% ELSE %]
                  one is
                [% END %]
                shared.
              [% END %]
              Other users will not be able to use
              [% IF namedquery_group_map > 1 %]
                these shared named searches
              [% ELSE %]
                this shared named search
              [% END %]
              any more.
            [% END %]
305 306
          </li>
        [% END %]
307 308 309 310 311 312
        [% IF profile_setting %]
          <li>
            The user's preference settings will be deleted along with the user
            account.
          </li>
        [% END %]
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
        [% IF series %]
          <li>
            [% otheruser.login FILTER html %] has created
            [% IF series == 1 %]
              a series
            [% ELSE %]
              [%+ series %] series
            [% END %].
            [% IF series == 1 %]
              This series
            [% ELSE %]
              These series
            [% END %]
            will be deleted along with the user account.
          </li>
        [% END %]
        [% IF votes %]
          <li>
            [% otheruser.login FILTER html %] has voted on
            [% IF votes == 1 %]
              [%+ terms.abug %]
            [% ELSE %]
              [%+ votes %] [%+ terms.bugs %]
            [% END %].
            If you delete the user account,
            [% IF votes == 1 %]
              this vote
            [% ELSE %]
              these votes
            [% END %]
            will be deleted along with the user account.
          </li>
        [% END %]
        [% IF watch.watched || watch.watcher %]
          <li>
            [% otheruser.login FILTER html %]
            [% IF watch.watched %]
              is being watched by
              [% IF watch.watched == 1 %]
                a user
              [% ELSE %]
                [%+ watch.watched %] users
              [% END %]
            [% END %]
            [% IF watch.watcher %]
              [%+ 'and' IF watch.watched %]
              watches
              [% IF watch.watcher == 1 %]
                a user
              [% ELSE %]
                [%+ watch.watcher %] users
              [% END %]
            [% END %].
            [% IF watch.watched + watch.watcher == 1 %]
              This watching
            [% ELSE %]
              These watchings
            [% END %]
            will cease along with the deletion of the user account.
          </li>
        [% END %]
        [% IF whine_events || whine_schedules %]
          <li>
            [% otheruser.login FILTER html %]
            [% IF whine_events %]
              has scheduled
              [% IF whine_events == 1 %]
                a whine
              [% ELSE %]
                [%+ whine_events %] whines
              [% END %]
            [% END %]
            [% IF whine_schedules %]
              [%+ 'and' IF whine_events %]
              is on the receiving end of
              [% IF whine_schedules == 1 %]
                a whine
              [% ELSE %]
                [%+ whine_schedules %] whines
              [% END %]
            [% END %].
            [% IF whine_events + whine_schedules == 1 %]
              This whine
            [% ELSE %]
              These whines
            [% END %]
            will be deleted along with the user account.
          </li>
        [% END %]
      </ul>
    </div>
    [% display_warning = 1 %]
  [% END %]

  [% IF display_warning %]
408 409 410 411 412 413 414 415 416
    <p class="areyoureallyreallysure">
      Please be aware of the consequences of this before continuing.
    </p>
  [% END %]

  <p>Do you really want to delete this user account?</p>

  <form method="post" action="editusers.cgi">
    <p>
417
      <input type="submit" id="delete" value="Yes, delete"/>
418 419
      <input type="hidden" name="action" value="delete" />
      <input type="hidden" name="userid" value="[% otheruser.id %]" />
420
      <input type="hidden" name="token" value="[% token FILTER html %]">
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
      [% INCLUDE listselectionhiddenfields %]
    </p>
  </form>

  <p>If you do not want to delete the user account at this time,
[% END %]

  <a href="editusers.cgi?action=edit&amp;userid=[% otheruser.id %]
           [% INCLUDE listselectionurlparams %]">edit the user</a>,
  go
 <a href="editusers.cgi?action=list[% INCLUDE listselectionurlparams %]">back
  to the user list</a>,
  [% IF editusers %]
    <a href="editusers.cgi?action=add[% INCLUDE listselectionurlparams %]">add
    a new user</a>,
  [% END %]
  or <a href="editusers.cgi">find other users</a>.
</p>

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