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). %]
|
[%# Step 1: Display every flag type (except inactive types with no flags). %]
|
||||||
[% FOREACH type = flag_types %]
|
[% FOREACH type = flag_types %]
|
||||||
|
|
||||||
[%# Step 1: Display existing flag(s). %]
|
[%# Step 1: Display existing flag(s). %]
|
||||||
[% FOREACH flag = type.flags %]
|
[% FOREACH flag = type.flags %]
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -70,14 +70,13 @@
|
||||||
<td>
|
<td>
|
||||||
[% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %]
|
[% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %]
|
||||||
<span style="white-space: nowrap;">
|
<span style="white-space: nowrap;">
|
||||||
[% INCLUDE "global/userselect-combobox.html.tmpl"
|
[% INCLUDE "global/userselect.html.tmpl"
|
||||||
name => "requestee-$flag.id"
|
name => "requestee-$flag.id"
|
||||||
id => "requestee-$flag.id"
|
size => 40
|
||||||
value => flag.requestee.login
|
id => "requestee-$flag.id"
|
||||||
emptyok => 1
|
value => flag.requestee.login
|
||||||
usemenuforusers => flag.custom_list
|
emptyok => 1
|
||||||
custom_userlist => flag.custom_list && flag.custom_list.ready_list
|
custom_userlist => flag.custom_list && flag.custom_list.ready_list
|
||||||
allow_other_user => flag.allow_other
|
|
||||||
%]
|
%]
|
||||||
</span>
|
</span>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
@ -139,15 +138,14 @@
|
||||||
<td>
|
<td>
|
||||||
[% IF type.is_requestable && type.is_requesteeble %]
|
[% IF type.is_requestable && type.is_requesteeble %]
|
||||||
<span style="white-space: nowrap;">
|
<span style="white-space: nowrap;">
|
||||||
[% INCLUDE "global/userselect-combobox.html.tmpl"
|
[% INCLUDE "global/userselect.html.tmpl"
|
||||||
name => "requestee_type-$type.id"
|
name => "requestee_type-$type.id"
|
||||||
id => "requestee_type-$type.id"
|
id => "requestee_type-$type.id"
|
||||||
value => type.default_requestee
|
size => 40
|
||||||
multiple => type.is_multiplicable
|
value => type.default_requestee
|
||||||
emptyok => !type.is_multiplicable
|
multiple => type.is_multiplicable
|
||||||
usemenuforusers => type.custom_list
|
emptyok => !type.is_multiplicable
|
||||||
custom_userlist => type.custom_list && type.custom_list.ready_list
|
custom_userlist => type.custom_list && type.custom_list.ready_list
|
||||||
allow_other_user => type.allow_other
|
|
||||||
%]
|
%]
|
||||||
</span>
|
</span>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -38,14 +38,13 @@
|
||||||
[% IF multiple %] multiple="multiple" size="[% multiple FILTER html %]" [% END %]
|
[% IF multiple %] multiple="multiple" size="[% multiple FILTER html %]" [% END %]
|
||||||
>
|
>
|
||||||
[% IF emptyok %]<option value=""></option>[% END %]
|
[% IF emptyok %]<option value=""></option>[% END %]
|
||||||
[% SET custom_userlist = user.get_userlist UNLESS custom_userlist %]
|
|
||||||
|
|
||||||
[% SET selected = {} %]
|
[% SET selected = {} %]
|
||||||
[% IF value.defined %]
|
[% IF value.defined %]
|
||||||
[% SET selected.$selected_value = 1 FOREACH selected_value IN value.split(', ') %]
|
[% SET selected.$selected_value = 1 FOREACH selected_value IN value.split(', ') %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% FOREACH tmpuser = custom_userlist %]
|
[% FOREACH tmpuser = user.get_userlist %]
|
||||||
[% IF tmpuser.visible OR selected.${tmpuser.login} == 1 %]
|
[% IF tmpuser.visible OR selected.${tmpuser.login} == 1 %]
|
||||||
<option value="[% tmpuser.login FILTER html %]"
|
<option value="[% tmpuser.login FILTER html %]"
|
||||||
[% IF selected.${tmpuser.login} == 1 %]
|
[% IF selected.${tmpuser.login} == 1 %]
|
||||||
|
@ -64,8 +63,10 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
</select>
|
</select>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
|
[% id = id || name %]
|
||||||
<input
|
<input
|
||||||
name="[% name FILTER html %]"
|
name="[% name FILTER html %]"
|
||||||
|
id="[% id FILTER html %]"
|
||||||
value="[% value FILTER html %]"
|
value="[% value FILTER html %]"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
[% IF tabindex %] tabindex="[% tabindex FILTER html %]" [% END %]
|
[% IF tabindex %] tabindex="[% tabindex FILTER html %]" [% END %]
|
||||||
|
@ -73,12 +74,14 @@
|
||||||
[% IF disabled %] disabled="[% disabled FILTER html %]" [% END %]
|
[% IF disabled %] disabled="[% disabled FILTER html %]" [% END %]
|
||||||
[% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
|
[% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
|
||||||
[% IF size %] size="[% size FILTER html %]" [% END %]
|
[% IF size %] size="[% size FILTER html %]" [% END %]
|
||||||
[% IF id %] id="[% id FILTER html %]" [% ELSE %] id="[% name | html %]"[% END %]
|
|
||||||
/>
|
/>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
addListener(window, 'load', function() {
|
addListener(window, 'load', function() {
|
||||||
[%# FIXME: remove hardcoded i18n message, also from js/field.js::userAutocomplete() %]
|
[%-# FIXME: remove hardcoded i18n message, also from js/field.js::userAutocomplete() %]
|
||||||
new SimpleAutocomplete("[% (id || name) | js %]", userAutocomplete, null, null, null, 'No users found', true);
|
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>
|
</script>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
Loading…
Reference in New Issue