summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template/en/default/bug_modal/new_comment.html.tmpl
blob: 63663b4d56d8faec986b932c242edfa6acc1baad (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
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[%#
  # comment: comment object
  # bug: bug object
  #%]

<div id="add-comment">

  [% IF !bug.check_can_change_field('longdesc', 0, 1) %]
    <div id="new-comment-notice">
      You are not allowed to make an additional comment on this [% terms.bug %].
    </div>
    [% RETURN %]
  [% END %]

  [% IF user.is_insider %]
    <div id="add-comment-private"
      title="Make comment visible only to members of the '[% Param('insidergroup') FILTER html %]' group"
    >
      <input type="checkbox" name="comment_is_private" id="add-comment-private-cb"
          value="1" comment_id="[% comment.count FILTER none %]">
      <label for="add-comment-private-cb">Private</label>
    </div>
  [% END %]

  <ul id="comment-tabs" role="tablist">
    <li id="comment-edit-tab" data-focus="comment" role="tab" tabindex="0" aria-controls="comment-edit-tabpanel" aria-selected="true">
      Add Comment
    </li>
    [%~ ~%]
    <li id="comment-preview-tab" role="tab" tabindex="-1" aria-controls="comment-preview-tabpanel" aria-selected="false">
      Preview
      <img id="preview-throbber" src="extensions/BugModal/web/throbber.gif" width="16" height="11" style="display:none">
    </li>
  </ul>

  <div id="comment-edit-tabpanel" class="comment-tabpanel" role="tabpanel" aria-labelledby="comment-edit-tab">
    <textarea rows="5" cols="80" name="comment" id="comment" aria-labelledby="comment-edit-tab"></textarea>
  </div>
  <div id="comment-preview-tabpanel" class="comment-tabpanel" role="tabpanel" aria-labelledby="comment-preview-tab" style="display:none">
    <pre id="comment-preview" class="comment-text"></pre>
  </div>

  <div id="bugzilla-etiquette">
    <a href="page.cgi?id=etiquette.html" target="_blank" tabindex="-1">
      Comments Subject to Etiquette and Contributor Guidelines</a>
  </div>

  <div id="after-comment-commit-button">
    [% Hook.process("after_comment_commit_button", 'bug/edit.html.tmpl') %]

    [%# this checkboxes are in tables to match the alignment of the
        added-by-extensions checkboxes (needinfo, restrict-comments) %]
    [%
      IF NOT bug.cc || NOT bug.cc.contains(user.login);
        hide_add_self = 0;
      ELSE;
        hide_add_self = 1;
      END;
      IF user.settings.state_addselfcc.value == 'always';
        check_add_self = 1;
      ELSIF user.settings.state_addselfcc.value == 'cc_unless_role';
        check_add_self = !(
            bug.user.isreporter
            || bug.assigned_to.id == user.id
            || (bug.qa_contact && bug.qa_contact.id == user.id)
          );
      ELSE;
        check_add_self = 0;
      END;
    %]
    <table id="add-self-cc-container" [%= 'style="display:none"' IF hide_add_self %]>
      <tr>
        <td>
          <input type="checkbox" name="addselfcc" id="add-self-cc"
            [%= "disabled" IF hide_add_self %]
            [%= "checked" IF check_add_self %]>
        </td>
        <td>
          <label for="add-self-cc">Add me to CC list (follow this [% terms.bug %])</label>
        </td>
      </tr>
    </table>

    <table class="edit-show" style="display:none">
      <tr>
        <td>
          <input type="checkbox" name="bug_ignored" id="bug-ignored"
            [%= "checked" IF user.is_bug_ignored(bug.id) %]>
        </td>
        <td>
          <label for="bug-ignored" title="You will still receive emails for flag requests directed at you">
            Never email me about this [% terms.bug %]
          </label>
        </td>
      </tr>
    </table>
  </div>
</div>