fixed saving the location_id instead of container_id when adding or editing a part

pull/3/head
Marek Baczynski 6 years ago
parent 694310a733
commit 2ce132868c

@ -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('<option val="' + location_id + '">' + location_name + '</option>');
$('#location-dropdown').append('<option value="' + location_id + '">' + location_name + '</option>');
});
});
}

Loading…
Cancel
Save