summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/process/verify-new-product.html.tmpl
blob: 73c11fae9cfd129a9c07ef13bd29fbbcc092f46e (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
[%# 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.
  #
  # The Initial Developer of the Original Code is Netscape Communications
  # Corporation. Portions created by Netscape are
  # Copyright (C) 1998 Netscape Communications Corporation. All
  # Rights Reserved.
  #
  # Contributor(s): Myk Melez <myk@mozilla.org>
  #                 Frédéric Buclin <LpSolit@gmail.com>
  #%]

[%# INTERFACE:
  # product: object; the new product.
  # versions: array; versions for the new product.
  # components: array; components for the new product.
  # milestones: array; milestones for the new product.
  # defaults: hash; keys are names of fields, values are defaults for
  #   those fields
  #%]

[%# The global Bugzilla->cgi object is used to obtain form variable values. %]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]

[% PROCESS global/variables.none.tmpl %]

[% PROCESS global/header.html.tmpl
  title = 'Verify New Product Details...' %]

<form action="process_bug.cgi" method="post">

[% PROCESS "global/hidden-fields.html.tmpl"
     exclude=("^version|component|target_milestone|bit-\\d+$") %]

<input type="hidden" name="confirm_product_change" value="1">
[%# Verify the version, component, and target milestone fields. %]
  <h3>Verify Version, Component[% ", Target Milestone" IF Param("usetargetmilestone") %]</h3>

  <p>
  [% IF Param("usetargetmilestone") %]
    You are moving the [% terms.bug %](s) to the product 
    <b>[% cgi.param("product") FILTER html %]</b>,
    and the version, component, and/or target milestone fields are no longer
    correct.  Please set the correct version, component, and target milestone now:
  [% ELSE %]
    You are moving the [% terms.bug %](s) to the product 
    <b>[% cgi.param("product") FILTER html %]</b>,
    and the version and component fields are no longer correct.
    Please set the correct version and component now:
  [% END %]
  </p>

  <table>
    <tr>
      <td>
        <b>Version:</b><br>
        [% PROCESS "global/select-menu.html.tmpl" 
                   name="version"
                   options=versions
                   default=defaults.version
                   size=10 %]
      </td>
      <td>
        <b>Component:</b><br>
        [% PROCESS "global/select-menu.html.tmpl"
                   name="component"
                   options=components
                   default=defaults.component
                   size=10 %]
      </td>
      [% IF Param("usetargetmilestone") %]
        <td>
          <b>Target Milestone:</b><br>
        [% PROCESS "global/select-menu.html.tmpl"
                   name="target_milestone"
                   options=milestones
                   default=defaults.target_milestone
                   size=10 %]
        </td>
      [% END %]
    </tr>
  </table>

  <h3>Verify [% terms.Bug %] Group</h3>

  [% IF old_groups.size %]
    <p>These groups are not legal for the '[% product.name FILTER html %]'
    product or you are not allowed to restrict [% terms.bugs %] to these groups.
    [%+ terms.Bugs %] will no longer be restricted to these groups and may become
    public if no other group applies:<br>
    [% FOREACH group = old_groups %]
      <input type="checkbox" id="bit-[% group.id FILTER html %]"
             name="bit-[% group.id FILTER html %]" disabled="disabled" value="1">
      <label for="bit-[% group.id FILTER html %]">
        [% group.name FILTER html %]: [% group.description FILTER html %]
      </label>
      <br>
    [% END %]
    </p>
  [% END %]

  [% mandatory_groups = [] %]
  [% optional_groups = [] %]

  [% FOREACH gid = product.group_controls.keys %]
    [% group = product.group_controls.$gid %]
    [% NEXT UNLESS group.group.is_active %]

    [% IF group.membercontrol == constants.CONTROLMAPMANDATORY
          || (group.othercontrol ==  constants.CONTROLMAPMANDATORY && !user.in_group(group.group.name)) %]
      [% mandatory_groups.push(group) %]
    [% ELSIF (group.membercontrol != constants.CONTROLMAPNA && user.in_group(group.group.name))
              || group.othercontrol != constants.CONTROLMAPNA %]
      [% optional_groups.push(group) %]
    [% END %]
  [% END %]

  [% IF optional_groups.size %]
    <p>These groups are optional. You can decide to restrict [% terms.bugs %] to
    one or more of the following groups:<br>
    [% FOREACH group = optional_groups %]
      <input type="checkbox" id="bit-[% group.group.id FILTER html %]"
             name="bit-[% group.group.id FILTER html %]"
             [% ((group.membercontrol == constants.CONTROLMAPDEFAULT && user.in_group(group.group.name))
                 || (group.othercontrol == constants.CONTROLMAPDEFAULT && !user.in_group(group.group.name))
                 || cgi.param("bit-$group.group.id") == 1) ?
                 'checked="checked"' : ''
             %] value="1">
      <label for="bit-[% group.group.id FILTER html %]">
        [% group.group.name FILTER html %]: [% group.group.description FILTER html %]
      </label>
      <br>
    [% END %]
    </p>
  [% END %]

  [% IF mandatory_groups.size %]
    <p>These groups are mandatory and [% terms.bugs %] will be automatically
    restricted to these groups:<br>
    [% FOREACH group = mandatory_groups %]
      <input type="checkbox" id="bit-[% group.group.id FILTER html %]" checked="checked"
             name="bit-[% group.group.id FILTER html %]" value="1" disabled="disabled">
      <label for="bit-[% group.group.id FILTER html %]">
        [% group.group.name FILTER html %]: [% group.group.description FILTER html %]
      </label>
      <br>
    [% END %]
    </p>
  [% END %]

<input type="submit" id="change_product" value="Commit">

</form>
<hr>

[%# If 'id' is defined, then we are editing a single bug.
  # Else we are editing several bugs at once. %]

[% IF cgi.param('id') AND cgi.param('id').match('^\d+$') %]
  [% id = cgi.param('id') %]
  Cancel and Return to [% "$terms.bug $id" FILTER bug_link(id) FILTER none %]
[% ELSE %]
  Cancel and Return to <a href="buglist.cgi?regetlastlist=1">the last search results</a>
[% END %]

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