Bug 8495: Fix JS error when creating a new order

bug introduced by bug 7178
(http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7178)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Julian Maurice 2012-07-24 12:24:11 +02:00 committed by Paul Poulain
parent ee0a778eaa
commit 1428a52341

View file

@ -189,7 +189,7 @@ function check_additem(unique_item_fields) {
continue;
}
var values = new Array();
$("[name='kohafield'][value=items."+ fieldname +"]").each(function(){
$("[name='kohafield'][value='items."+ fieldname +"']").each(function(){
var input = $(this).prevAll("input[name='field_value']")[0];
if($(input).val()) {
values.push($(input).val());