Bug 91840 - Remove userselect-combobox template, make hint multiple in CC
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1491 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
f733e64de2
commit
bf00607d6a
|
@ -1,47 +0,0 @@
|
|||
[%# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Bug Tracking System.
|
||||
#
|
||||
# Contributor(s): Byron Jones <bugzilla@glob.com.au>
|
||||
# Frédéric Buclin <LpSolit@gmail.com>
|
||||
#%]
|
||||
|
||||
[%# INTERFACE:
|
||||
# name: mandatory; field name
|
||||
# id: optional; field id
|
||||
# value: optional; default field value/selection
|
||||
# onchange: optional; onchange attribute value
|
||||
# disabled: optional; if true, the field is disabled
|
||||
# accesskey: optional, input only; accesskey attribute value
|
||||
# emptyok: optional, select only; if true, prepend menu option to start of select
|
||||
# multiple: optional, do multiselect
|
||||
# custom_userlist: optional, specify a limited list of users to use
|
||||
#%]
|
||||
|
||||
[% SET id="userselect_" _ name IF !id %]
|
||||
[% SET emptyok=emptyok ? 1 : 0 %]
|
||||
[% SET custom_userlist=user.get_userlist UNLESS custom_userlist %]
|
||||
<input
|
||||
name="[% name | html %]"
|
||||
value="[% value | html %]"
|
||||
size="40"
|
||||
autocomplete="off"
|
||||
[% IF disabled %] disabled="[% disabled | html %]" [% END %]
|
||||
[% IF accesskey %] accesskey="[% accesskey | html %]" [% END %]
|
||||
id="[% id | html %]" />
|
||||
<script language="JavaScript">
|
||||
addListener(window, 'load', function() {
|
||||
var emptyOptions = [% json(custom_userlist) %];
|
||||
new SimpleAutocomplete("[% id | js %]",
|
||||
function(h) { userAutocomplete(h, emptyOptions); },
|
||||
[% multiple ? '","' : 'null' %], null, null, null, true);
|
||||
});
|
||||
</script>
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
[%# Step 1: Display every flag type (except inactive types with no flags). %]
|
||||
[% FOREACH type = flag_types %]
|
||||
|
||||
|
||||
[%# Step 1: Display existing flag(s). %]
|
||||
[% FOREACH flag = type.flags %]
|
||||
<tr>
|
||||
|
@ -70,14 +70,13 @@
|
|||
<td>
|
||||
[% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %]
|
||||
<span style="white-space: nowrap;">
|
||||
[% INCLUDE "global/userselect-combobox.html.tmpl"
|
||||
name => "requestee-$flag.id"
|
||||
id => "requestee-$flag.id"
|
||||
value => flag.requestee.login
|
||||
emptyok => 1
|
||||
usemenuforusers => flag.custom_list
|
||||
custom_userlist => flag.custom_list && flag.custom_list.ready_list
|
||||
allow_other_user => flag.allow_other
|
||||
[% INCLUDE "global/userselect.html.tmpl"
|
||||
name => "requestee-$flag.id"
|
||||
size => 40
|
||||
id => "requestee-$flag.id"
|
||||
value => flag.requestee.login
|
||||
emptyok => 1
|
||||
custom_userlist => flag.custom_list && flag.custom_list.ready_list
|
||||
%]
|
||||
</span>
|
||||
[% END %]
|
||||
|
@ -139,15 +138,14 @@
|
|||
<td>
|
||||
[% IF type.is_requestable && type.is_requesteeble %]
|
||||
<span style="white-space: nowrap;">
|
||||
[% INCLUDE "global/userselect-combobox.html.tmpl"
|
||||
name => "requestee_type-$type.id"
|
||||
id => "requestee_type-$type.id"
|
||||
value => type.default_requestee
|
||||
multiple => type.is_multiplicable
|
||||
emptyok => !type.is_multiplicable
|
||||
usemenuforusers => type.custom_list
|
||||
custom_userlist => type.custom_list && type.custom_list.ready_list
|
||||
allow_other_user => type.allow_other
|
||||
[% INCLUDE "global/userselect.html.tmpl"
|
||||
name => "requestee_type-$type.id"
|
||||
id => "requestee_type-$type.id"
|
||||
size => 40
|
||||
value => type.default_requestee
|
||||
multiple => type.is_multiplicable
|
||||
emptyok => !type.is_multiplicable
|
||||
custom_userlist => type.custom_list && type.custom_list.ready_list
|
||||
%]
|
||||
</span>
|
||||
[% END %]
|
||||
|
|
|
@ -38,14 +38,13 @@
|
|||
[% IF multiple %] multiple="multiple" size="[% multiple FILTER html %]" [% END %]
|
||||
>
|
||||
[% IF emptyok %]<option value=""></option>[% END %]
|
||||
[% SET custom_userlist = user.get_userlist UNLESS custom_userlist %]
|
||||
|
||||
[% SET selected = {} %]
|
||||
[% IF value.defined %]
|
||||
[% SET selected.$selected_value = 1 FOREACH selected_value IN value.split(', ') %]
|
||||
[% END %]
|
||||
|
||||
[% FOREACH tmpuser = custom_userlist %]
|
||||
[% FOREACH tmpuser = user.get_userlist %]
|
||||
[% IF tmpuser.visible OR selected.${tmpuser.login} == 1 %]
|
||||
<option value="[% tmpuser.login FILTER html %]"
|
||||
[% IF selected.${tmpuser.login} == 1 %]
|
||||
|
@ -64,8 +63,10 @@
|
|||
[% END %]
|
||||
</select>
|
||||
[% ELSE %]
|
||||
[% id = id || name %]
|
||||
<input
|
||||
name="[% name FILTER html %]"
|
||||
id="[% id FILTER html %]"
|
||||
value="[% value FILTER html %]"
|
||||
autocomplete="off"
|
||||
[% IF tabindex %] tabindex="[% tabindex FILTER html %]" [% END %]
|
||||
|
@ -73,12 +74,14 @@
|
|||
[% IF disabled %] disabled="[% disabled FILTER html %]" [% END %]
|
||||
[% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
|
||||
[% IF size %] size="[% size FILTER html %]" [% END %]
|
||||
[% IF id %] id="[% id FILTER html %]" [% ELSE %] id="[% name | html %]"[% END %]
|
||||
/>
|
||||
<script language="JavaScript">
|
||||
addListener(window, 'load', function() {
|
||||
[%# FIXME: remove hardcoded i18n message, also from js/field.js::userAutocomplete() %]
|
||||
new SimpleAutocomplete("[% (id || name) | js %]", userAutocomplete, null, null, null, 'No users found', true);
|
||||
[%-# FIXME: remove hardcoded i18n message, also from js/field.js::userAutocomplete() %]
|
||||
var emptyOptions = [% custom_userlist ? json(custom_userlist) : "null" %];
|
||||
new SimpleAutocomplete("[% id | js %]",
|
||||
function(h) { userAutocomplete(h, emptyOptions); },
|
||||
[% multiple ? '","' : 'null' %], null, null, 'No users found', true);
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in New Issue