Commit a6750cb0 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 427226: Do not display the requestee field if the flag is not requestable -…

Bug 427226: Do not display the requestee field if the flag is not requestable - Patch by Fré©ric Buclin <LpSolit@gmail.com> r/a=LpSolit (module owner)
parent 75435a80
...@@ -136,16 +136,23 @@ ...@@ -136,16 +136,23 @@
</td> </td>
[% IF any_flags_requesteeble %] [% IF any_flags_requesteeble %]
<td> <td>
[% IF type.is_active && type.is_requesteeble %] [% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %]
<span style="white-space: nowrap;"> <span style="white-space: nowrap;">
[% IF Param('usemenuforusers') %] [% IF Param('usemenuforusers') %]
[% flag_custom_list = flag.type.grant_list %]
[% IF !(type.is_active && type.is_requestable && type.is_requesteeble) %]
[%# We are here only because there was already a requestee. In this case,
the only valid action is to remove the requestee or leave it alone;
nothing else. %]
[% flag_custom_list = [flag.requestee] %]
[% END %]
[% INCLUDE global/userselect.html.tmpl [% INCLUDE global/userselect.html.tmpl
name => "requestee-$flag.id" name => "requestee-$flag.id"
id => "requestee-$flag.id" id => "requestee-$flag.id"
value => flag.requestee.login value => flag.requestee.login
multiple => 0 multiple => 0
emptyok => 1 emptyok => 1
custom_userlist => flag.type.grant_list custom_userlist => flag_custom_list
%] %]
[% ELSE %] [% ELSE %]
(<input type="text" size="30" maxlength="255" (<input type="text" size="30" maxlength="255"
...@@ -189,7 +196,7 @@ ...@@ -189,7 +196,7 @@
</td> </td>
[% IF any_flags_requesteeble %] [% IF any_flags_requesteeble %]
<td> <td>
[% IF type.is_requesteeble %] [% IF type.is_requestable && type.is_requesteeble %]
<span style="white-space: nowrap;"> <span style="white-space: nowrap;">
[% IF Param('usemenuforusers') %] [% IF Param('usemenuforusers') %]
[% INCLUDE global/userselect.html.tmpl [% INCLUDE global/userselect.html.tmpl
...@@ -243,7 +250,7 @@ ...@@ -243,7 +250,7 @@
</td> </td>
[% IF any_flags_requesteeble %] [% IF any_flags_requesteeble %]
<td> <td>
[% IF type.is_requesteeble %] [% IF type.is_requestable && type.is_requesteeble %]
<span style="white-space: nowrap;"> <span style="white-space: nowrap;">
[% IF Param('usemenuforusers') %] [% IF Param('usemenuforusers') %]
[% INCLUDE global/userselect.html.tmpl [% INCLUDE global/userselect.html.tmpl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment