From: Olivier Le Floch Date: Sat, 21 Jun 2008 12:43:54 +0000 (+0200) Subject: Correctly unset the hidden input field for autocompletable-and-select-menu-settable... X-Git-Tag: xorg/0.9.17~93 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=26d21e6866e122512c79c15e1d6851455d162c5b;p=platal.git 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. --- 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(''); }); }); -->