From: Hugo Seabrook Date: Fri, 15 Feb 2013 06:05:11 +0000 (+0800) Subject: Bug 830333: Make the comment box hidden if bug_check_can_change_field reports the... X-Git-Tag: bugzilla-4.4rc2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a42f528a9b108a4b37df107bdf19a4ac595f2c43;p=thirdparty%2Fbugzilla.git Bug 830333: Make the comment box hidden if bug_check_can_change_field reports the user is unable to comment on the bug r=glob, a=LpSolit --- diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 62beb61ea1..d2de3521c9 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -141,18 +141,20 @@ [% IF mode == "edit" %] - [reply] + [% IF bug.check_can_change_field('longdesc', 0, 1) %] + [reply] + [% END %] [% END %] - [% IF mode == "edit" && user.is_insider %] + [% IF mode == "edit" && user.is_insider && bug.check_can_change_field('longdesc', 0, 1) %]
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 8aa713a7a5..be7e2f0bda 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -1047,7 +1047,7 @@ : - [% IF user.is_insider %] + [% IF user.is_insider && bug.check_can_change_field('longdesc', 0, 1) %] @@ -1059,14 +1059,18 @@
- [% INCLUDE global/textarea.html.tmpl - name = 'comment' - id = 'comment' - minrows = 10 - maxrows = 25 - cols = constants.COMMENT_COLS - %] - [% Hook.process("after_comment_textarea", 'bug/edit.html.tmpl') %] + [% IF bug.check_can_change_field('longdesc', 0, 1) %] + [% INCLUDE global/textarea.html.tmpl + name = 'comment' + id = 'comment' + minrows = 10 + maxrows = 25 + cols = constants.COMMENT_COLS + %] + [% Hook.process("after_comment_textarea", 'bug/edit.html.tmpl') %] + [% ELSE %] + You are not allowed to make an additional comment on this [% terms.bug %]. + [% END %]
[% PROCESS commit_button id=""%]