From: Dan Scott Date: Mon, 13 Aug 2012 19:51:35 +0000 (-0400) Subject: TPAC: AutoSuggest throws a JS error on login form X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=35ec0401f884665d53b1c3e28588c3fc28b5c094;p=contrib%2FConifer.git TPAC: AutoSuggest throws a JS error on login form searchbar.tt2 includes a reference to the AutoSuggest widget that results in an error if the dojo code has not been required, which is par for the course. However, on the login form we disabled the AutoSuggest inline code because we didn't want it to override the autofocus for the login user name; unfortunately, the searchbar exists on the login form, and a JS error is thrown. On most browsers, not a problem, but on IE it throws up a nasty dialog if you have the right/wrong settings. The simplest way to resolve this is to not set autofocus if we're not on the basic_search page, but keep the rest of the AutoSuggest code around. In addition, we can avoid some other undefined var warnings by stepping carefully through the search for the dijit value. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/advanced.tt2 b/Open-ILS/src/templates/opac/advanced.tt2 index 220c56fd20..452cd8cee0 100644 --- a/Open-ILS/src/templates/opac/advanced.tt2 +++ b/Open-ILS/src/templates/opac/advanced.tt2 @@ -4,6 +4,7 @@ ctx.page_title = l("Advanced Search"); pane = CGI.param("pane") || "advanced"; loc = ctx.search_ou; + basic_search = 'f'; -%]