From d47d84e9c84a87995aa7f2f32147e83e3eeeaa62 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 12 Dec 2005 16:56:31 +0000 Subject: [PATCH] search_form.xul can take and make URI query components git-svn-id: svn://svn.open-ils.org/ILS/trunk@2347 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/patron/search_form.js | 14 +++++++++++++- .../xul/staff_client/server/patron/search_form.xul | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/search_form.js b/Open-ILS/xul/staff_client/server/patron/search_form.js index 4a8ae200e7..6a671ed03c 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_form.js +++ b/Open-ILS/xul/staff_client/server/patron/search_form.js @@ -66,6 +66,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.family_name) { + e.setAttribute('value',params.query.family_name); e.value = params.query.family_name; } else { e.value = ''; @@ -78,6 +79,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.first_given_name) { + e.setAttribute('value',params.query.first_given_name); e.value = params.query.first_given_name; } else { e.value = ''; @@ -90,7 +92,8 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.second_given_name) { - e.value = params.query.second_gtiven_name; + e.setAttribute('value',params.query.second_given_name); + e.value = params.query.second_given_name; } else { e.value = ''; } @@ -102,6 +105,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.email) { + e.setAttribute('value',params.query.email); e.value = params.query.email; } else { e.value = ''; @@ -114,6 +118,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.phone) { + e.setAttribute('value',params.query.phone); e.value = params.query.phone; } else { e.value = ''; @@ -126,6 +131,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.ident) { + e.setAttribute('value',params.query.ident); e.value = params.query.ident; } else { e.value = ''; @@ -138,6 +144,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.street1) { + e.setAttribute('value',params.query.street1); e.value = params.query.street1; } else { e.value = ''; @@ -150,6 +157,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.street2) { + e.setAttribute('value',params.query.street2); e.value = params.query.street2; } else { e.value = ''; @@ -162,6 +170,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.city) { + e.setAttribute('value',params.query.city); e.value = params.query.city; } else { e.value = ''; @@ -174,6 +183,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.state) { + e.setAttribute('value',params.query.state); e.value = params.query.state; } else { e.value = ''; @@ -186,6 +196,7 @@ patron.search_form.prototype = { function(e) { return function() { if (params.query&¶ms.query.post_code) { + e.setAttribute('value',params.query.post_code); e.value = params.query.post_code; } else { e.value = ''; @@ -197,6 +208,7 @@ patron.search_form.prototype = { } ); + obj.controller.render(); }, 'on_submit' : function(q) { diff --git a/Open-ILS/xul/staff_client/server/patron/search_form.xul b/Open-ILS/xul/staff_client/server/patron/search_form.xul index a758487043..8cf68892bc 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_form.xul +++ b/Open-ILS/xul/staff_client/server/patron/search_form.xul @@ -42,8 +42,8 @@ var session = g.cgi.param('session'); var keys = g.cgi.keys(); var query = {}; - for (var i in keys) { - query[i] = g.cgi.param(i); + for (var i = 0; i < keys.length; i++) { + query[keys[i]] = g.cgi.param(keys[i]); } JSAN.use('patron.search_form'); g.search_form = new patron.search_form(); -- 2.43.2