22
22
<script type="text/javascript">
24
var stored_onload = window.onload;
25
24
// Enables or disables a requestee field depending on whether or not
26
25
// the user is requesting the corresponding flag.
27
function toggleRequesteeField(flagField)
26
function toggleRequesteeField(flagField, no_focus)
29
28
// Convert the ID of the flag field into the ID of its corresponding
30
29
// requestee field and then use the ID to get the field.
76
72
# on a single bug/attachment).
84
[% IF any_flags_requesteeble %]
75
[% DEFAULT flag_table_id = "flags" %]
77
<table id="[% flag_table_id FILTER html %]">
78
[% UNLESS flag_no_header %]
83
[% IF any_flags_requesteeble %]
91
91
[%# Step 1: Display every flag type (except inactive types with no flags). %]
92
92
[% FOREACH type = flag_types %]
98
98
[% flag.setter.nick FILTER html %]:
101
<label title="[% type.description FILTER html %]">
102
[%- type.name FILTER html FILTER no_break %]</label>
101
<label title="[% type.description FILTER html %]"
102
for="flag-[% flag.id %]">
103
[%- type.name FILTER html FILTER no_break -%]</label>
105
106
<select id="flag-[% flag.id %]" name="flag-[% flag.id %]"
106
107
title="[% type.description FILTER html %]"
107
onchange="toggleRequesteeField(this);">
108
<option value="X"></option>
108
onchange="toggleRequesteeField(this);"
110
[%# Only display statuses the user is allowed to set. %]
111
[% IF user.can_request_flag(type) %]
112
<option value="X"></option>
109
114
[% IF type.is_active %]
110
<option value="+" [% "selected" IF flag.status == "+" %]>+</option>
111
<option value="-" [% "selected" IF flag.status == "-" %]>-</option>
112
[% IF type.is_requestable || flag.status == "?" %]
115
[% IF (type.is_requestable && user.can_request_flag(type)) || flag.status == "?" %]
113
116
<option value="?" [% "selected" IF flag.status == "?" %]>?</option>
118
[% IF user.can_set_flag(type) || flag.status == "+" %]
119
<option value="+" [% "selected" IF flag.status == "+" %]>+</option>
121
[% IF user.can_set_flag(type) || flag.status == "-" %]
122
<option value="-" [% "selected" IF flag.status == "-" %]>-</option>
116
125
<option value="[% flag.status %]" selected="selected">[% flag.status %]</option>
120
129
[% IF any_flags_requesteeble %]
122
[% IF type.is_active && type.is_requesteeble %]
131
[% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %]
123
132
<span style="white-space: nowrap;">
124
133
(<input type="text" size="30" maxlength="255"
125
134
id="requestee-[% flag.id %]"
143
<label title="[% type.description FILTER html %]">
152
<label title="[% type.description FILTER html %]"
153
for="flag_type-[% type.id %]">
144
154
[%- type.name FILTER html FILTER no_break %]</label>
147
157
<select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
148
158
title="[% type.description FILTER html %]"
149
onchange="toggleRequesteeField(this);">
159
[% " disabled=\"disabled\"" UNLESS user.can_request_flag(type) %]
160
onchange="toggleRequesteeField(this);"
150
162
<option value="X"></option>
151
<option value="+">+</option>
152
<option value="-">-</option>
153
[% IF type.is_requestable %]
163
[% IF type.is_requestable && user.can_request_flag(type) %]
154
164
<option value="?">?</option>
166
[% IF user.can_set_flag(type) %]
167
<option value="+">+</option>
168
<option value="-">-</option>
158
172
[% IF any_flags_requesteeble %]
160
[% IF type.is_requesteeble %]
174
[% IF type.is_requestable && type.is_requesteeble %]
161
175
<span style="white-space: nowrap;">
162
176
(<input type="text" size="30" maxlength="255"
163
177
id="requestee_type-[% type.id %]"
182
addl. <label title="[% type.description FILTER html %]">
196
addl. <label title="[% type.description FILTER html %]"
197
for="flag_type-[% type.id %]">
183
198
[%- type.name FILTER html FILTER no_break %]</label>
186
201
<select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
187
202
title="[% type.description FILTER html %]"
188
onchange="toggleRequesteeField(this);">
203
[% " disabled=\"disabled\"" UNLESS user.can_request_flag(type) %]
204
onchange="toggleRequesteeField(this);"
189
206
<option value="X"></option>
190
<option value="+">+</option>
191
<option value="-">-</option>
192
[% IF type.is_requestable %]
207
[% IF type.is_requestable && user.can_request_flag(type) %]
193
208
<option value="?">?</option>
210
[% IF user.can_set_flag(type) %]
211
<option value="+">+</option>
212
<option value="-">-</option>
197
216
[% IF any_flags_requesteeble %]
199
[% IF type.is_requesteeble %]
218
[% IF type.is_requestable && type.is_requesteeble %]
200
219
<span style="white-space: nowrap;">
201
220
(<input type="text" size="30" maxlength="255"
202
221
id="requestee_type-[% type.id %]"