From f5e5bdb1ed29fed385e22c0f182a287eeb153d75 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 28 Feb 2006 17:02:58 +0000 Subject: [PATCH] fix for eg. freetimesearch: non multiple selectboxes got wrongly a [] appended to the name --- etemplate/js/etemplate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/etemplate.js b/etemplate/js/etemplate.js index 3eb645008c..df8e027c19 100644 --- a/etemplate/js/etemplate.js +++ b/etemplate/js/etemplate.js @@ -163,7 +163,7 @@ function values2url(form,names) } else if (element.options) { // selectbox for(opt=0; opt < element.options.length; opt++) { //alert('found '+element.name+' option['+opt+'] = '+element.options[opt].value+ ' = '.element.options[opt].text+': '+element.options[opt].selected); - if (element.options[opt].selected) url += '&'+element.name+(element.name.indexOf('[]') >= 0 ? '=' : '[]=')+element.options[opt].value; + if (element.options[opt].selected) url += '&'+element.name+(element.name.indexOf('[]') >= 0 || !element.multiple ? '=' : '[]=')+element.options[opt].value; } } else if (element.value != null) { url += '&'+element.name+'='+element.value;