From c87df50df860b90031a4732cee8a8b79c08b7135 Mon Sep 17 00:00:00 2001 From: loviuz Date: Tue, 6 Jun 2023 17:11:13 +0200 Subject: [PATCH] Fix su creazione ddt di completamento --- modules/ddt/buttons.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ddt/buttons.php b/modules/ddt/buttons.php index 25b516b80..ffdfd4c3d 100755 --- a/modules/ddt/buttons.php +++ b/modules/ddt/buttons.php @@ -50,7 +50,11 @@ function completaTrasporto() { confirmButtonText: "'.tr('Completa').'", }).then( function() { - location.href = globals.rootdir + "/editor.php?id_module='.$id_module.'&id_segment=" + $("select[name=id_segment]").val() + "&id_record='.$id_record.'&op=completa_trasporto&backto=record-edit"; + if ($("select[name=id_segment]").val() == null) { + swal( "'.tr('Attenzione').'", "'.tr('Devi prima selezionare un segmento').'...", "warning"); + } else { + location.href = globals.rootdir + "/editor.php?id_module='.$id_module.'&id_segment=" + $("select[name=id_segment]").val() + "&id_record='.$id_record.'&op=completa_trasporto&backto=record-edit"; + } }, function() {}, start_superselect(),