summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/field.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/bug/field.html.tmpl')
-rw-r--r--template/en/default/bug/field.html.tmpl27
1 files changed, 26 insertions, 1 deletions
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index 58f1b0ccc..2447a240e 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -97,6 +97,7 @@
</script>
[% CASE [ constants.FIELD_TYPE_SINGLE_SELECT
constants.FIELD_TYPE_MULTI_SELECT ] %]
+ <input type="hidden" id="[% field.name FILTER html %]_dirty">
<select id="[% field.name FILTER html %]"
name="[% field.name FILTER html %]"
[% IF field.type == constants.FIELD_TYPE_MULTI_SELECT %]
@@ -121,6 +122,30 @@
[% END %]
[% FOREACH legal_value = legal_values %]
[% NEXT IF NOT legal_value.is_active AND NOT value.contains(legal_value.name).size %]
+
+ [%# Purpose: hide field values from those who can't change them %]
+ [% IF field.name.match("^cf_blocking_") OR
+ field.name.match("^cf_status_") OR
+ field.name.match("^cf_tracking_") OR
+ field.name == "resolution" %]
+ [% NEXT UNLESS bug.check_can_change_field(field.name, '---', legal_value.name) OR
+ value.contains(legal_value.name).size %]
+ [% END %]
+
+ [% IF field.name == "resolution" &&
+ legal_value.name != bug.resolution %]
+ [% r = legal_value.name %]
+ [% IF bug.user.canconfirm &&
+ !(bug.user.canedit || bug.user.isreporter) %]
+ [% NEXT IF r != "WORKSFORME" && r != "INCOMPLETE" %]
+ [% END %]
+ [% IF bug.user.isreporter &&
+ !(bug.user.canconfirm || bug.user.canedit) %]
+ [% NEXT IF r == "INCOMPLETE" %]
+ [% END %]
+ [% NEXT IF r == "EXPIRED" %]
+ [% END %]
+
<option value="[% legal_value.name FILTER html %]"
id="v[% legal_value.id FILTER html %]_
[%- field.name FILTER html %]"
@@ -177,7 +202,7 @@
</span>
<div id="container_[% field.name FILTER html %]">
<label for="[% field.name FILTER html %]">
- <strong>Add [% terms.Bug %] URLs:</strong>
+ Add [% terms.Bug %] URLs:
</label><br>
<input type="text" id="[% field.name FILTER html %]" size="40"
class="text_input" name="[% field.name FILTER html %]">