create-guided.html.tmpl 17 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
<h3 id="step1">Step 1 of 3 - has your [% terms.bug %] already been reported?</h3>
71 72

<p>
73 74
  <font color="red">Please don't skip this step - half of all 
  [% terms.bugs %] filed are
75 76
  reported already.</font>
    Check the two lists of frequently-reported [% terms.bugs %]:
77 78
</p>

79
[%# Include other products if sensible %]
80
[% IF product.name == "Firefox" %]
81
  [% productstring = "product=Mozilla%20Application%20Suite&amp;product=Firefox" %]
82
[% ELSIF product.name == "Thunderbird" %]
83
  [% productstring = "product=Mozilla%20Application%20Suite&amp;product=Thunderbird" %]
84
[% ELSE %]
85
  [% productstring = BLOCK %]product=[% product.name FILTER url_quote %][% END %]
86 87 88
[% END %]

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

93
<iframe name="somebugs" id="somebugs"
94
  style="border: 2px black solid"
95
  src="duplicates.cgi?[% productstring %]&amp;format=simple">
96 97 98 99 100
</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.
101
    For example: <tt><b>pop3 mail</b></tt> or <tt><b>copy paste</b></tt>.
102
    The results will appear above.
103
  </p>
104

105
[%# All bugs opened inside the past six months %]
106 107
  <form action="buglist.cgi" method="get" target="somebugs">
    <input type="hidden" name="format" value="simple">
108
    <input type="hidden" name="order" value="relevance desc">
109
    <input type="hidden" name="bug_status" value="__all__">
110 111 112 113 114
    <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" %]
115 116 117 118 119 120
      <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 %]      
121 122 123
    <input type="hidden" name="chfieldfrom" value="-6m">
    <input type="hidden" name="chfieldto" value="Now">
    <input type="hidden" name="chfield" value="[Bug creation]">
124
    <input type="text" name="content" size="40">
125
    <input type="submit" id="search" value="Search">
126 127 128 129
  </form>

<p>
  Look through the search results. If you get the
130 131
  <tt><b>[% terms.zeroSearchResults %]</b></tt> message, [% terms.Bugzilla %]
  found no [% terms.bugs %] that
132 133 134
  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.
135 136 137
</p>


138
<h3 id="step2">Step 2 of 3 - give information</h3>
139 140

<p>
141 142
  If you've tried a few searches and your [% terms.bug %] really isn't in 
  there, tell us all about it.
143 144
</p>

145
<form method="post" action="post_bug.cgi">
146 147
  <input type="hidden" name="format" value="guided">
  <input type="hidden" name="assigned_to" value="">
148
  <input type="hidden" name="priority"
149
         value="[% default.priority FILTER html %]">
150
  <input type="hidden" name="version"
151
         value="[% default.version FILTER html %]">
152
  <input type="hidden" name="token" value="[% token FILTER html %]">
153

154 155 156
<table valign="top" cellpadding="5" cellspacing="5" border="0">

  <tr bgcolor="[% tablecolour %]">
157
    <td align="right" valign="top">
158 159 160
      <b>Product</b>
    </td>
    <td valign="top">
161 162
      <input type="hidden" name="product" value="[% product.name FILTER html %]">
      [% product.name FILTER html %]
163 164 165 166
    </td>
  </tr>

  <tr>
167
    <td align="right" valign="top">
168 169 170 171 172
      <b>Component</b>
    </td>
    <td valign="top">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
173 174
          <td valign="top">
            <select name="component" id="component"
175
                    size="5" onchange="PutDescription()">
176 177 178 179 180
              [% IF NOT default.component_ %]
                [%# Various b.m.o. products have a "General" component,
                    which is a useful default. %]
                [% default.component_ = "General" %]
              [% END %]
181
              [% FOREACH c = product.components %]
182
                <option value="[% c.name FILTER html %]"
183
                  [% " selected=\"selected\"" IF c.name == default.component_ %]>
184 185 186 187 188 189 190 191
                  [% 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;">
192
                <script type="text/javascript">
193 194 195 196 197
                  if ((document.getElementById) && (document.body.innerHTML)) {
                    document.write("\
                    Select a component to see its description here.");
                  }
                </script>
198 199 200 201
              </div>
          </td>
        </tr>
      </table>
202 203 204 205 206 207
      
      <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=
208
            [% product.name FILTER url_quote %]">component
209 210
        descriptions</a> (opens in new window) if you need more help.
      </p>
211 212 213 214 215
    </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 %]
216
  [% rep_platform = [ "PC", "Macintosh", "All", "Other" ] %]
217 218

  <tr bgcolor="[% tablecolour %]">
219
    <td align="right" valign="top">
220 221 222 223 224 225 226
      <b>Hardware Platform</b>
    </td>
    <td valign="top">
      [% PROCESS select sel = 'rep_platform' %]
    </td>
  </tr>

227 228
  [% op_sys = [ "Windows 2000", "Windows XP", "Windows Vista", "Windows 7",
                "Mac OS X", "Linux", "All", "Other" ] %]
229 230

  <tr>
231
    <td align="right" valign="top">
232 233
      <b>Operating System</b>
    </td>
234
    <td valign="top">
235 236 237 238
      [% PROCESS select sel = 'op_sys' %]
    </td>
  </tr>

239
  [% IF product.name.match("Firefox|Camino|Mozilla Application Suite") %]
240 241 242 243 244 245 246 247
    [% 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 %]
248 249

  <tr bgcolor="[% tablecolour %]">
250
    <td align="right" valign="top">
251
      <b>Build Identifier</b>
252 253
    </td>
    <td valign="top">
254
      <input type="text" size="80" name="buildid" value="[% buildid FILTER html %]">
255
      <p>
256 257 258 259 260 261
        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.
262 263 264 265 266
      </p>
    </td>
  </tr>

  <tr>
267
    <td align="right" valign="top">
268 269 270
      <b>URL</b>
    </td>
    <td valign="top">
271
      <input type="text" size="80" name="bug_file_loc" value="http://">
272
      <p>
273 274 275 276
        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>.
277 278 279 280 281
      </p>
   </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
282
    <td align="right" valign="top">
283
      <b>Summary</b>
284 285
    </td>
    <td valign="top">
286
      <input type="text" size="80" name="short_desc" id="short_desc" 
287
             maxlength="255" spellcheck="true">
288 289 290
      <p>
        A sentence which summarises the problem.
        Please be descriptive and use lots of keywords.
291
      </p>
292 293 294 295 296 297 298 299 300 301 302 303 304 305
      <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>
306
    <td align="right" valign="top">
307
      <b>Details</b>
308 309
    </td>
    <td valign="top">
310 311 312
      [% INCLUDE global/textarea.html.tmpl
        name    = 'comment'
        minrows = 6
313
        cols    = constants.COMMENT_COLS
314
      %]
315 316 317 318 319 320
      <p>
        Expand on the Summary. Please be
        as specific as possible about what is wrong.
      </p>
      <p>
        <tt>
321 322
          <font color="#990000">Bad example</font>: Mozilla crashed.
          You suck!
323 324 325
        </tt>
        <br>
        <tt>
326 327 328 329
          <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.
330 331 332 333 334 335
        </tt>
      </p>
    </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
336
    <td align="right" valign="top">
337 338 339 340 341
      <b>Reproducibility</b>
    </td>
    <td valign="top">
      <select name="reproducible">
        <option name="AlwaysReproducible" value="Always">
342
          Happens every time.
343 344
        </option>
        <option name="Sometimes" value="Sometimes">
345
          Happens sometimes, but not always.
346 347 348 349 350 351 352 353 354 355 356 357
        </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>
358
    <td align="right" valign="top">
359
      <b>Steps to Reproduce</b>
360 361
    </td>
    <td valign="top">
362 363 364
      [% INCLUDE global/textarea.html.tmpl
        name           = 'reproduce_steps'
        minrows        = 4
365
        cols           = constants.COMMENT_COLS
366 367
        defaultcontent = "1.\n2.\n3."
      %]
368 369 370 371
      <p>
        Describe how to reproduce the problem, step by
        step. Include any special setup steps.
      </p>
372 373 374 375
    </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
376
    <td valign="top" align="right">
377
      <b>Actual Results</b>
378 379
    </td>
    <td valign="top">
380 381 382
      [% INCLUDE global/textarea.html.tmpl
        name    = 'actual_results'
        minrows = 4
383
        cols    = constants.COMMENT_COLS
384
      %]
385 386
      <p>
        What happened after you performed the steps above?
387
      </p>
388 389 390 391
    </td>
  </tr>

  <tr>
392
    <td valign="top" align="right">
393
      <b>Expected Results</b>
394 395
    </td>
    <td valign="top">
396 397 398
      [% INCLUDE global/textarea.html.tmpl
        name    = 'expected_results'
        minrows = 4
399
        cols    = constants.COMMENT_COLS
400
      %]
401
      <p>
402
        What should the software have done instead?
403 404 405 406 407
      </p>
    </td>
  </tr>

  <tr bgcolor="[% tablecolour %]">
408
    <td valign="top" align="right">
409
      <b>Additional Information</b>
410 411
    </td>
    <td valign="top">
412 413 414
      [% INCLUDE global/textarea.html.tmpl
        name    = 'additional_info'
        minrows = 8
415
        cols    = constants.COMMENT_COLS
416
      %]
417 418
      <p>
        Add any additional information you feel may be
419 420
        relevant to this [% terms.bug %], such as the <b>theme</b> you were
        using (does the [% terms.bug %] still occur
421 422
        with the default theme?), a 
        <b><a href="http://kb.mozillazine.org/Quality_Feedback_Agent">Talkback crash ID</a></b>, or special
423 424
        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
425
        testcase</b>, should be added
426
        using the "Add an Attachment" link on the [% terms.bug %], after
427 428 429
        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.
430 431 432
        <br>
        <br>
        If you are reporting a crash, note the module in
433
        which the software crashed (e.g., <tt>Application Violation in
434
        gkhtml.dll</tt>).
435 436 437 438 439
      </p>
    </td>
  </tr>

  <tr>
440
    <td valign="top" align="right">
441 442 443 444 445
      <b>Severity</b>
    </td>
    <td valign="top">
      <select name="bug_severity">
        <option name="critical" value="critical">
446
          Critical: The software crashes, hangs, or causes you to
447 448 449 450 451
          lose data.
        </option>
        <option name="major" value="major">
          Major: A major feature is broken.
        </option>
452
        <option name="normal" value="normal" selected="selected">
453
          Normal: It's [% terms.abug %] that should be fixed.
454 455 456 457 458
        </option>
        <option name="minor" value="minor">
          Minor: Minor loss of function, and there's an easy workaround.
        </option>
        <option name="trivial" value="trivial">
459
          Trivial: A cosmetic problem, such as a misspelled word or
460 461 462 463 464 465
          misaligned text.
        </option>
        <option name="enhancement" value="enhancement">
          Enhancement: Request for new feature or enhancement.
        </option>
      </select>
466 467 468 469
      <p>
        Say how serious the problem is, or if your [% terms.bug %] is a 
        request for a new feature.
      </p>
470 471 472
    </td>
  </tr>
</table>
473 474


475
<h3 id="step3">Step 3 of 3 - submit the [% terms.bug %] report</h3>
476 477

<p>
478
  <input type="submit" id="report" value="    Submit [% terms.Bug %] Report    "
479 480
   onclick="if (this.form.comment.value == '')
   { alert('Please enter some details about this [% terms.bug %].');
481 482 483 484 485 486
     this.form.comment.focus();
     return false; } return true;">
</p>

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

<p>  
  Please be warned
491 492 493
  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
494 495
  complete and easy to understand, and by quickly replying to any questions
  which may arrive by email.
496
</p>
497

498 499 500 501 502 503 504 505 506 507
    </form>

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

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

[% BLOCK select %]
  <select name="[% sel %]">
508 509 510 511 512
    [%- IF default.$sel %]
      <option value="[% default.$sel FILTER html %]" selected="selected">
        [% default.$sel FILTER html -%]
      </option>
    [% END %]
513
    [%- FOREACH x = $sel %]
514 515
      [% NEXT IF x == default.$sel %]
      <option value="[% x FILTER html %]">
516 517 518 519 520
        [% x FILTER html -%]
      </option>
    [%- END %]
  </select>
[% END %]