summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/bug/create/create-fxos-partner.html.tmpl
blob: 3e910990d2987fcbcccd1cbb3cc194bf8a4b6870 (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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
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
[%# 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.
  #%]

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

[% inline_js = BLOCK %]
  var compdesc = new Array();
  compdesc[""] = 'Please select a component from the list above.';
  [% FOREACH comp = product.components %]
    compdesc['[% comp.name FILTER js %]'] = '[% comp.description FILTER js %]';
  [% END %]
  function showCompDesc(component) {
    var value = component.value;
    document.getElementById('comp_description').innerHTML = compdesc[value];
  }
  function onSubmit() {
    var alert_text = '';
    var status_whiteboard = '';

    if (!isFilledOut('component'))
      alert_text += "Please select a value for component.\n";
    if (!isFilledOut('short_desc'))
      alert_text += "Please enter a value for the summary.\n";
    if (!isFilledOut('steps_to_reproduce'))
      alert_text += "Please enter the steps to reproduce.\n";
    if (!isFilledOut('actual_behavior'))
      alert_text += "Please enter the actual behavior.\n";
    if (!isFilledOut('expected_behavior'))
      alert_text += "Please enter the expected behavior.\n";
    if (!isFilledOut('build'))
      alert_text += "Please enter a value for the build.\n";
    if (!isFilledOut('requirements'))
      alert_text += "Please enter a value for the requirements.\n";

    var device_values = new Array();
    var device_select = document.getElementById("b2g_device");
    for (var i = 0, l = device_select.options.length; i < l; i++) {
      if (device_select.options[i].selected)
        device_values.push(device_select.options[i].value);
    }

    if (device_values.length == 0)
      alert_text += "Please select one or more devices.\n";

    if (alert_text != '') {
      alert(alert_text);
      return false;
    }

    for (var i = 0, l = device_values.length; i < l; i++)
      status_whiteboard += '[device:' + device_values[i] + '] ';

    if (document.getElementById('third_party_app').checked)
      status_whiteboard += '[apps watch list]';

    document.getElementById('status_whiteboard').value = status_whiteboard;

    return true;
  }
[% END %]

[% PROCESS global/header.html.tmpl
   title = "Firefox OS Partner $terms.Bug Submission"
   style_urls = [ 'skins/standard/enter_bug.css' ]
   javascript = inline_js
   javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
                       'js/attachment.js', 'js/field.js', 'js/util.js' ]
   onload = "showCompDesc(document.getElementById('component'));"
%]

<h2>Firefox OS Partner [% terms.Bug %] Submission</h2>

<p>All fields are mandatory</p>

<form method="post" action="post_bug.cgi" id="bug_form" class="enter_bug_form"
      enctype="multipart/form-data" onsubmit="return onSubmit();">
<input type="hidden" name="format" value="fxos-partner">
<input type="hidden" name="product" value="Firefox OS">
<input type="hidden" name="rep_platform" value="ARM">
<input type="hidden" name="op_sys" value="Gonk (Firefox OS)">
<input type="hidden" name="priority" value="--">
<input type="hidden" name="version" value="unspecified">
<input type="hidden" name="bug_severity" id="bug_severity" value="normal">
<input type="hidden" name="comment" id="comment" value="">
<input type="hidden" name="keywords" id="keywords" value="unagi">
<input type="hidden" name="status_whiteboard" id="status_whiteboard" value="">
<input type="hidden" name="token" value="[% token FILTER html %]">

<table>

<tr>
  <th>
    <label for="short_desc">Summary:</label>
  </th>
  <td>
    <input name="short_desc" id="short_desc" size="60"
           value="[% short_desc FILTER html %]">
  </td>
</tr>

<tr>
  <th>
    <label for="component">Component:</label>
  </th>
  <td>
    <select name="component" id="component" onchange="showCompDesc(this);">
      <option value="">Select One</option>
      [%- FOREACH c = product.components %]
        [% NEXT IF NOT c.is_active %]
        <option value="[% c.name FILTER html %]"
                id="v[% c.id FILTER html %]_component"
          [% IF c.name == default.component_ %]
                selected="selected"
          [% END %]>
          [% c.name FILTER html -%]
        </option>
      [%- END %]
    </select
  </td>
</tr>

<tr>
  <td></td>
  <td id="comp_description" align="left" style="color: green; padding-left: 1em"></td>
</tr>

<tr>
  <th>
    <label for="b2g_device">B2G Device:</label>
  </th>
  <td>
    <select name="b2g_device" id="b2g_device"
            size="5" multiple="multiple">
      <option name="Otoro">Otoro</option>
      <option name="Unagi">Unagi</option>
      <option name="Inari">Inari</option>
      <option name="Ikura">Ikura</option>
      <option name="Hamachi">Hamachi</option>
      <option name="Buri">Buri</option>
      <option name="Toro">Toro</option>
      <option name="Leo">Leo</option>
      <option name="Twist">Twist</option>
      <option name="Zero">Zero</option>
      <option name="Tara">Tara</option>
    </select>
  </td>
</tr>

<tr>
  <th>
    <label for="other_party">What are the steps to reproduce?:</label>
  </th>
  <td>
    <textarea id="steps_to_reproduce" name="steps_to_reproduce" rows="5" cols="60">1.
2.
3.</textarea>
  </td>
<tr>

<tr>
  <th>
    <label for="actual_behavior">What was the actual behavior?:</label>
  </th>
  <td>
    <textarea id="actual_behavior" name="actual_behavior" rows="5" cols="60"></textarea>
  </td>
<tr>

<tr>
  <th>
    <label for="expected_behavior">What was the expected behavior?:</label>
  </th>
  <td>
    <textarea name="expected_behavior" id="expected_behavior" rows="5" cols="60"></textarea>
  </td>
</tr>

<tr>
  <th>
    <label for="build">What build were you using?:</label>
  </th>
  <td>
    <input type="text" name="build" id="build" value="" size="60">
  </td>
</tr>

<tr>
  <th>
    <label for="requirements">What are the requirements?:</label>
  </th>
  <td>
    <input type="text" name="requirements" id="requirements" value="" size="60">
  </td>
</tr>

<tr>
  <th>
    <label for="requirements">Third party app content?:</label>
  </th>
  <td>
    <input type="checkbox" name="third_party_app" id="third_party_app">
  </td>
</tr>

<tr>
  <th>Security:</th>
  <td>
    <input type="checkbox" name="groups" id="default_security_group"
           value="[% product.default_security_group FILTER html %]"
      [% FOREACH g = group %]
        [% IF g.name == name %]
          [% ' checked="checked"' IF g.checked %]
          [% LAST %]
        [% END %]
      [% END %]
    >
    <label for="default_security_group">
      Many users could be harmed by this security problem:
      it should be kept hidden from the public until it is resolved.
    </label>
  </td>
</tr>

<tr>
  <td>&nbsp;</td>
  <td>
    <input type="submit" id="commit" value="Submit Request">
  </td>
</tr>
</table>

</form>

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