summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-02-13 17:23:29 +0100
committerByron Jones <bjones@mozilla.com>2013-02-13 17:23:29 +0100
commit8076cbac92c228d086e84ebedef01dfff106cd62 (patch)
tree5c0661e1e874ad9386fd897e01ab58f4d58ee7c1 /extensions/BMO/template/en
parent6beadee1270482d38ec4b500340af1b28df9b165 (diff)
downloadbugzilla-8076cbac92c228d086e84ebedef01dfff106cd62.tar.gz
bugzilla-8076cbac92c228d086e84ebedef01dfff106cd62.tar.xz
Bug 690833: Add the ability to restrict who can add comments to a bug report
Diffstat (limited to 'extensions/BMO/template/en')
-rw-r--r--extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl112
1 files changed, 63 insertions, 49 deletions
diff --git a/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl b/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl
index de97706b0..f72267246 100644
--- a/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl
@@ -41,29 +41,36 @@
<label>Project Flags:</label>
</td>
<td>
- <table id="project-flags">
- [% FOREACH field = project_flags %]
- [% NEXT IF NOT user.id AND field.value == "---" %]
- <tr id="row_[% field.name FILTER js %]">
- <td>&nbsp;</td>
- <td>
- <label for="[% field.name FILTER html %]">
- [% field_descs.${field.name} FILTER html %]:
- </label>
- </td>
- <td>
- [% PROCESS bug/field.html.tmpl value = bug.${field.name}
- editable = user.id
- no_tds = 1 %]
- [% IF user.id %]
- <span id="ro_[% field.name FILTER html %]" class="bz_hidden">
- [% bug.${field.name} FILTER html %]
- </span>
- [% END %]
- </td>
- </tr>
+ [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %]
+ <table id="project-flags">
+ [% FOREACH field = project_flags %]
+ [% NEXT IF NOT user.id AND field.value == "---" %]
+ <tr id="row_[% field.name FILTER js %]">
+ <td>&nbsp;</td>
+ <td>
+ <label for="[% field.name FILTER html %]">
+ [% field_descs.${field.name} FILTER html %]:
+ </label>
+ </td>
+ <td>
+ [% PROCESS bug/field.html.tmpl value = bug.${field.name}
+ editable = user.id
+ no_tds = 1 %]
+ [% IF user.id %]
+ <span id="ro_[% field.name FILTER html %]" class="bz_hidden">
+ [% bug.${field.name} FILTER html %]
+ </span>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ </table>
+ [% ELSE %]
+ [% FOREACH field = project_flags %]
+ [% NEXT IF bug.${field.name} == "---" %]
+ [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]<br>
+ [% END %]
[% END %]
- </table>
</td>
</tr>
[% END %]
@@ -74,34 +81,41 @@
<label>Tracking Flags:</label>
</td>
<td>
- [% IF user.id %]
- <span id="edit_tracking_fields_action">
- (<a onclick="bmo_show_tracking_flags()" href="javascript:void(0)">edit</a>)
- </span>
+ [% IF bug.check_can_change_field('flagtypes.name', 0, 1) %]
+ [% IF user.id %]
+ <span id="edit_tracking_fields_action">
+ (<a onclick="bmo_show_tracking_flags()" href="javascript:void(0)">edit</a>)
+ </span>
+ [% END %]
+ <table id="custom-flags">
+ [% FOREACH field = tracking_flags %]
+ [% NEXT IF NOT user.id AND field.value == "---" %]
+ <tr id="row_[% field.name FILTER js %]">
+ <td>&nbsp;</td>
+ <td>
+ <label for="[% field.name FILTER html %]">
+ [% field_descs.${field.name} FILTER html %]:
+ </label>
+ </td>
+ <td>
+ [% PROCESS bug/field.html.tmpl value = bug.${field.name}
+ editable = user.id
+ no_tds = 1 %]
+ [% IF user.id %]
+ <span id="ro_[% field.name FILTER html %]" class="bz_hidden">
+ [% bug.${field.name} FILTER html %]
+ </span>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ </table>
+ [% ELSE %]
+ [% FOREACH field = tracking_flags %]
+ [% NEXT IF bug.${field.name} == "---" %]
+ [% field_descs.${field.name} FILTER html %]: [% bug.${field.name} FILTER html %]<br>
+ [% END %]
[% END %]
- <table id="custom-flags">
- [% FOREACH field = tracking_flags %]
- [% NEXT IF NOT user.id AND field.value == "---" %]
- <tr id="row_[% field.name FILTER js %]">
- <td>&nbsp;</td>
- <td>
- <label for="[% field.name FILTER html %]">
- [% field_descs.${field.name} FILTER html %]:
- </label>
- </td>
- <td>
- [% PROCESS bug/field.html.tmpl value = bug.${field.name}
- editable = user.id
- no_tds = 1 %]
- [% IF user.id %]
- <span id="ro_[% field.name FILTER html %]" class="bz_hidden">
- [% bug.${field.name} FILTER html %]
- </span>
- [% END %]
- </td>
- </tr>
- [% END %]
- </table>
</td>
</tr>
<script type="text/javascript">