Skip to content

Commit 6fdba6e

Browse files
committed
Added warning message if no locations were selected and user tries to submit form
1 parent 1013274 commit 6fdba6e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/assets/js/signal_sets.js

+7
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,15 @@ $('#geographic_value').on('select2:select', function (e) {
448448

449449
function submitMode(event) {
450450
event.preventDefault();
451+
var geographicValues = $('#geographic_value').select2('data');
451452

453+
if (geographicValues.length === 0) {
454+
appendAlert("Please select at least one geographic location", "warning")
455+
return;
456+
}
457+
452458
if (currentMode === 'epivis') {
459+
// appendAlert(warningMessage, "warning")
453460
plotData();
454461
} else if (currentMode === 'export') {
455462
exportData();

0 commit comments

Comments
 (0)