From 8076cbac92c228d086e84ebedef01dfff106cd62 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 14 Feb 2013 00:23:29 +0800 Subject: Bug 690833: Add the ability to restrict who can add comments to a bug report --- template/en/default/bug/comments.html.tmpl | 14 ++++++++------ template/en/default/bug/edit.html.tmpl | 29 +++++++++++++++++++---------- 2 files changed, 27 insertions(+), 16 deletions(-) (limited to 'template/en/default/bug') diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 23f024ae1..a876fb081 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -170,18 +170,20 @@ [wrap] [% END %] - [reply] + [% IF bug.check_can_change_field('longdesc', 1, 0) %] + [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 52e5865b8..d57d9641c 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -903,7 +903,7 @@ flag_types = bug.flag_types any_flags_requesteeble = bug.any_flags_requesteeble %] [% END %] - [% IF show_more_flags %] + [% IF show_more_flags && bug.check_can_change_field('flagtypes.name', 0, 1) %] [% IF !bug_flags_set %]None yet set[% END %] ([% IF !bug_flags_set %]set[% ELSE %]more[% END %] flags) @@ -1090,7 +1090,7 @@ : - [% IF user.is_insider %] + [% IF user.is_insider && bug.check_can_change_field('longdesc', 0, 1) %] @@ -1102,14 +1102,23 @@
- [% 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 %] +
+
+ Note + You are unable to make an additional comment on this [% terms.bug %]. +
+
+ [% END %]
[% PROCESS commit_button id=""%] -- cgit v1.2.3-24-g4f1b