create-guided.html.tmpl 18.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
[%# 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): Gervase Markham <gerv@gerv.net>
  #                 Christine Begle <cbegle@mozilla.org>
  #%]

[%# INTERFACE:
  # This template has the same interface as create.html.tmpl
  #%]
25

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

28 29 30
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]

31
[% PROCESS global/header.html.tmpl
32
   title = "Enter $terms.ABug"
33
   onload = "PutDescription()"
34
   style = "#somebugs { width: 100%; height: 500px }"
35 36 37 38
 %]

<p>
  <font color="red">
39 40 41
    This is a template used on mozilla.org.  This template, and the
    comment-guided.txt.tmpl template that formats the data submitted via 
    the form in this template, are included as a demo of what it's
42
    possible to do with custom templates in general, and custom [% terms.bug %]
43 44 45
    entry templates in particular. As much of the text will not apply, 
    you should alter it 
    if you want to use this form on your [% terms.Bugzilla %] installation.
46 47 48 49 50 51
  </font>
</p>

[% tablecolour = "#FFFFCC" %]

[%# This script displays the descriptions for selected components. %]
52
<script type="text/javascript">
53
var descriptions = [
54
[% FOREACH c = product.components %]
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
  '[% c.description FILTER js %]',
[% END %]
];

function PutDescription() {
    if ((document.getElementById) && (document.body.innerHTML)) {
        var componentIndex = document.getElementById('component').selectedIndex;
        if (componentIndex != -1) {
            var description = document.getElementById('description');
            description.innerHTML = descriptions[componentIndex];
        }
    }
}
</script>

70
[%# Browser sniff to try and reduce the incidence of Netscape 6/7 bugs %]
71

72 73
[% IF cgi.user_agent('Netscape(\d)') %]
  [% matches = cgi.user_agent().match('Netscape(\d)') %]
74 75
  <div style="background-color: lightgrey;
              border: 1px solid black;
76 77 78
              padding: 2px">
    <font color="#990000">
      <b>
79 80
        You are using Netscape [% matches.0 %].
        Report [% terms.bugs %] with this browser to the
81 82 83 84
        <a href="http://home.netscape.com/browsers/[% matches.0 %]/feedback/index.html">
         Netscape [% matches.0 %] Feedback Center.</a>
      </b>
    </font>
85 86 87 88 89
    This form is only for reporting [% terms.bugs %] in the Mozilla web browser
    and other products from mozilla.org. To report [% terms.abug %] you find 
    in Netscape [% matches.0 %] with this form, you must reproduce it first in 
    a recent build of
    <a href="http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest/">Mozilla</a>,
90 91
    <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/">Firefox</a>,
<a href="http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-trunk/">Thunderbird</a> or
92 93
    <a href="http://ftp.mozilla.org/pub/mozilla.org/camino/nightly/latest/">Camino</a>
    to make sure the problem hasn't been fixed already.
94 95 96
  </div>
[% END %]

97 98 99 100 101 102
[% IF cgi.user_agent('Gecko/') %]
  [% matches = cgi.user_agent().match('Gecko/(\d+)') %]
  
[% END %]

<!-- @@@ Need UA checking here -->
103

104
<a name="step1"></a>
105
<h3>Step 1 of 3 - has your [% terms.bug %] already been reported?</h3>
106 107

<p>
108 109
  <font color="red">Please don't skip this step - half of all 
  [% terms.bugs %] filed are
110 111
  reported already.</font>
    Check the two lists of frequently-reported [% terms.bugs %]:
112 113
</p>

114
[%# Include other products if sensible %]
115
[% IF product.name == "Firefox" %]
116
  [% productstring = "product=Mozilla%20Application%20Suite&amp;product=Firefox" %]
117
[% ELSIF product.name == "Thunderbird" %]
118
  [% productstring = "product=Mozilla%20Application%20Suite&amp;product=Thunderbird" %]
119
[% ELSE %]
120
  [% productstring = BLOCK %]product=[% product.name FILTER url_quote %][% END %]
121 122 123 124 125 126 127
[% END %]

<p>
    <a href="duplicates.cgi?[% productstring %]&format=simple" target="somebugs">All-time Top 100</a> (loaded initially) |
    <a href="duplicates.cgi?[% productstring %]&format=simple&sortby=delta&reverse=1&maxrows=100&changedsince=14" target="somebugs">Hot in the last two weeks</a>  
</p>

128
<iframe name="somebugs" id="somebugs"
129 130 131 132 133 134 135
  style="border: 2px black solid"
  src="duplicates.cgi?[% productstring %]&format=simple">
</iframe>

<p>
    If your [% terms.bug %] isn't there, search [% terms.Bugzilla %] by entering
    a few key words having to do with your [% terms.bug %] in this box.
136
    For example: <tt><b>pop3 mail</b></tt> or <tt><b>copy paste</b></tt>.
137
    The results will appear above.
138
  </p>
139

140
[%# All bugs opened inside the past six months %]
141 142
  <form action="buglist.cgi" method="get" target="somebugs">
    <input type="hidden" name="format" value="simple">
143
    <input type="hidden" name="order" value="relevance desc">
144
    <input type="hidden" name="bug_status" value="__all__">
145 146 147 148 149
    <input type="hidden" name="product" value="[% product.name FILTER html %]">
    [% IF product.name == "Firefox" OR 
          product.name == "Thunderbird" OR 
          product.name == "Mozilla Application Suite" OR
          product.name == "Camino" %]
150 151 152 153 154 155
      <input type="hidden" name="product" value="Core">
      <input type="hidden" name="product" value="Toolkit">
      <input type="hidden" name="product" value="PSM">
      <input type="hidden" name="product" value="NSPR">
      <input type="hidden" name="product" value="NSS">
    [% END %]      
156 157 158
    <input type="hidden" name="chfieldfrom" value="-6m">
    <input type="hidden" name="chfieldto" value="Now">
    <input type="hidden" name="chfield" value="[Bug creation]">
159
    <input type="text" name="content" size="40">
160
    <input type="submit" id="search" value="Search">
161 162 163 164
  </form>

<p>
  Look through the search results. If you get the
165 166
  <tt><b>[% terms.zeroSearchResults %]</b></tt> message, [% terms.Bugzilla %]
  found no [% terms.bugs %] that
167 168 169
  match. Check for typing mistakes, or try fewer or different keywords.
  If you find [% terms.abug %] that looks the same as yours, please add
  any useful extra information you have to it, rather than opening a new one.
170 171 172
</p>


173
<a name="step2"></a>
174
<h3>Step 2 of 3 - give information</h3>
175 176

<p>
177 178
  If you've tried a few searches and your [% terms.bug %] really isn't in 
  there, tell us all about it.
179 180
</p>

181
<form method="post" action="post_bug.cgi">
182 183
  <input type="hidden" name="format" value="guided">
  <input type="hidden" name="assigned_to" value="">
184
  <input type="hidden" name="priority"
185
         value="[% default.priority FILTER html %]">
186
  <input type="hidden" name="version"
187
         value="[% default.version FILTER html %]">
188
  <input type="hidden" name="token" value="[% token FILTER html %]">
189

190 191 192
<table valign="top" cellpadding="5" cellspacing="5" border="0">

  <tr bgcolor="[% tablecolour %]">
193
    <td align="right" valign="top">
194 195 196
      <b>Product</b>
    </td>
    <td valign="top">
197 198
      <input type="hidden" name="product" value="[% product.name FILTER html %]">
      [% product.name FILTER html %]
199 200 201 202
    </td>
  </tr>

  <tr>
203
    <td align="right" valign="top">
204 205 206 207 208
      <b>Component</b>
    </td>
    <td valign="top">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
209 210
          <td valign="top">
            <select name="component" id="component"
211
                    size="5" onchange="PutDescription()">
212 213 214 215 216
              [% IF NOT default.component_ %]
                [%# Various b.m.o. products have a "General" component,
                    which is a useful default. %]
                [% default.component_ = "General" %]
              [% END %]
217
              [% FOREACH c = product.components %]
218
                <option value="[% c.name FILTER html %]"
219
                  [% " selected=\"selected\"" IF c.name == default.component_ %]>
220 221 222 223 224 225 226 227
                  [% c.name FILTER html %]
                </option>
              [% END %]
            </select>
          </td>
          <td valign="top" width="100%">
              <div id="description" style="color: green; margin-left: 10px;
                                           height: 5em; overflow: auto;">
228
                <script type="text/javascript">
229 230 231 232 233
                  if ((document.getElementById) && (document.body.innerHTML)) {
                    document.write("\
                    Select a component to see its description here.");
                  }
                </script>
234 235 236 237
              </div>
          </td>
        </tr>
      </table>
238 239 240 241 242 243
      
      <p>
        The area where the problem occurs.
        To pick the right component, you could use the same one as
        similar [% terms.bugs %] you found in your search, or read the full list of
        <a target="_blank" href="describecomponents.cgi?product=
244
            [% product.name FILTER url_quote %]">component
245 246
        descriptions</a> (opens in new window) if you need more help.
      </p>
247 248 249 250 251
    </td>
  </tr>

  [%# We override rep_platform and op_sys for simplicity. The values chosen
      are based on which are most common in the b.m.o database %]
252
  [% rep_platform = [ "PC", "Macintosh", "All", "Other" ] %]
253 254

  <tr bgcolor="[% tablecolour %]">
255
    <td align="right" valign="top">
256 257 258 259 260 261 262
      <b>Hardware Platform</b>
    </td>
    <td valign="top">
      [% PROCESS select sel = 'rep_platform' %]
    </td>
  </tr>

263 264
  [% op_sys = [ "Windows 2000", "Windows XP", "Windows Vista",
                "Mac OS X", "Linux", "All", "other" ] %]
265 266

  <tr>
267
    <td align="right" valign="top">
268 269
      <b>Operating System</b>
    </td>
270
    <td valign="top">
271 272 273 274
      [% PROCESS select sel = 'op_sys' %]
    </td>
  </tr>

275
  [% IF product.name.match("Firefox|Camino|Mozilla Application Suite") %]
276 277 278 279 280 281 282 283
    [% matches = cgi.user_agent('Gecko/(\d+)') %]
    [% buildid = cgi.user_agent() IF matches %]
  [% END %]
  
  [%# Accept URL parameter build ID for non-browser products %]
  [% IF cgi.param("buildid") %]
    [% buildid = cgi.param("buildid") %]
  [% END %]
284 285

  <tr bgcolor="[% tablecolour %]">
286
    <td align="right" valign="top">
287
      <b>Build Identifier</b>
288 289
    </td>
    <td valign="top">
290
      <input type="text" size="80" name="buildid" value="[% buildid FILTER html %]">
291
      <p>
292 293 294 295 296 297
        This should identify the exact version of the product you were using.  
        If the above field is blank or you know it is incorrect, copy the 
        version text from the product's Help | 
        About menu (for browsers this will begin with "Mozilla/5.0...").  
        If the product won't start, instead paste the complete URL you downloaded 
        it from.
298 299 300 301 302
      </p>
    </td>
  </tr>

  <tr>
303
    <td align="right" valign="top">
304 305 306
      <b>URL</b>
    </td>
    <td valign="top">
307
      <input type="text" size="80" name="bug_file_loc" value="http://">
308
      <p>
309 310 311 312
        URL that demonstrates the problem you are seeing (optional).<br>
        <b>IMPORTANT</b>: if the problem is with a broken web page, you need
        to report it
        <a href="https://bugzilla.mozilla.org/page.cgi?id=broken-website.html">a different way</a>.
313 314 315 316 317
      </p>
   </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
318
    <td align="right" valign="top">
319
      <b>Summary</b>
320 321
    </td>
    <td valign="top">
322
      <input type="text" size="80" name="short_desc" id="short_desc" 
323
             maxlength="255" spellcheck="true">
324 325 326
      <p>
        A sentence which summarises the problem.
        Please be descriptive and use lots of keywords.
327
      </p>
328 329 330 331 332 333 334 335 336 337 338 339 340 341
      <p>
        <tt>
          <font color="#990000">Bad example</font>: mail crashed
        </tt>
        <br>
        <tt>
          <font color="#009900">Good example</font>:
          crash if I close the mail window while checking for new POP mail
        </tt>
      </p>
    </td>
  </tr>

  <tr>
342
    <td align="right" valign="top">
343
      <b>Details</b>
344 345
    </td>
    <td valign="top">
346 347 348
      [% INCLUDE global/textarea.html.tmpl
        name    = 'comment'
        minrows = 6
349
        cols    = constants.COMMENT_COLS
350
      %]
351 352 353 354 355 356
      <p>
        Expand on the Summary. Please be
        as specific as possible about what is wrong.
      </p>
      <p>
        <tt>
357 358
          <font color="#990000">Bad example</font>: Mozilla crashed.
          You suck!
359 360 361
        </tt>
        <br>
        <tt>
362 363 364 365
          <font color="#009900">Good example</font>: After a crash which
          happened when I was sorting in the Bookmark Manager,<br> all of my
          top-level bookmark folders beginning with the letters Q to Z are 
          no longer present.
366 367 368 369 370 371
        </tt>
      </p>
    </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
372
    <td align="right" valign="top">
373 374 375 376 377
      <b>Reproducibility</b>
    </td>
    <td valign="top">
      <select name="reproducible">
        <option name="AlwaysReproducible" value="Always">
378
          Happens every time.
379 380
        </option>
        <option name="Sometimes" value="Sometimes">
381
          Happens sometimes, but not always.
382 383 384 385 386 387 388 389 390 391 392 393
        </option>
        <option name="DidntTry" value="Didn't try">
          Haven't tried to reproduce it.
        </option>
        <option name="NotReproducible" value="Couldn't Reproduce">
          Tried, but couldn't reproduce it.
        </option>
      </select>
    </td>
  </tr>

  <tr>
394
    <td align="right" valign="top">
395
      <b>Steps to Reproduce</b>
396 397
    </td>
    <td valign="top">
398 399 400
      [% INCLUDE global/textarea.html.tmpl
        name           = 'reproduce_steps'
        minrows        = 4
401
        cols           = constants.COMMENT_COLS
402 403
        defaultcontent = "1.\n2.\n3."
      %]
404 405 406 407
      <p>
        Describe how to reproduce the problem, step by
        step. Include any special setup steps.
      </p>
408 409 410 411
    </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
412
    <td valign="top" align="right">
413
      <b>Actual Results</b>
414 415
    </td>
    <td valign="top">
416 417 418
      [% INCLUDE global/textarea.html.tmpl
        name    = 'actual_results'
        minrows = 4
419
        cols    = constants.COMMENT_COLS
420
      %]
421 422
      <p>
        What happened after you performed the steps above?
423
      </p>
424 425 426 427
    </td>
  </tr>

  <tr>
428
    <td valign="top" align="right">
429
      <b>Expected Results</b>
430 431
    </td>
    <td valign="top">
432 433 434
      [% INCLUDE global/textarea.html.tmpl
        name    = 'expected_results'
        minrows = 4
435
        cols    = constants.COMMENT_COLS
436
      %]
437
      <p>
438
        What should the software have done instead?
439 440 441 442 443
      </p>
    </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
444
    <td valign="top" align="right">
445
      <b>Additional Information</b>
446 447
    </td>
    <td valign="top">
448 449 450
      [% INCLUDE global/textarea.html.tmpl
        name    = 'additional_info'
        minrows = 8
451
        cols    = constants.COMMENT_COLS
452
      %]
453 454
      <p>
        Add any additional information you feel may be
455 456
        relevant to this [% terms.bug %], such as the <b>theme</b> you were
        using (does the [% terms.bug %] still occur
457 458
        with the default theme?), a 
        <b><a href="http://kb.mozillazine.org/Quality_Feedback_Agent">Talkback crash ID</a></b>, or special
459 460
        information about <b>your computer's configuration</b>. Any information
        longer than a few lines, such as a <b>stack trace</b> or <b>HTML
461
        testcase</b>, should be added
462 463 464 465
        using the "Create a new Attachment" link on the [% terms.bug %], after
        it is filed. If you believe that it's relevant, please also include
        your build configuration, obtained by typing <tt>about:buildconfig</tt>
        into your URL bar.
466 467 468
        <br>
        <br>
        If you are reporting a crash, note the module in
469
        which the software crashed (e.g., <tt>Application Violation in
470
        gkhtml.dll</tt>).
471 472 473 474 475
      </p>
    </td>
  </tr>

  <tr>
476
    <td valign="top" align="right">
477 478 479 480 481
      <b>Severity</b>
    </td>
    <td valign="top">
      <select name="bug_severity">
        <option name="critical" value="critical">
482
          Critical: The software crashes, hangs, or causes you to
483 484 485 486 487
          lose data.
        </option>
        <option name="major" value="major">
          Major: A major feature is broken.
        </option>
488
        <option name="normal" value="normal" selected="selected">
489
          Normal: It's [% terms.abug %] that should be fixed.
490 491 492 493 494
        </option>
        <option name="minor" value="minor">
          Minor: Minor loss of function, and there's an easy workaround.
        </option>
        <option name="trivial" value="trivial">
495
          Trivial: A cosmetic problem, such as a misspelled word or
496 497 498 499 500 501
          misaligned text.
        </option>
        <option name="enhancement" value="enhancement">
          Enhancement: Request for new feature or enhancement.
        </option>
      </select>
502 503 504 505
      <p>
        Say how serious the problem is, or if your [% terms.bug %] is a 
        request for a new feature.
      </p>
506 507 508
    </td>
  </tr>
</table>
509 510 511


<a name="step3"></a>
512
<h3>Step 3 of 3 - submit the [% terms.bug %] report</h3>
513 514

<p>
515
  <input type="submit" id="report" value="    Submit [% terms.Bug %] Report    "
516 517
   onclick="if (this.form.comment.value == '')
   { alert('Please enter some details about this [% terms.bug %].');
518 519 520 521 522 523
     this.form.comment.focus();
     return false; } return true;">
</p>

<p>
  That's it! Thanks very much. You'll be notified by email about any
524 525 526 527
  progress that is made on fixing your [% terms.bug %]. 

<p>  
  Please be warned
528 529 530
  that we get a lot of [% terms.bug %] reports filed - it may take quite a 
  while to get around to yours. You can help the process by making sure your 
  [%+ terms.bug %] is
531 532
  complete and easy to understand, and by quickly replying to any questions
  which may arrive by email.
533
</p>
534

535 536 537 538 539 540 541 542 543 544
    </form>

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

[%############################################################################%]
[%# Block for SELECT fields                                                  #%]
[%############################################################################%]

[% BLOCK select %]
  <select name="[% sel %]">
545 546 547 548 549
    [%- IF default.$sel %]
      <option value="[% default.$sel FILTER html %]" selected="selected">
        [% default.$sel FILTER html -%]
      </option>
    [% END %]
550
    [%- FOREACH x = $sel %]
551 552
      [% NEXT IF x == default.$sel %]
      <option value="[% x FILTER html %]">
553 554 555 556 557
        [% x FILTER html -%]
      </option>
    [%- END %]
  </select>
[% END %]