From 47e67526f95b01e540f5cda8c4bc15a0e9dca593 Mon Sep 17 00:00:00 2001 From: Guy Pyrzak Date: Sun, 21 Nov 2010 14:19:10 +0100 Subject: Bug 386600: Implement auto-completion for the requestee field r/a=LpSolit --- template/en/default/attachment/create.html.tmpl | 3 +- template/en/default/attachment/edit.html.tmpl | 3 +- template/en/default/flag/list.html.tmpl | 49 +++++++++++-------------- 3 files changed, 26 insertions(+), 29 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index 7ca4d4bba..b60463dd3 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -34,7 +34,8 @@ header = header subheader = subheader style_urls = [ 'skins/standard/attachment.css' ] - javascript_urls = [ "js/attachment.js", "js/util.js", "js/TUI.js" ] + yui = [ 'autocomplete' ] + javascript_urls = [ "js/attachment.js", 'js/field.js', "js/util.js", "js/TUI.js" ] doc_section = "attachments.html" %] diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index fc7977848..3630aad5e 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -37,8 +37,9 @@ header = header subheader = subheader doc_section = "attachments.html" - javascript_urls = ['js/attachment.js'] + javascript_urls = ['js/attachment.js', 'js/field.js'] style_urls = ['skins/standard/attachment.css'] + yui = [ 'autocomplete' ] bodyclasses = "no_javascript" %] diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index 24418e44a..5f88fc168 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -88,6 +88,7 @@ [% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %] + [% SET flag_custom_list = [] %] [% IF Param('usemenuforusers') %] [% flag_custom_list = flag.type.grant_list %] [% IF !(type.is_active && type.is_requestable && type.is_requesteeble) %] @@ -96,22 +97,16 @@ nothing else. %] [% flag_custom_list = [flag.requestee] %] [% END %] - [% INCLUDE global/userselect.html.tmpl - name => "requestee-$flag.id" - id => "requestee-$flag.id" - value => flag.requestee.login - multiple => 0 - emptyok => 1 - custom_userlist => flag_custom_list - %] - [% ELSE %] - () [% END %] + [% INCLUDE global/userselect.html.tmpl + name => "requestee-$flag.id" + id => "requestee-$flag.id" + value => flag.requestee.login + multiple => 0 + emptyok => 1 + classes => ["requestee"] + custom_userlist => flag_custom_list + %] [% END %] @@ -199,20 +194,20 @@ [% IF type.is_requestable && type.is_requesteeble %] + [% SET grant_list = [] %] [% IF Param('usemenuforusers') %] - [% INCLUDE global/userselect.html.tmpl - name => "requestee_type-$type.id" - id => "requestee_type-$type.id" - multiple => type.is_multiplicable * 3 - emptyok => !type.is_multiplicable - value => "" - custom_userlist => type.grant_list - %] - [% ELSE %] - () + [% grant_list = type.grant_list %] [% END %] + [% INCLUDE global/userselect.html.tmpl + name => "requestee_type-$type.id" + id => "requestee_type-$type.id" + multiple => type.is_multiplicable * 3 + emptyok => !type.is_multiplicable + value => "" + custom_userlist => grant_list + classes => ["requestee"] + %] + [% END %] -- cgit v1.2.3-24-g4f1b