summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-09-20 06:47:49 +0200
committerlpsolit%gmail.com <>2006-09-20 06:47:49 +0200
commitf90a0b775e927aad00631ce80d282186a3022af5 (patch)
tree37b896b80e108ecbb73544a164528521ae7a1288 /template/en
parent0fccdb26ae49bd8bb6022d48b769595e0a328278 (diff)
downloadbugzilla-f90a0b775e927aad00631ce80d282186a3022af5.tar.gz
bugzilla-f90a0b775e927aad00631ce80d282186a3022af5.tar.xz
Bug 348518: grant / reject options for flag listbox should only appear if user is a member of grantgroup - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=myk
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/flag/list.html.tmpl33
1 files changed, 23 insertions, 10 deletions
diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl
index 643547405..463ade125 100644
--- a/template/en/default/flag/list.html.tmpl
+++ b/template/en/default/flag/list.html.tmpl
@@ -104,11 +104,18 @@
<select id="flag-[% flag.id %]" name="flag-[% flag.id %]"
title="[% type.description FILTER html %]"
onchange="toggleRequesteeField(this);">
- <option value="X"></option>
+ [%# Only display statuses the user is allowed to set. %]
[% IF type.is_active %]
- <option value="+" [% "selected" IF flag.status == "+" %]>+</option>
- <option value="-" [% "selected" IF flag.status == "-" %]>-</option>
- [% IF type.is_requestable || flag.status == "?" %]
+ [% IF user.can_request_flag(type) %]
+ <option value="X"></option>
+ [% END %]
+ [% IF user.can_set_flag(type) || flag.status == "+" %]
+ <option value="+" [% "selected" IF flag.status == "+" %]>+</option>
+ [% END %]
+ [% IF user.can_set_flag(type) || flag.status == "-" %]
+ <option value="-" [% "selected" IF flag.status == "-" %]>-</option>
+ [% END %]
+ [% IF (type.is_requestable && user.can_request_flag(type)) || flag.status == "?" %]
<option value="?" [% "selected" IF flag.status == "?" %]>?</option>
[% END %]
[% ELSE %]
@@ -146,11 +153,14 @@
<td>
<select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
title="[% type.description FILTER html %]"
+ [% " disabled=\"disabled\"" UNLESS user.can_request_flag(type) %]
onchange="toggleRequesteeField(this);">
<option value="X"></option>
- <option value="+">+</option>
- <option value="-">-</option>
- [% IF type.is_requestable %]
+ [% IF user.can_set_flag(type) %]
+ <option value="+">+</option>
+ <option value="-">-</option>
+ [% END %]
+ [% IF type.is_requestable && user.can_request_flag(type) %]
<option value="?">?</option>
[% END %]
</select>
@@ -186,11 +196,14 @@
<td>
<select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
title="[% type.description FILTER html %]"
+ [% " disabled=\"disabled\"" UNLESS user.can_request_flag(type) %]
onchange="toggleRequesteeField(this);">
<option value="X"></option>
- <option value="+">+</option>
- <option value="-">-</option>
- [% IF type.is_requestable %]
+ [% IF user.can_set_flag(type) %]
+ <option value="+">+</option>
+ <option value="-">-</option>
+ [% END %]
+ [% IF type.is_requestable && user.can_request_flag(type) %]
<option value="?">?</option>
[% END %]
</select>