From 80c6d150b42ae5d9ba7464c5e20023cc90388259 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Tue, 9 Aug 2011 14:19:43 -0700 Subject: Bug 636416: Use the standard value-controller javascript to control the drop-down fields on the Advanced Search page. r=glob, a=mkanat --- template/en/default/search/form.html.tmpl | 104 ++++-------------------------- 1 file changed, 14 insertions(+), 90 deletions(-) (limited to 'template/en/default/search/form.html.tmpl') diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index 41e116518..fb9454ff6 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -25,85 +25,6 @@ @@ -154,23 +75,26 @@ TUI_hide_default('information_query'); [%# *** Classification Product Component *** %] - + +[% value_controllers = { + 'classification' => { 'products' => bug_fields.product }, + 'product' => { 'components' => bug_fields.component, + 'versions' => bug_fields.version, + 'milestones' => bug_fields.target_milestone }, +} %] + [% Hook.process('before_selects_top') %] [% IF Param('useclassification') %] - [% fake_classfication = { name => bug_fields.classification.name, - type => constants.FIELD_TYPE_SINGLE_SELECT } %] - [% INCLUDE "search/field.html.tmpl" - field => fake_classfication - accesskey => "c" - onchange => "doOnSelectProduct(1);" - value => default.classification - %] + [% INCLUDE "search/field.html.tmpl" + field => bug_fields.classification + accesskey => "c" + value => default.classification + %] [% END %] [% INCLUDE "search/field.html.tmpl" field => bug_fields.product accesskey => "p" - onchange => "doOnSelectProduct(2);" value => default.product %] [% INCLUDE "search/field.html.tmpl" -- cgit v1.2.3-24-g4f1b