From 921e81caf7ffc083ac664459b015d38fc250437d Mon Sep 17 00:00:00 2001 From: Hugo Seabrook Date: Fri, 15 Feb 2013 14:04:00 +0800 Subject: 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 --- template/en/default/bug/comments.html.tmpl | 14 ++++++++------ template/en/default/bug/edit.html.tmpl | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 62beb61ea..d2de3521c 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 3ca5ab4a5..c48b17c08 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -1052,7 +1052,7 @@ : - [% IF user.is_insider %] + [% IF user.is_insider && bug.check_can_change_field('longdesc', 0, 1) %] @@ -1064,14 +1064,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=""%] -- cgit v1.2.3-24-g4f1b