aboutsummaryrefslogtreecommitdiff
blob: 1cdf5e7988a7a226f613c4899b1a84fa9f8c3d82 (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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
[%# 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>
  #                 Vaskin Kissoyan <vkissoyan@yahoo.com>
  #                 Max Kanat-Alexander <mkanat@bugzilla.org>
  #                 Frédéric Buclin <LpSolit@gmail.com>
  #                 Olav Vitters <olav@bkor.dhs.org>
  #%]

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

[% PROCESS "global/field-descs.none.tmpl" %]

[% PROCESS bug/time.html.tmpl %]

  <script type="text/javascript">
  <!--
  
  /* Outputs a link to call replyToComment(); used to reduce HTML output */
  function addReplyLink(id, real_id) {
      /* XXX this should really be updated to use the DOM Core's
       * createElement, but finding a container isn't trivial.
       */
      [% IF user.settings.quote_replies.value != 'off' %]
        document.write('[<a href="#add_comment" onclick="replyToComment(' + 
                       id + ',' + real_id + ');">reply<' + '/a>]');
      [% END %]
  }

  /* Adds the reply text to the `comment' textarea */
  function replyToComment(id, real_id) {
      var prefix = "(In reply to comment #" + id + ")\n";
      var replytext = "";
      [% IF user.settings.quote_replies.value == 'quoted_reply' %]
        /* pre id="comment_name_N" */
        var text_elem = document.getElementById('comment_text_'+id);
        var text = getText(text_elem);

        /* make sure we split on all newlines -- IE or Moz use \r and \n
         * respectively.
         */
        text = text.split(/\r|\n/);

        for (var i=0; i < text.length; i++) {
            replytext += "> " + text[i] + "\n"; 
        }

        replytext = prefix + replytext + "\n";
      [% ELSIF user.settings.quote_replies.value == 'simple_reply' %]
        replytext = prefix;
      [% END %]

    [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %]
      if (document.getElementById('isprivate_' + real_id).checked) {
          document.getElementById('newcommentprivacy').checked = 'checked';
      }
    [% END %]

      /* <textarea id="comment"> */
      var textarea = document.getElementById('comment');
      textarea.value += replytext;

      textarea.focus();
  }

  if (typeof Node == 'undefined') {
      /* MSIE doesn't define Node, so provide a compatibility object */
      window.Node = {
          TEXT_NODE: 3,
          ENTITY_REFERENCE_NODE: 5
      };
  }

  /* Concatenates all text from element's childNodes. This is used
   * instead of innerHTML because we want the actual text (and
   * innerText is non-standard).
   */
  function getText(element) {
      var child, text = "";
      for (var i=0; i < element.childNodes.length; i++) {
          child = element.childNodes[i];
          var type = child.nodeType;
          if (type == Node.TEXT_NODE || type == Node.ENTITY_REFERENCE_NODE) {
              text += child.nodeValue;
          } else {
              /* recurse into nodes of other types */
              text += getText(child);
          }
      }
      return text;
  }

[% IF user.in_group(Param('timetrackinggroup')) %]
  var fRemainingTime = [% bug.remaining_time %]; // holds the original value
  function adjustRemainingTime() {
      // subtracts time spent from remaining time
      var new_time;

      // prevent negative values if work_time > fRemainingTime
      new_time =
          Math.max(fRemainingTime - document.changeform.work_time.value, 0.0);
      // get upto 2 decimal places
      document.changeform.remaining_time.value =
          Math.round(new_time * 100)/100;
  }

  function updateRemainingTime() {
      // if the remaining time is changed manually, update fRemainingTime
      fRemainingTime = document.changeform.remaining_time.value;
  }

[% END %]

  function updateCommentTagControl(checkbox, form) {
      if (checkbox.checked) {
          form.comment.className='bz_private';
      } else {
          form.comment.className='';
      }
  }

  //-->
  </script>

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

  <input type="hidden" name="delta_ts" value="[% bug.delta_ts %]">
  <input type="hidden" name="longdesclength" value="[% bug.longdescs.size %]">
  <input type="hidden" name="id" value="[% bug.bug_id %]">

  [% PROCESS section_title %]
  <table>
    <tr>
      [%# 1st Column %]
      <td id="bz_show_bug_column_1" class="bz_show_bug_column">     
        <table>
          [%# *** ID, product, component, status, resolution, Hardware, and  OS *** %]
          [% PROCESS section_details1 %]
          
          [% PROCESS section_spacer %]
          
          [%# *** severity, priority, version and milestone *** %]
          [% PROCESS section_details2 %]            
          
          [%# *** assigned to and qa contact *** %]
          [% PROCESS section_people %]
          
          [% PROCESS section_spacer %]
          
          [% PROCESS section_url_keyword_whiteboard %]
          
          [% PROCESS section_spacer %]
          
          [%# *** Dependencies *** %]
          [% PROCESS section_dependson_blocks %]
          
        </table>
      </td>
      <td>
        <div class="bz_column_spacer">&nbsp;</div>
      </td>
      [%# 2nd Column %]
      <td id="bz_show_bug_column_2" class="bz_show_bug_column">
        <table cellpadding="3" cellspacing="1">
        [%# *** Reported and modified dates *** %]
         [% PROCESS section_dates %]
         
         [% PROCESS section_cclist %]
         
         [% PROCESS section_spacer %] 
         
         [% PROCESS section_customfields %]
         
         [% PROCESS section_spacer %]
         
         [% PROCESS section_flags %]

        </table>
      </td>
    </tr>
    <tr>
      <td colspan="3">
          <hr id="bz_top_half_spacer">
      </td>
    </tr>
  </table>

  
  [% PROCESS section_restrict_visibility %]
  [% IF user.in_group(Param('timetrackinggroup')) %]
    <br>
    [% PROCESS section_timetracking %]
  [% END %]
  

[%# *** Attachments *** %]

  [% PROCESS attachment/list.html.tmpl
             attachments = bug.attachments
             bugid       = bug.bug_id
             num_attachment_flag_types = bug.num_attachment_flag_types
             show_attachment_flags = bug.show_attachment_flags
   %]


[%# *** Comments Groups *** %]

  <br>
  <table cellpadding="1" cellspacing="1">
    <tr>
      <td>
        [% IF user.id %]
          <label for="comment" accesskey="c"><b>Additional <u>C</u>omments</b></label>:
          [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %]
            <input type="checkbox" name="commentprivacy" value="1"
                   id="newcommentprivacy"
                   onClick="updateCommentTagControl(this, form)">
            <label for="newcommentprivacy">Private</label>
          [% END %]
          <br>
          <a name="add_comment"></a>
          [% INCLUDE global/textarea.html.tmpl
                     name      = 'comment'
                     id        = 'comment'
                     minrows   = 10
                     maxrows   = 25
                     cols      = constants.COMMENT_COLS
          %]
          [% PROCESS bug/knob.html.tmpl %]
        [% ELSE %]
          <fieldset>
            <legend>Note</legend>
            <p>
              You need to
              <a href="show_bug.cgi?id=[% bug.bug_id %]&amp;GoAheadAndLogIn=1">log in</a>
              before you can comment on or make changes to this [% terms.bug %].
            </p>
          </fieldset>
        [% END %]
        [%# *** Additional Comments *** %]
        <hr>
        <div id="comments">
        [% PROCESS bug/comments.html.tmpl
           comments = bug.longdescs
           mode = user.id ? "edit" : "show"
         %]
        </div>
        
      </td>
    </tr>
  </table>
</form>

[% IF use_keywords %]
  [% PROCESS "bug/keyword-chooser.html.tmpl"
    sel_keywords = bug.keywords.split(', ')
  %]
[% END %]

[%############################################################################%]
[%# Block for the Title (alias and short desc)                               #%]
[%############################################################################%]

[% BLOCK section_title %]
  [%# That's the main table, which contains all editable fields. %]
  <div class="bz_alias_short_desc_container">
    
    [% IF Param('useclassification') && bug.classification_id != 1 %]
      <b>[[% bug.classification FILTER html %]]</b>
    [% END %]
     <a href="show_bug.cgi?id=[% bug.bug_id %]">
        <b>[% terms.Bug %]&nbsp;[% bug.bug_id FILTER html %]</b>
     </a> - 
     <span id="summary_alias_container" class="bz_default_hidden"> 
      [% IF Param("usebugaliases") %]
        [% IF bug.alias != "" %]
          (<span id="alias_nonedit_display">[% bug.alias FILTER html %]</span>) 
        [% END %]
      [% END %]
      <span id="short_desc_nonedit_display">[% bug.short_desc FILTER html %]</span>
      [% IF bug.check_can_change_field('short_desc', 0, 1) || 
            bug.check_can_change_field('alias', 0, 1)  %]
        <small class="editme">(<a href="#" id="editme_action">edit</a>)</small>
      [% END %]
     </span>
  
       
    <span id="summary_alias_input">
      <span id="summary">                           
        [% IF Param("usebugaliases") %]
          [% IF bug.check_can_change_field('alias', 0, 1) %]
            <label 
              for="alias" 
              title="a name for the 
                     [% terms.bug %] that can be used in place of its ID number, 
                     [%%] e.g. when adding it to a list of dependencies"
              >Alias</label>:&nbsp;
          [% ELSIF bug.alias %]
            (
          [% END %]
          [% PROCESS input inputname => "alias" 
                     size => "20" 
                     maxlength => "20"  
                     no_td => 1 
                     %][% ") " IF NOT bug.check_can_change_field('alias', 0, 1) 
                                  && bug.alias %]
        [% END %] 
        [%# *** Summary *** %]
          [% IF bug.check_can_change_field('alias', 0, 1) %]
            <label accesskey="s" for="short_desc"><u>S</u>ummary</label>:&nbsp;
          [% END %]
          [% PROCESS input inputname => "short_desc" size => "60" colspan => 2
                           maxlength => 255 spellcheck => "true" no_td => 1 %]
      </span>
    </span>
  </div>
  <script type="text/javascript">
    hideAliasAndSummary('[% bug.short_desc FILTER js %]', '[% bug.alias FILTER js %]');
  </script>
[% END %]

[%############################################################################%]
[%# Block for the first table in the "Details" section                       #%]
[%############################################################################%]

[% BLOCK section_details1 %]

    [%#############%]
    [%#  PRODUCT  #%]
    [%#############%]
    <tr>
      <td class="field_label">
        <label for="product" accesskey="p"><b><u>P</u>roduct</b></label>:
      </td>
      [% PROCESS select selname => "product" %]
    </tr>
    [%###############%]    
    [%#  Component  #%]
    [%###############%]
    <tr>
      <td class="field_label">
        <label for="component" accesskey="m">
          <b><a href="describecomponents.cgi?product=[% bug.product FILTER url_quote %]">
            Co<u>m</u>ponent</a>
          </b>
        </label>:
      </td>
      [% PROCESS select selname => "component" %]
    </tr>
    <tr>
      <td class="field_label">
        <label for="version"><b>Version</b></label>:
      </td>

      [% PROCESS select selname => "version" %]
    </tr>
    [%############%]    
    [%# PLATFORM #%]
    [%############%]    
    <tr>
      <td class="field_label">
        <label for="rep_platform" accesskey="h"><b>Platform</b></label>:
      </td>
      <td>
       [% PROCESS select selname => "rep_platform" no_td=> 1 %]
       [%+ PROCESS select selname => "op_sys" no_td=> 1 %]
       <script type="text/javascript">
         assignToDefaultOnChange(['product', 'component']);
       </script>
      </td>
    </tr>



[% END %]

[%############################################################################%]
[%# Block for the second table in the "Details" section                      #%]
[%############################################################################%]

[% BLOCK section_details2 %]

[%############%]
[%#  STATUS  #%]
[%############%]
    <tr>
      <td class="field_label">
        <b><a href="page.cgi?id=fields.html#status">Status</a></b>:
      </td>
      <td id="bz_field_status">

        [% get_status(bug.bug_status) FILTER html %]&nbsp;&nbsp;
        [% get_resolution(bug.resolution) FILTER html %]
     
        [% IF bug.resolution == "DUPLICATE" %]
          of [% terms.bug %] [%+ "${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %]
        [% END %]
      
      </td>
    </tr>
 [%###############################################################%]
 [%# Importance (priority, severity and votes) #%]
 [%###############################################################%]
    <tr>
      <td class="field_label">
        <label for="priority" accesskey="i"><b><u>I</u>mportance</b></label>:
      </td>
      <td>
        <table>
          <tr>
            [% PROCESS select selname => "priority" %] 
            [% PROCESS select selname = "bug_severity" %]
            [% IF bug.use_votes %]
            <td>
              [% IF bug.votes %] 
                with 
                <a href="votes.cgi?action=show_bug&amp;bug_id=[% bug.bug_id %]">
                  [% bug.votes %] vote[%IF bug.votes > 1 %]s[% END %]
                </a>. 
              [% END %]    
            (<a href="votes.cgi?action=show_user&amp;bug_id=
                      [% bug.bug_id %]#vote_[% bug.bug_id %]">vote</a>)
            </td>
            [% END %]
          </tr>
        </table>
      </td>
    </tr>

    [% IF Param("usetargetmilestone") && bug.target_milestone %]
      <tr>
        <td class="field_label">
          <label for="target_milestone"><b>
            [% IF bug.milestoneurl %]
              <a href="[% bug.milestoneurl FILTER html %]">
            [% END %]
            Target&nbsp;Milestone[% "</a>" IF bug.milestoneurl %]
          [%%]</b></label>:
        </td>
        [% PROCESS select selname = "target_milestone" %]
      </tr>
    [% END %]
  
[% END %]

[%############################################################################%]
[%# Block for the table in the "People" section                              #%]
[%############################################################################%]

[% BLOCK section_people %]

    <tr>
      <td class="field_label">
        <b><a href="page.cgi?id=fields.html#assigned_to">Assigned To</a></b>:
      </td>
      <td>
        [% IF bug.check_can_change_field("assigned_to", 0, 1) %]
          <div id="bz_assignee_edit_container" class="bz_default_hidden">
            <span>
              [% INCLUDE user_identity user=> bug.assigned_to %]
              (<a href="#" id="bz_assignee_edit_action">edit</a>)
            </span>
          </div>
          <div id="bz_assignee_input">
            [% INCLUDE global/userselect.html.tmpl
                 id => "assigned_to"
                 name => "assigned_to"
                 value => bug.assigned_to.login
                 size => 30
            %]
            <br>
            <input type="checkbox" id="set_default_assignee" name="set_default_assignee" value="1">
            <label id="set_default_assignee_label" for="set_default_assignee">Reset Assignee to default</label>
          </div>
          <script type="text/javascript">
           hideEditableField('bz_assignee_edit_container', 
                             'bz_assignee_input', 
                             'bz_assignee_edit_action', 
                             'assigned_to', 
                             '[% bug.assigned_to.login FILTER js %]' );
          </script>
        [% ELSE %]
          <input type="hidden" name="assigned_to" id="assigned_to"
                 value="[% bug.assigned_to.login FILTER html %]">
          [% INCLUDE user_identity user => bug.assigned_to %]
        [% END %]
      </td>
    </tr>

    [% IF Param('useqacontact') %]
    <tr>
      <td class="field_label">
        <label for="qa_contact" accesskey="q"><b><u>Q</u>A Contact</b></label>:
      </td>
      <td>

        [% IF bug.check_can_change_field("qa_contact", 0, 1) %]
          [% IF bug.qa_contact != "" %]
           <div id="bz_qa_contact_edit_container" class="bz_default_hidden">
            <span>
              <span id="bz_qa_contact_edit_display">
              [% INCLUDE user_identity user=> bug.qa_contact %]</span>
              (<a href="#" id="bz_qa_contact_edit_action">edit</a>)
            </span>
          </div>
          [% END %]
          <div id="bz_qa_contact_input">
            [% INCLUDE global/userselect.html.tmpl
                id => "qa_contact"
                name => "qa_contact"
                value => bug.qa_contact.login
                size => 30
                emptyok => 1
            %]
            <br>
            <input type="checkbox" id="set_default_qa_contact" name="set_default_qa_contact" value="1">
            <label for="set_default_qa_contact" id="set_default_qa_contact_label">Reset QA Contact to default</label>
            <script type="text/javascript">
              initAssignedQA();
            </script>
          </div>
          [% IF bug.qa_contact != "" %]
            <script type="text/javascript">
             hideEditableField('bz_qa_contact_edit_container', 
                               'bz_qa_contact_input', 
                               'bz_qa_contact_edit_action', 
                               'qa_contact', 
                               '[% bug.qa_contact.login FILTER js %]');
            </script>
          [% END %]
        [% ELSE %]
          <input type="hidden" name="qa_contact" id="qa_contact"
                 value="[% bug.qa_contact.login FILTER html %]">
          [% INCLUDE user_identity user => bug.qa_contact %]
        [% END %]
      </td>
    </tr>
    [% END %]
     
[% END %]

[% BLOCK section_url_keyword_whiteboard %]
[%# *** URL Whiteboard Keywords *** %]
  <tr>
    <td class="field_label">
      <label for="bug_file_loc" accesskey="u"><b>
        [% IF bug.bug_file_loc 
           AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
          <a href="[% bug.bug_file_loc FILTER html %]"><u>U</u>RL</a>
        [% ELSE %]
          <u>U</u>RL
        [% END %]
      [%%]</b></label>:
    </td>
    <td>
      [% IF bug.check_can_change_field("bug_file_loc", 0, 1) %]
        <span id="bz_url_edit_container" class="bz_default_hidden"> 
        [% IF bug.bug_file_loc 
           AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
           <a href="[% bug.bug_file_loc FILTER html %]" target="_blank">
             [% bug.bug_file_loc FILTER html%]</a>
        [% ELSE %]
          [% bug.bug_file_loc FILTER html %]
        [% END %]
        (<a href="#" id="bz_url_edit_action">edit</a>)</span>
      [% END %]
      <span id="bz_url_input_area">
        [% url_output =  PROCESS input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %]
        [% IF NOT bug.check_can_change_field("bug_file_loc", 0, 1)  %]
          <a href="[% bug.bug_file_loc FILTER html %]">[% url_output FILTER none %]</a>
        [% ELSE %]
          [% url_output FILTER none %]
        [% END %]
      </span>
      [% IF bug.check_can_change_field("bug_file_loc", 0, 1) %]
        <script type="text/javascript">
          hideEditableField('bz_url_edit_container', 
                            'bz_url_input_area', 
                            'bz_url_edit_action', 
                            'bug_file_loc', 
                            "[% bug.bug_file_loc FILTER js %]");
        </script>
      [% END %]
    </td>
  </tr>
  
  [% IF Param('usestatuswhiteboard') %]
    <tr>
      <td class="field_label">
        <label for="status_whiteboard" accesskey="w"><b><u>W</u>hiteboard</b></label>:
      </td>
      [% PROCESS input inputname => "status_whiteboard" size => "40" colspan => 2 %]
    </tr>
  [% END %]
  
  [% IF use_keywords %]
    <tr>
      <td class="field_label">
        <label for="keywords" accesskey="k">
          <b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>:
      </td>
      [% PROCESS input inputname => "keywords" size => 40 colspan => 2
                       value => bug.keywords.join(', ')
                       onfocus => "this.chooser.open()" %]
    </tr>
  [% END %]
[% END %]

[% BLOCK section_dependson_blocks %]
  <tr>
    [% PROCESS dependencies
               dep = { title => "Depends&nbsp;on", fieldname => "dependson" } %]
  </tr>
  
  <tr>
    [% PROCESS dependencies accesskey = "b"
               dep = { title => "<u>B</u>locks", fieldname => "blocked" } %]
  
  <tr>
    <th>&nbsp;</th>
  
    <td colspan="2" align="left" id="show_dependency_tree_or_graph">
      Show dependency <a href="showdependencytree.cgi?id=[% bug.bug_id %]&amp;hide_resolved=1">tree</a>
  
      [% IF Param('webdotbase') %]
        /&nbsp;<a href="showdependencygraph.cgi?id=[% bug.bug_id %]">graph</a>
      [% END %]
    </td>
  </tr>
[% END %]


[%############################################################################%]
[%# Block for Restricting Visibility                                         #%]
[%############################################################################%]

[% BLOCK section_restrict_visibility %]
  [% IF bug.groups.size > 0 %]
  <table>
    <tr>
      <td class="field_label">
        <label id="bz_restrict_group_visibility_label"><b> Restrict Group Visibility</b>:</label>
      </td>
      <td>
        [% inallgroups = 1 %]
        [% inagroup = 0 %]
        [% FOREACH group = bug.groups %]
          [% SET inallgroups = 0 IF NOT group.ingroup %]
          [% SET inagroup = 1 IF group.ison %]
    
          [% IF NOT group.mandatory %]
            [% IF NOT emitted_description %]
              [% emitted_description = 1 %]
              <div id="bz_restrict_group_visibility_help">
                <b>Only users in all of the selected groups can view this [% terms.bug %]:</b>
                <br>
                <font size="-1">
                  (Unchecking all boxes makes this a more public [% terms.bug %].)
                </font>
              </div>
            [% END %]
    
          [% IF group.ingroup %]
            <input type="hidden" name="defined_bit-[% group.bit %]" value="1">
          [% END %]
          <input type="checkbox" value="1"
                 name="bit-[% group.bit %]" id="bit-[% group.bit %]"
                 [% " checked=\"checked\"" IF group.ison %]
                 [% " disabled=\"disabled\"" IF NOT group.ingroup %]>
          <label for="bit-[% group.bit %]">[% group.description FILTER html_light %]</label>
          <br>
          [% END %]
        [% END %]
    
        [% IF NOT inallgroups %]
          <b>
            Only members of a group can change the visibility of [% terms.abug %] for
            that group.
          </b>
        <br>
        [% END %]
      </td>
    </tr>
    [% IF inagroup %]
    <tr>
      <td class="field_label">
        <label id="bz_enable_role_visibility_label"><b>Enable Role Visibility</b>:</label>
      </td>
      <td>
        <div id="bz_enable_role_visibility_help">
          <b>Users in the roles selected below can always view this [% terms.bug %]:</b>
          <br>
          <small>
            (The assignee
            [% IF (Param('useqacontact')) %]
               and QA contact
            [% END %]
            can always see [% terms.abug %], and this section does not take effect unless
            the [% terms.bug %] is restricted to at least one group.)
          </small>
        </div>
        <div>
          <div>
            <input type="hidden" name="defined_reporter_accessible" value="1">
            <input type="checkbox" value="1"
                   name="reporter_accessible" id="reporter_accessible"
                   [% " checked" IF bug.reporter_accessible %]
                   [% " disabled=\"disabled\"" UNLESS bug.check_can_change_field("reporter_accessible", 0, 1) %]>
            <label for="reporter_accessible">Reporter</label>
          </div>
          <div>
            <input type="hidden" name="defined_cclist_accessible" value="1">
            <input type="checkbox" value="1"
                   name="cclist_accessible" id="cclist_accessible"
                   [% " checked" IF bug.cclist_accessible %]
                   [% " disabled=\"disabled\"" UNLESS bug.check_can_change_field("cclist_accessible", 0, 1) %]>
            <label for="cclist_accessible">CC List</label>
          </div>
        </div>
      </td>
    </tr>
    [% END %]
  </table>  
  [% END %]
[% END %]

[%############################################################################%]
[%# Block for Dates                                                          #%]
[%############################################################################%]

[% BLOCK section_dates %]
  <tr>
    <td class="field_label">
      <b>Reported</b>:
    </td>
    <td>
     [% bug.creation_ts FILTER time %] by [% INCLUDE user_identity user => bug.reporter %]
    </td>
  </tr>
  
  <tr>
    <td class="field_label">
      <b> Modified</b>:
    </td>
    <td>
      [% bug.delta_ts FILTER time FILTER replace(':\d\d$', '') FILTER replace(':\d\d ', ' ')%] 
      (<a href="show_activity.cgi?id=[% bug.bug_id %]">[%# terms.Bug %]History</a>)
    </td>
  
  </tr>
[% END %]

[%############################################################################%]
[%# Block for CC LIST                                                        #%]
[%############################################################################%]
[% BLOCK section_cclist %]
  [% IF user.id %]
    <tr>
        <td class="field_label">
          <label for="newcc" accesskey="a"><b>CC List</b>:</label>
        </td>
      <td>
        [% IF user.id %]
          [% IF NOT bug.cc || NOT bug.cc.contains(user.login) %]
            [% has_role = bug.user.isreporter
                          || bug.assigned_to.id == user.id
                          || (Param('useqacontact')
                              && bug.qa_contact
                              && bug.qa_contact.id == user.id) %]
            <input type="checkbox" id="addselfcc" name="addselfcc"
              [% " checked=\"checked\""
                   IF user.settings.state_addselfcc.value == 'always'
                      || (!has_role
                          && user.settings.state_addselfcc.value == 'cc_unless_role') %]>
            <label for="addselfcc">
              Myself ([% INCLUDE user_identity user=> user FILTER collapse %])
            </label>
            <br> 
          [% END %]
        [% END %]
        [% bug.cc.size || 0  FILTER html%]&nbsp;total users
        [% IF user.id %]
          [% IF bug.cc.contains( user.email ) %]
            including you ([% INCLUDE user_identity user=> user FILTER collapse %])
          [% END %]
        [% END %].
        <span id="cc_edit_area_showhide_container" class="bz_default_hidden">
          (<a href="#" id="cc_edit_area_showhide">edit</a>)
        </span>
        <div id="cc_edit_area">
          <div>
            <div>
              <label for="cc">
                <b>Add</b>
              </label>
            </div>
            [% INCLUDE global/userselect.html.tmpl
                id => "newcc"
                name => "newcc"
                value => ""
                size => 30
                multiple => 5
              %]
          </div>
        [% IF bug.cc %]
          <select id="cc" name="cc" multiple="multiple" size="5">
          [% FOREACH c = bug.cc %]
            <option value="[% c FILTER html %]">[% c FILTER html %]</option>
          [% END %]
          </select>
          [% IF user.id %]
            <br>
            <input type="checkbox" id="removecc" name="removecc">
            [%%]<label for="removecc">Remove selected CCs</label>
            <br>
          [% END %]
        [% ELSE %]
          <input type="hidden" name="cc" value="">
        [% END %]
        </div>
        <script type="text/javascript">
          hideEditableField( 'cc_edit_area_showhide_container', 
                             'cc_edit_area', 
                             'cc_edit_area_showhide', 
                             '', 
                             '');  
        </script>
      </td>
    </tr>
  [% END %]
[% END %]

[%############################################################################%]
[%# Block for FLAGS                                                          #%]
[%############################################################################%]

[% BLOCK section_flags %]
  [%# *** Flags *** %]
  [% show_bug_flags = 0 %]
  [% FOREACH type = bug.flag_types %]
    [% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %]
      [% show_bug_flags = 1 %]
      [% LAST %]
    [% END %]
  [% END %]
  [% IF show_bug_flags %]
    <tr>
      <td class="field_label">
        <label><b>Flags:</b></label>
      </td>
      <td></td>
    </tr>
    <tr>
      <td colspan="2">
    [% show_bug_flags = 0 %]
    [% FOREACH type = bug.flag_types %]
      [% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %]
        [% show_bug_flags = 1 %]
        [% LAST %]
      [% END %]
    [% END %]
    [% IF show_bug_flags %]
    
      [% IF user.id %]
        [% IF bug.flag_types.size > 0 %]
          [% PROCESS "flag/list.html.tmpl" flag_no_header = 1
                                           flag_types = bug.flag_types
                                           any_flags_requesteeble = bug.any_flags_requesteeble %]
        [% END %]
      [% ELSE %]
        [% FOREACH type = bug.flag_types %]
          [% FOREACH flag = type.flags %]
              [% flag.setter.nick FILTER html %]:
              [%+ type.name FILTER html FILTER no_break %][% flag.status %]
              [%+ IF flag.requestee %]
                ([% flag.requestee.nick FILTER html %])
              [% END %]<br>
          [% END %]
        [% END %]
      [% END %]         
    [% END %]
      </td>
    </tr>
  [% END %]
[% END %]

[%############################################################################%]
[%# Block for Section Spacer                                                 #%]
[%############################################################################%]

[% BLOCK section_customfields %]
[%# *** Custom Fields *** %]

  [% USE Bugzilla %]
  [% FOREACH field = Bugzilla.active_custom_fields %]
    <tr>
      [% PROCESS bug/field.html.tmpl value=bug.${field.name}
                                     editable = bug.check_can_change_field(field.name, 0, 1)
                                     value_span = 2 %]
    </tr>
  [% END %]
[% END %]

[%############################################################################%]
[%# Block for Section Spacer                                                 #%]
[%############################################################################%]

[% BLOCK section_spacer %]
  <tr>
    <td colspan="2" class="bz_section_spacer"></td>
  </tr>
[% END %]




[%############################################################################%]
[%# Block for dependencies                                                   #%]
[%############################################################################%]

[% BLOCK dependencies %]

  <th class="field_label">
    <label for="[% dep.fieldname %]"[% " accesskey=\"$accesskey\"" IF accesskey %]>
    [% dep.title %]</label>:
  </th>
  <td>    
    <span id="[% dep.fieldname %]_input_area">
      [% IF bug.check_can_change_field(dep.fieldname, 0, 1) %]
        <input name="[% dep.fieldname %]" id="[% dep.fieldname %]"
               value="[% bug.${dep.fieldname}.join(', ') %]">
      [% ELSE %]
        <input type="hidden" id="[% dep.fieldname %]" name="[% dep.fieldname %]"
               value="[% bug.${dep.fieldname}.join(', ') %]">
      [% END %]
    </span>
    
    [% FOREACH depbug = bug.${dep.fieldname} %]
      [% depbug FILTER bug_link(depbug) FILTER none %][% " " %]
    [% END %]
    [% IF bug.check_can_change_field(dep.fieldname, 0, 1) %]
      <span id="[% dep.fieldname %]_edit_container" class="edit_me bz_default_hidden" >
        (<a href="#" id="[% dep.fieldname %]_edit_action">edit</a>)
      </span>
      <script type="text/javascript">
        hideEditableField('[% dep.fieldname %]_edit_container', 
                          '[% dep.fieldname %]_input_area', 
                          '[% dep.fieldname %]_edit_action', 
                          '[% dep.fieldname %]', 
                          "[% bug.${dep.fieldname}.join(', ') %]");
      </script>
    [% END %]
  </td>
  
  [% accesskey = undef %]
  
[% END %]

[%############################################################################%]
[%# Block for Time Tracking Group                                            #%]
[%############################################################################%]

[% BLOCK section_timetracking %]
  <table class="bz_time_tracking_table">
    <tr>
      <th>
        <label for="estimated_time">Orig. Est.</label>
      </th>
      <th>
        Current Est.
      </th>
      <th>
        <label for="work_time">Hours Worked</label>
      </th>
      <th>
        <label for="remaining_time">Hours Left</label>
      </th>
      <th>
        %Complete
      </th>
      <th>
        Gain
      </th>
      <th>
        <label for="deadline">Deadline</label>
      </th>
    </tr>
    <tr>
      <td>
        <input name="estimated_time" id="estimated_time"
               value="[% PROCESS formattimeunit
                                 time_unit=bug.estimated_time %]"
               size="6" maxlength="6">
      </td>
      <td>
        [% PROCESS formattimeunit
                   time_unit=(bug.actual_time + bug.remaining_time) %]
      </td>
      <td>
        [% PROCESS formattimeunit time_unit=bug.actual_time %] +
        <input name="work_time" id="work_time"
               value="0" size="3" maxlength="6"
               onchange="adjustRemainingTime();">
      </td>
      <td>
        <input name="remaining_time" id="remaining_time"
               value="[% PROCESS formattimeunit
                                 time_unit=bug.remaining_time %]"
               size="6" maxlength="6" onchange="updateRemainingTime();">
      </td>
      <td>
        [% PROCESS calculatepercentage act=bug.actual_time
                                       rem=bug.remaining_time %]
      </td>
      <td>
        [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %]
      </td>
       <td>
         <input name="deadline" id="deadline" value="[% bug.deadline %]"
                size="10" maxlength="10"><br />
         <small>(YYYY-MM-DD)</small>
      </td>        
    </tr>
    <tr>
      <td colspan="7" class="bz_summarize_time">
        <a href="summarize_time.cgi?id=[% bug.bug_id %]&amp;do_depends=1">
        Summarize time (including time for [% terms.bugs %]
        blocking this [% terms.bug %])</a>
      </td>
    </tr>
  </table> 
[% END %]

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

[% BLOCK select %]
  [% IF NOT no_td %]
  <td>
  [% END %]
    [% IF bug.check_can_change_field(selname, 0, 1) AND bug.choices.${selname}.size > 1 %]
      <select id="[% selname %]" name="[% selname %]">
        [% FOREACH x = bug.choices.${selname} %]
          <option value="[% x FILTER html %]"
            [% " selected" IF x == bug.${selname} %]>[% x FILTER html %]
          </option>
        [% END %]
      </select>
    [% ELSE %]
      <input type="hidden" id="[% selname %]" name="[% selname %]" value="[% bug.${selname} FILTER html %]">
      [% bug.${selname} FILTER html %]
    [% END %]
  [% IF NOT no_td %]
  </td>
  [% END %]
  [% no_td = 0 %]
[% END %]

[%############################################################################%]
[%# Block for INPUT fields                                                   #%]
[%############################################################################%]

[% BLOCK input %]
  [% IF no_td != 1 %]
  <td[% " colspan=\"$colspan\"" IF colspan %]>
  [% END %]
    [% val = value ? value : bug.$inputname %]
    [% IF bug.check_can_change_field(inputname, 0, 1) %]
       <input id="[% inputname %]" name="[% inputname %]"
              value="[% val FILTER html %]"[% " size=\"$size\"" IF size %]
              [% " maxlength=\"$maxlength\"" IF maxlength %]
              [% " onfocus=\"$onfocus\"" IF onfocus %]
              [% " spellcheck=\"$spellcheck\"" IF spellcheck %]>
    [% ELSE %]
       <input type="hidden" name="[% inputname %]" id="[% inputname %]"
              value="[% val FILTER html %]">
      [% IF size && val.length > size %]
        <span title="[% val FILTER html %]">
          [% val FILTER truncate(size) FILTER html %]
        </span>
      [% ELSE %]
        [% val FILTER html %]
      [% END %]
    [% END %]
  [% IF no_td != 1 %]  
  </td>
  [% END %]
  [% no_td = 0 %]
  [% maxlength = 0 %]
  [% colspan = 0 %]
  [% size = 0 %]
  [% value = undef %]
  [% onfocus = undef %]
  [% spellcheck = undef %]
[% END %]

[%############################################################################%]
[%# Block for user identities. Wraps the information inside of an hCard.     #%]
[%############################################################################%]

[% BLOCK user_identity %]
  <span class="vcard">
    [% FILTER collapse %]
      [% IF user.name %]
        <a class="email" href="mailto:[% user.email FILTER html %]" 
           title="[% user.email FILTER html %]"
          ><span class="fn">[% user.name FILTER html %]</span
        ></a>
      [% ELSE %]
        <a class="fn email" href="mailto:[% user.email FILTER html %]">
          [% user.email FILTER html %]</a>
      [% END %]
    [% END %]</span>
[% END %]