From def7903801fcdbab2f227688375f38c5cb490f27 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Wed, 11 Aug 2004 12:08:10 +0000 Subject: Bug 251669: add an option to show users in a drop down menu instead of a text edit field patch by glob r=joel a=justdave --- template/en/default/bug/create/create.html.tmpl | 15 +++++-- template/en/default/bug/edit.html.tmpl | 17 ++++++-- template/en/default/bug/knob.html.tmpl | 15 ++++--- template/en/default/global/userselect.html.tmpl | 55 ++++++++++++++++++++++++ template/en/default/list/edit-multiple.html.tmpl | 10 +++-- 5 files changed, 96 insertions(+), 16 deletions(-) create mode 100644 template/en/default/global/userselect.html.tmpl (limited to 'template/en') diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 3364649e8..ecb3dd8c9 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -185,8 +185,12 @@ function set_assign_to() { - + [% INCLUDE global/userselect.html.tmpl + name => "assigned_to" + value => assigned_to + size => 32 + emptyok => 1 + %] @@ -194,7 +198,12 @@ function set_assign_to() { Cc: - + [% INCLUDE global/userselect.html.tmpl + name => "cc" + value => cc + size => 45 + emptyok => 1 + %] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index ef6b551fa..f4c68bb4d 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -163,7 +163,13 @@ Add CC: - + [% INCLUDE global/userselect.html.tmpl + name => "newcc" + value => "" + accesskey => "a" + size => 30 + emptyok => 1 + %] @@ -270,8 +276,13 @@ QA Contact: - + [% INCLUDE global/userselect.html.tmpl + name => "qa_contact" + value => bug.qa_contact.email + accesskey => "q" + size => 60 + emptyok => 1 + %] [% END %] diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl index b93f8099d..8ab0ce0ad 100644 --- a/template/en/default/bug/knob.html.tmpl +++ b/template/en/default/bug/knob.html.tmpl @@ -96,12 +96,15 @@ Reassign [% terms.bug %] to - + [% safe_assigned_to = FILTER js; bug.assigned_to.email; END %] + [% INCLUDE global/userselect.html.tmpl + name => "assigned_to" + value => bug.assigned_to.email + size => 32 + onchange => "if ((this.value != '$safe_assigned_to') && (this.value != '')) { + document.changeform.knob[$knum].checked=true; + }" + %]
[% IF bug.isunconfirmed && bug.user.canconfirm %]      diff --git a/template/en/default/global/userselect.html.tmpl b/template/en/default/global/userselect.html.tmpl new file mode 100644 index 000000000..d83a5905b --- /dev/null +++ b/template/en/default/global/userselect.html.tmpl @@ -0,0 +1,55 @@ +[%# 1.0@bugzilla.org %] +[%# 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 + #%] + +[%# INTERFACE: + # userlist: select only; array reference with list of users and identities + # userlist is built by Bugzilla::User::get_userlist() + # name: mandatory; field name + # value: optional; default field value/selection + # onchange: optional; onchange attribute value + # accesskey: optional, input only; accesskey attribute value + # size: optional, input only; size attribute value + # emptyok: optional, select only; if true, prepend menu option to start of select + # + #%] + +[% IF Param("usemenuforusers") %] + +[% ELSE %] + +[% END %] + + diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index f03ea09e1..2f61ae45b 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -302,10 +302,12 @@ -
+[% INCLUDE global/userselect.html.tmpl + name => "assigned_to" + value => user.login + size => 32 + onchange => "document.forms.changeform.knob[$knum].checked=true;" +%]
[% knum = knum + 1 %]