1 |
[%# The contents of this file are subject to the Mozilla Public |
2 |
# License Version 1.1 (the "License"); you may not use this file |
3 |
# except in compliance with the License. You may obtain a copy of |
4 |
# the License at http://www.mozilla.org/MPL/ |
5 |
# |
6 |
# Software distributed under the License is distributed on an "AS |
7 |
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
8 |
# implied. See the License for the specific language governing |
9 |
# rights and limitations under the License. |
10 |
# |
11 |
# The Original Code is the Bugzilla Bug Tracking System. |
12 |
# |
13 |
# The Initial Developer of the Original Code is Netscape Communications |
14 |
# Corporation. Portions created by Netscape are |
15 |
# Copyright (C) 1998 Netscape Communications Corporation. All |
16 |
# Rights Reserved. |
17 |
# |
18 |
# Contributor(s): Gervase Markham <gerv@gerv.net> |
19 |
# Christine Begle <cbegle@mozilla.org> |
20 |
#%] |
21 |
|
22 |
[%# INTERFACE: |
23 |
# This template has the same interface as create.html.tmpl |
24 |
#%] |
25 |
|
26 |
[% PROCESS global/variables.none.tmpl %] |
27 |
|
28 |
[% USE Bugzilla %] |
29 |
[% cgi = Bugzilla.cgi %] |
30 |
|
31 |
[% PROCESS global/header.html.tmpl |
32 |
title = "Enter $terms.ABug" |
33 |
onload = "PutDescription()" |
34 |
style = "#somebugs { width: 100%; height: 500px }" |
35 |
%] |
36 |
|
37 |
[% tablecolour = "#efefef" %] |
38 |
|
39 |
[%# This script displays the descriptions for selected components. %] |
40 |
<script type="text/javascript"> |
41 |
<!-- |
42 |
var descriptions = [ |
43 |
[% FOREACH c = product.components %] |
44 |
'[% c.description FILTER js %]', |
45 |
[% END %] |
46 |
]; |
47 |
|
48 |
function PutDescription() { |
49 |
if ((document.getElementById) && (document.body.innerHTML)) { |
50 |
var componentIndex = document.getElementById('component').selectedIndex; |
51 |
if (componentIndex != -1) { |
52 |
var description = document.getElementById('description'); |
53 |
description.innerHTML = descriptions[componentIndex]; |
54 |
} |
55 |
} |
56 |
} |
57 |
|
58 |
var initialowners = new Array([% product.components.size %]); |
59 |
var last_initialowner; |
60 |
var initialccs = new Array([% product.components.size %]); |
61 |
var components = new Array([% product.components.size %]); |
62 |
var flags = new Array([% product.components.size %]); |
63 |
[% IF Param("useqacontact") %] |
64 |
var initialqacontacts = new Array([% product.components.size %]); |
65 |
var last_initialqacontact; |
66 |
[% END %] |
67 |
[% count = 0 %] |
68 |
[%- FOREACH c = product.components %] |
69 |
components[[% count %]] = "[% c.name FILTER js %]"; |
70 |
initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]"; |
71 |
[% flag_list = [] %] |
72 |
[% FOREACH f = c.flag_types.bug %] |
73 |
[% NEXT UNLESS f.is_active %] |
74 |
[% flag_list.push(f.id) %] |
75 |
[% END %] |
76 |
[% FOREACH f = c.flag_types.attachment %] |
77 |
[% NEXT UNLESS f.is_active %] |
78 |
[% flag_list.push(f.id) %] |
79 |
[% END %] |
80 |
flags[[% count %]] = [[% flag_list.join(",") FILTER js %]]; |
81 |
[% IF Param("useqacontact") %] |
82 |
initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]"; |
83 |
[% END %] |
84 |
|
85 |
[% SET initial_cc_list = [] %] |
86 |
[% FOREACH cc_user = c.initial_cc %] |
87 |
[% initial_cc_list.push(cc_user.login) %] |
88 |
[% END %] |
89 |
initialccs[[% count %]] = "[% initial_cc_list.join(', ') FILTER js %]"; |
90 |
|
91 |
[% count = count + 1 %] |
92 |
[%- END %] |
93 |
|
94 |
function set_assign_to() { |
95 |
// Based on the selected component, fill the "Assign To:" field |
96 |
// with the default component owner, and the "QA Contact:" field |
97 |
// with the default QA Contact. It also selectively enables flags. |
98 |
var form = document.Create; |
99 |
var assigned_to = form.assigned_to.value; |
100 |
|
101 |
[% IF Param("useqacontact") %] |
102 |
var qa_contact = form.qa_contact.value; |
103 |
[% END %] |
104 |
|
105 |
var index = -1; |
106 |
if (form.component.type == 'select-one') { |
107 |
index = form.component.selectedIndex; |
108 |
} else if (form.component.type == 'hidden') { |
109 |
// Assume there is only one component in the list |
110 |
index = 0; |
111 |
} |
112 |
if (index != -1) { |
113 |
var owner = initialowners[index]; |
114 |
var component = components[index]; |
115 |
if (assigned_to == last_initialowner |
116 |
|| assigned_to == owner |
117 |
|| assigned_to == '') { |
118 |
form.assigned_to.value = owner; |
119 |
last_initialowner = owner; |
120 |
} |
121 |
|
122 |
document.getElementById('initial_cc').innerHTML = initialccs[index]; |
123 |
|
124 |
[% IF Param("useqacontact") %] |
125 |
var contact = initialqacontacts[index]; |
126 |
if (qa_contact == last_initialqacontact |
127 |
|| qa_contact == contact |
128 |
|| qa_contact == '') { |
129 |
form.qa_contact.value = contact; |
130 |
last_initialqacontact = contact; |
131 |
} |
132 |
[% END %] |
133 |
|
134 |
// First, we disable all flags. Then we re-enable those |
135 |
// which are available for the selected component. |
136 |
var inputElements = document.getElementsByTagName("select"); |
137 |
var inputElement, flagField; |
138 |
for ( var i=0 ; i<inputElements.length ; i++ ) { |
139 |
inputElement = inputElements.item(i); |
140 |
if (inputElement.name.search(/^flag_type-(\d+)$/) != -1) { |
141 |
var id = inputElement.name.replace(/^flag_type-(\d+)$/, "$1"); |
142 |
inputElement.disabled = true; |
143 |
// Also disable the requestee field, if it exists. |
144 |
inputElement = document.getElementById("requestee_type-" + id); |
145 |
if (inputElement) inputElement.disabled = true; |
146 |
} |
147 |
} |
148 |
// Now enable flags available for the selected component. |
149 |
for (var i = 0; i < flags[index].length; i++) { |
150 |
flagField = document.getElementById("flag_type-" + flags[index][i]); |
151 |
// Do not enable flags the user cannot set nor request. |
152 |
if (flagField && flagField.options.length > 1) { |
153 |
flagField.disabled = false; |
154 |
// Re-enabling the requestee field depends on the status |
155 |
// of the flag. |
156 |
toggleRequesteeField(flagField, 1); |
157 |
} |
158 |
} |
159 |
} |
160 |
PutDescription(); |
161 |
} |
162 |
|
163 |
function handleWantsAttachment(wants_attachment) { |
164 |
if (wants_attachment) { |
165 |
document.getElementById('attachment_false').style.display = 'none'; |
166 |
document.getElementById('attachment_true').style.display = 'block'; |
167 |
} |
168 |
else { |
169 |
document.getElementById('attachment_false').style.display = 'block'; |
170 |
document.getElementById('attachment_true').style.display = 'none'; |
171 |
clearAttachmentFields(); |
172 |
} |
173 |
} |
174 |
|
175 |
// this is courtesy of John Keller |
176 |
|
177 |
var LOOKUP_ADDR = "/lookup.php?pkg="; |
178 |
var ASSIGNEE_OBJ_NAME = "assigned_to"; |
179 |
var NOT_FOUND = "NOT_FOUND"; |
180 |
|
181 |
var http_connection = null; |
182 |
|
183 |
// init XMLHttpRequest object, based on browser type |
184 |
function initHttpConnection() { |
185 |
http_connection = null; |
186 |
|
187 |
try { |
188 |
// Firefox, Opera 8.0+, Safari |
189 |
http_connection = new XMLHttpRequest(); |
190 |
} catch (e) { |
191 |
// Internet Explorer |
192 |
try { |
193 |
http_connection = new ActiveXObject("Msxml2.XMLHTTP"); |
194 |
} catch (e) { |
195 |
try { |
196 |
http_connection = new ActiveXObject("Microsoft.XMLHTTP"); |
197 |
} catch (e) { |
198 |
// browser does not support AJAX |
199 |
} |
200 |
} |
201 |
} |
202 |
|
203 |
if (http_connection != null) { |
204 |
http_connection.onreadystatechange = onLoadMaintainer; |
205 |
} |
206 |
} |
207 |
|
208 |
// handler for data received |
209 |
// text field to set should be similar to |
210 |
// <input name="assigned_to" id="assigned_to" /> |
211 |
function onLoadMaintainer() { |
212 |
var field_obj; |
213 |
|
214 |
if ((http_connection.readyState == 4) && (http_connection.status == 200)) { |
215 |
if ((http_connection.responseText != null) && (http_connection.responseText != NOT_FOUND)) { |
216 |
if ((field_obj = document.getElementById(ASSIGNEE_OBJ_NAME)) != null) { |
217 |
field_obj.value = http_connection.responseText; |
218 |
} |
219 |
} |
220 |
} else { |
221 |
// by default, we'll leave form value alone and don't do anything else |
222 |
// this is a good place to set a default or show an error, though |
223 |
} |
224 |
} |
225 |
|
226 |
// handler for when user enters a package |
227 |
// text field to set should be similar to |
228 |
// <input name="cf_rpmpkg" onchange="onChangePackage(this)" /> |
229 |
function onChangePackage(input_obj) { |
230 |
initHttpConnection(); |
231 |
|
232 |
if ((http_connection != null) && (input_obj.value != "")) { |
233 |
http_connection.open("GET", LOOKUP_ADDR + encodeURIComponent(input_obj.value)); |
234 |
http_connection.send(null); |
235 |
} |
236 |
}; |
237 |
|
238 |
|
239 |
--> |
240 |
</script> |
241 |
|
242 |
<p> Submit a bug using the <a href="enter_bug.cgi?product=[% product.name FILTER html %]">expert bug form</a>.</p> |
243 |
|
244 |
|
245 |
<form method="post" action="post_bug.cgi"> |
246 |
<input type="hidden" name="format" value="guided"> |
247 |
<input type="hidden" name="assigned_to" value=""> |
248 |
<input type="hidden" name="priority" |
249 |
value="[% default.priority FILTER html %]"> |
250 |
<input type="hidden" name="token" value="[% token FILTER html %]"> |
251 |
<input type="hidden" name="op_sys" value="Linux"> |
252 |
|
253 |
<table valign="top" cellpadding="5" cellspacing="5" border="0"> |
254 |
|
255 |
<tr> |
256 |
<td align="right" valign="top" bgcolor="[% tablecolour %]" width="10%"> |
257 |
<b>Product:</b> |
258 |
</td> |
259 |
<td valign="top"> |
260 |
<input type="hidden" name="product" value="[% product.name FILTER html %]"> |
261 |
<b>[% product.name FILTER html %]</b> |
262 |
</td> |
263 |
</tr> |
264 |
|
265 |
<tr> |
266 |
<td align="right" valign="top" bgcolor="[% tablecolour %]"> |
267 |
<b>Component:</b> |
268 |
</td> |
269 |
<td valign="top"> |
270 |
<table border="0" cellpadding="0" cellspacing="0"> |
271 |
<tr> |
272 |
<td valign="top"> |
273 |
<select name="component" id="component" |
274 |
size="5" onchange="PutDescription();"> |
275 |
[% IF NOT default.component_ %] |
276 |
[%# Various b.m.o. products have a "General" component, |
277 |
which is a useful default. %] |
278 |
[% default.component_ = "General" %] |
279 |
[% END %] |
280 |
[% FOREACH c = product.components %] |
281 |
<option value="[% c.name FILTER html %]" |
282 |
[% " selected=\"selected\"" IF c.name == default.component_ %]> |
283 |
[% c.name FILTER html %] |
284 |
</option> |
285 |
[% END %] |
286 |
</select> |
287 |
</td> |
288 |
<td valign="top" width="100%"> |
289 |
<div id="description" style="color: green; margin-left: 10px; |
290 |
height: 5em; overflow: auto;"> |
291 |
<script type="text/javascript"> |
292 |
if ((document.getElementById) && (document.body.innerHTML)) { |
293 |
document.write("\ |
294 |
Select a component to see its description here."); |
295 |
} |
296 |
</script> |
297 |
</div> |
298 |
</td> |
299 |
</tr> |
300 |
</table> |
301 |
<p style="font-size: 85%;">Core packages are those packages found in the main and contrib repositories, and Other |
302 |
packages are those found in non-free and commercial repositories; if you're unsure, choose Core.</p> |
303 |
|
304 |
<p> |
305 |
The area where the problem occurs. |
306 |
To pick the right component, you could use the same one as |
307 |
similar [% terms.bugs %] you found in your search, or read the full list of |
308 |
<a target="_blank" href="describecomponents.cgi?product= |
309 |
[% product.name FILTER url_quote %]">component |
310 |
descriptions</a> (opens in new window) if you need more help. |
311 |
</p> |
312 |
</td> |
313 |
</tr> |
314 |
|
315 |
<tr> |
316 |
<td align="right" valign="top" bgcolor="[% tablecolour %]"> |
317 |
<b>Version:</b> |
318 |
</td> |
319 |
<td valign="top"> |
320 |
<select name="version" size="5"> |
321 |
[%- FOREACH v = version %] |
322 |
<option value="[% v FILTER html %]" |
323 |
[% " selected=\"selected\"" IF v == default.version %]>[% v FILTER html %] |
324 |
</option> |
325 |
[% END %] |
326 |
</select> |
327 |
</td> |
328 |
</tr> |
329 |
|
330 |
[%# We override rep_platform and op_sys for simplicity. The values chosen |
331 |
are based on which are most common in the b.m.o database %] |
332 |
[% rep_platform = [ "All", "i586", "x86_64" ] %] |
333 |
|
334 |
<tr> |
335 |
<td align="right" valign="top" bgcolor="[% tablecolour %]"> |
336 |
<b>Hardware Platform:</b> |
337 |
</td> |
338 |
<td valign="top"> |
339 |
[% PROCESS select sel = 'rep_platform' %] |
340 |
</td> |
341 |
</tr> |
342 |
|
343 |
<tr> |
344 |
<td align="right" valign="top" bgcolor="[% tablecolour %]"> |
345 |
<b>Source RPM:</b> |
346 |
</td> |
347 |
<td valign="top"> |
348 |
<input type="text" size="80" name="cf_rpmpkg" value="" onchange="onChangePackage(this)"> |
349 |
<p> |
350 |
This is where you can identify exactly which RPM package is involved in this bug report. For instance, |
351 |
if you know the problem you are having is with the program <tt>mysqld</tt>, then execute |
352 |
<tt>rpm -qif /usr/sbin/mysqld</tt>. This will tell you the name and version of the RPM |
353 |
package (i.e. MySQL-5.0.27-1mga1) as well as other information. In particular, you are looking for |
354 |
the "Source RPM" field (i.e. MySQL-5.0.27-1mga1.src.rpm) -- this is the information you should |
355 |
provide here. Alternatively, you may use <tt>rpm -qf /usr/sbin/mysqld --qf '%{SOURCERPM}\n'</tt> to |
356 |
obtain the information. If you do not know the location of the program in question, use <tt>rpm -qf `which mysqld`</tt> |
357 |
to obtain it. Please enter that information above. |
358 |
</p> |
359 |
</td> |
360 |
</tr> |
361 |
|
362 |
<tr> |
363 |
<td align="right" valign="top" bgcolor="[% tablecolour %]"> |
364 |
<b>URL:</b> |
365 |
</td> |
366 |
<td valign="top"> |
367 |
<input type="text" size="80" name="bug_file_loc" value="http://"> |
368 |
<p> |
369 |
URL that demonstrates the problem you are submitting (optional). |
370 |
</p> |
371 |
</td> |
372 |
</tr> |
373 |
|
374 |
<tr> |
375 |
<td align="right" valign="top" bgcolor="[% tablecolour %]"> |
376 |
<b>Summary:</b> |
377 |
</td> |
378 |
<td valign="top"> |
379 |
<input type="text" size="80" name="short_desc" id="short_desc" |
380 |
maxlength="255" spellcheck="true"> |
381 |
<p> |
382 |
A sentence that summarizes the problem. |
383 |
Please be descriptive and use lots of keywords. |
384 |
</p> |
385 |
<p> |
386 |
<tt> |
387 |
<font color="#990000">Bad example</font>: mail crashed |
388 |
</tt> |
389 |
<br> |
390 |
<tt> |
391 |
<font color="#009900">Good example</font>: |
392 |
crash in Evolution while checking for new POP mail |
393 |
</tt> |
394 |
</p> |
395 |
</td> |
396 |
</tr> |
397 |
|
398 |
<tr> |
399 |
<td align="right" valign="top" bgcolor="[% tablecolour %]"> |
400 |
<b>Details:</b> |
401 |
</td> |
402 |
<td valign="top"> |
403 |
[% INCLUDE global/textarea.html.tmpl |
404 |
name = 'comment' |
405 |
minrows = 10 |
406 |
maxrows = 25 |
407 |
cols = constants.COMMENT_COLS |
408 |
defaultcontent = "Description of problem:\n\n\nVersion-Release number of selected component (if applicable):\n\n\nHow reproducible:\n\n\nSteps to Reproduce:\n1.\n2.\n3.\n" |
409 |
%] |
410 |
[% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] |
411 |
<br /> |
412 |
<input type="checkbox" id="commentprivacy" name="commentprivacy" |
413 |
[% " checked=\"checked\"" IF commentprivacy %]> |
414 |
<label for="commentprivacy"> |
415 |
Initial Description is Private |
416 |
</label> |
417 |
[% END %] |
418 |
|
419 |
<p> |
420 |
Expand on the Summary. Please be |
421 |
as specific as possible about what is wrong. |
422 |
</p> |
423 |
<p> |
424 |
<tt> |
425 |
<font color="#990000">Bad example</font>: I can't seem to login to the system. Please help! |
426 |
</tt> |
427 |
<br> |
428 |
<tt> |
429 |
<font color="#009900">Good example</font>:<br /><br /> |
430 |
Description of problem:<br /><br /> |
431 |
I'm unable to login to the system via ssh. The /var/log/messages |
432 |
log indicates there is a problem with the pam module pam_ldap, but the /etc/pam.d/system-auth file doesn't |
433 |
contain that module and I'm not using LDAP. I looked at /etc/pam.d/sshd and it does contain that module but I'm |
434 |
not sure how it got there, unless it was due to the super-spiffy super-ldap-mojo package I installed yesterday. <br /><br /> |
435 |
Version-Release number of selected component (if applicable):<br /><br /> |
436 |
openldap-2.3.34-5mga1, pam-0.99.7.1-2mga1<br /><br /> |
437 |
How reproducible:<br /><br /> |
438 |
Every time I attempt to login.<br /><br /> |
439 |
Steps to Reproduce:<br /> |
440 |
1. ssh user@host<br /> |
441 |
2. see the rejection<br /> |
442 |
</tt> |
443 |
</p> |
444 |
</td> |
445 |
</tr> |
446 |
|
447 |
<tr> |
448 |
<td valign="top" align="right" bgcolor="[% tablecolour %]"> |
449 |
<b>Severity:</b> |
450 |
</td> |
451 |
<td valign="top"> |
452 |
<select name="bug_severity"> |
453 |
<option name="critical" value="critical"> |
454 |
Critical: The software crashes, hangs, or causes you to |
455 |
lose data. |
456 |
</option> |
457 |
<option name="major" value="major"> |
458 |
Major: A major feature is broken. |
459 |
</option> |
460 |
<option name="normal" value="normal" selected="selected"> |
461 |
Normal: It's [% terms.abug %] that should be fixed. |
462 |
</option> |
463 |
<option name="minor" value="minor"> |
464 |
Minor: Minor loss of function, and there's an easy workaround. |
465 |
</option> |
466 |
<option name="trivial" value="trivial"> |
467 |
Trivial: A cosmetic problem, such as a misspelled word or |
468 |
misaligned text. |
469 |
</option> |
470 |
<option name="enhancement" value="enhancement"> |
471 |
Enhancement: Request for new feature or enhancement. |
472 |
</option> |
473 |
</select> |
474 |
<p> |
475 |
Indicate how serious the problem is, or if your [% terms.bug %] is a |
476 |
request for a new feature. |
477 |
</p> |
478 |
</td> |
479 |
</tr> |
480 |
<tr> |
481 |
<td valign="top" align="right" bgcolor="[% tablecolour %]"> |
482 |
<b>Assign To:</b> |
483 |
</td> |
484 |
<td valign="top"> |
485 |
[% safe_assigned_to = FILTER js; bug.assigned_to.login; END %] |
486 |
[% INCLUDE global/userselect.html.tmpl |
487 |
id => "assigned_to" |
488 |
name => "assigned_to" |
489 |
value => bug.assigned_to.login |
490 |
size => 32 |
491 |
%] |
492 |
<p>Leave the above blank to assign to the default component owner.</p> |
493 |
</td> |
494 |
</tr> |
495 |
</table> |
496 |
|
497 |
<p> |
498 |
<input type="submit" id="report" value=" Submit [% terms.Bug %] Report " |
499 |
onclick="if (this.form.comment.value == 'Description of problem:\n\n\nVersion-Release number of selected component (if applicable):\n\n\nHow reproducible:\n\n\nSteps to Reproduce:\n1.\n2.\n3.\n') |
500 |
{ alert('Please enter some details about this [% terms.bug %].'); |
501 |
this.form.comment.focus(); |
502 |
return false; } return true;"> |
503 |
</p> |
504 |
|
505 |
<p> |
506 |
That's it! Thanks very much. You'll be notified by email about any |
507 |
progress that is made on fixing your [% terms.bug %]. |
508 |
Thank you for choosing Mageia! |
509 |
</p> |
510 |
</form> |
511 |
|
512 |
[% PROCESS global/footer.html.tmpl %] |
513 |
|
514 |
[%############################################################################%] |
515 |
[%# Block for SELECT fields #%] |
516 |
[%############################################################################%] |
517 |
|
518 |
[% BLOCK select %] |
519 |
<select name="[% sel %]"> |
520 |
[%- IF default.$sel %] |
521 |
<option value="[% default.$sel FILTER html %]" selected="selected"> |
522 |
[% default.$sel FILTER html -%] |
523 |
</option> |
524 |
[% END %] |
525 |
[%- FOREACH x = $sel %] |
526 |
[% NEXT IF x == default.$sel %] |
527 |
<option value="[% x FILTER html %]"> |
528 |
[% x FILTER html -%] |
529 |
</option> |
530 |
[%- END %] |
531 |
</select> |
532 |
[% END %] |