From adceb1cda6441d2969ed5a3d6d45add6f33c6df7 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 13 Feb 2014 13:45:42 +0800 Subject: Bug 40896: Bugzilla needs a "preview" mode for comments r=gerv, a=justdave --- template/en/default/bug/comment.html.tmpl | 36 +++++++++++++++++++++++++ template/en/default/bug/create/create.html.tmpl | 4 +-- template/en/default/bug/edit.html.tmpl | 4 +-- 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 template/en/default/bug/comment.html.tmpl (limited to 'template/en/default/bug') diff --git a/template/en/default/bug/comment.html.tmpl b/template/en/default/bug/comment.html.tmpl new file mode 100644 index 000000000..1d8cf0b30 --- /dev/null +++ b/template/en/default/bug/comment.html.tmpl @@ -0,0 +1,36 @@ +[%# 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') %] +
+
Comment
+
Preview
+
+[% END %] + +[% INCLUDE global/textarea.html.tmpl + name = "comment" + id = "comment" +%] +
+ +[% IF feature_enabled('jsonrpc') %] +
+
Generating Preview...
+
+

+  
+[% END %] diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 6adf75102..d372c4d08 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -542,9 +542,7 @@ TUI_hide_default('attachment_text_field'); # by global/textarea.html.tmpl. So we must not escape the comment here. %] [% comment FILTER none %] [%- END %] - [% INCLUDE global/textarea.html.tmpl - name = 'comment' - id = 'comment' + [% INCLUDE bug/comment.html.tmpl minrows = 10 maxrows = 25 cols = constants.COMMENT_COLS diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 3b93ebe2b..89b78bc9f 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -1110,9 +1110,7 @@
[% IF bug.check_can_change_field('longdesc', 0, 1) %] - [% INCLUDE global/textarea.html.tmpl - name = 'comment' - id = 'comment' + [% INCLUDE bug/comment.html.tmpl minrows = 10 maxrows = 25 cols = constants.COMMENT_COLS -- cgit v1.2.1