summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/comment.html.tmpl
blob: 7feb6dfa4c5b72a848a929d4e6d7b651f46fb536 (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
[%# 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.
  #%]

[%# INTERFACE:
  #
  # This template supports the same parameters as global/textarea.html.tmpl
  # with the exception of "name" and "id", which will always be "comment".
  #%]

[% IF feature_enabled('jsonrpc') %]
  <div id="comment_tabs" role="tablist">
    <div id="comment_tab" class="comment_tab active_comment_tab"
          role="tab" aria-selected="true"
          onclick="show_comment_edit()">Comment</div>
    <div id="comment_preview_tab" class="comment_tab"
          role="tab" aria-selected="false"
          onclick="show_comment_preview([% bug.id FILTER none %])">Preview</div>
  </div>
[% END %]

[% INCLUDE global/textarea.html.tmpl
   name = "comment"
   id   = "comment"
%]

[% IF feature_enabled('jsonrpc') %]
  <div id="comment_preview" class="bz_default_hidden bz_comment">
    <div id="comment_preview_loading" class="bz_default_hidden">Generating Preview...</div>
    <div id="comment_preview_error" class="bz_default_hidden"></div>
    <pre id="comment_preview_text" class="bz_comment_text"></pre>
  </div>
[% END %]

[% IF feature_enabled('markdown') AND  user.settings.use_markdown.value == 'on' %]
  <div id="comment_markdown">
    <input type="checkbox" name="use_markdown" id="use_markdown" value="1"
    [% "checked=\"checked\"" IF user.settings.use_markdown.value == 'on' %] >
    <label id="use_markdown_label" for="use_markdown">Use Markdown for this [% terms.comment %]</label>
  </div>
[% END %]