From 26d21e6866e122512c79c15e1d6851455d162c5b Mon Sep 17 00:00:00 2001 From: Olivier Le Floch Date: Sat, 21 Jun 2008 14:43:54 +0200 Subject: [PATCH] Correctly unset the hidden input field for autocompletable-and-select-menu-settable fields. This ensures that if the user enters a value in the 'text' field, the 'integer id' field is ignored. Fixes FS#850. --- ChangeLog | 1 + templates/search/adv.form.tpl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 57e9686..6eeecb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,7 @@ Bug/Wish: * Search: - Fix display of autocompletion menu (use plugin's latest version) -ALK - Clicking on the "..." entry no longer replaces search with "..." -ALK + - #850: Fix autocompletion bug when changing an advanced search -ALK * Xnet: - #821: Fix infinite loop when user can't be authenticated -FRU diff --git a/templates/search/adv.form.tpl b/templates/search/adv.form.tpl index 6f36626..3c6a5ba 100644 --- a/templates/search/adv.form.tpl +++ b/templates/search/adv.form.tpl @@ -171,6 +171,10 @@ return false; }); + }).parent().find('.autocomplete').change(function() { + // If we change the value in the type="text" field, then the value in the 'integer id' field must not be used, + // to ensure that, we unset it + $(this).parent().find('.autocompleteTarget').val(''); }); }); --> -- 2.1.4