From 2ce132868c9cf0cb5dccc963c889ef0fbd85a5a4 Mon Sep 17 00:00:00 2001 From: Marek Baczynski Date: Mon, 12 Nov 2018 01:16:16 +0100 Subject: [PATCH] fixed saving the location_id instead of container_id when adding or editing a part --- parts/static/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parts/static/script.js b/parts/static/script.js index 517caa7..a22f17f 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -55,7 +55,7 @@ function end_edit() { } function save(partID) { - var location_id_v = $('table#details tr#location td select').val(); + var location_id_v = $('#location-dropdown').val(); var partno_v = $('table#details tr#partno td input').val(); var description_v = $('table#details tr#description td input').val(); var datasheet = $('table#details tr#datasheet td input')[0].files; @@ -206,7 +206,7 @@ function container_onchange() { $('#location-dropdown').empty(); $.getJSON('parts/getlocationsInContainer/' + selected_container_id, function(data) { $.each(data, function(location_id, location_name) { - $('#location-dropdown').append(''); + $('#location-dropdown').append(''); }); }); }