From 50e4903a302d0270aa97987873091a41c89af6a7 Mon Sep 17 00:00:00 2001 From: Davide Bongiovanni Date: Tue, 13 Nov 2018 14:58:20 +0100 Subject: [PATCH] Check if user has selected a location --- parts/static/script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parts/static/script.js b/parts/static/script.js index 841c558..02bd755 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -62,6 +62,10 @@ function end_edit() { } function save(partID) { + if (!$('#location-dropdown').val()) { + alert('Please select a location.'); + return; + } var location_id_v = $('#location-dropdown').val(); var partno_v = $('input[name=partno-input]').val(); var description_v = $('input[name=description-input]').val();