Modifica avviso in swal in plugin Componenti

This commit is contained in:
valentina 2024-07-09 11:45:57 +02:00
parent 391808f57b
commit 5da299d04a
1 changed files with 15 additions and 4 deletions

View File

@ -258,18 +258,29 @@ echo '
const tr = $(trigger).closest("tr");
const id_componente = tr.data("id");
if(confirm("'.tr('Vuoi sostituire questo componente?').'")) {
swal({
title: "'.tr('Vuoi sostituire questo componente?').'",
type: "warning",
showCancelButton: true,
confirmButtonText: "'.tr('Sì').'"
}).then(function () {
redirect("'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=sostituisci&backto=record-edit&id_plugin='.$id_plugin.'&id_componente=" + id_componente + "&hash=tab_'.$structure->id.'");
}
}).catch(swal.noop);
}
function rimuoviComponente(trigger) {
const tr = $(trigger).closest("tr");
const id_componente = tr.data("id");
if(confirm("'.tr('Vuoi eliminare questo componente?').'")){
swal({
title: "'.tr('Vuoi eliminare questo componente?').'",
type: "warning",
showCancelButton: true,
confirmButtonText: "'.tr('Sì').'"
}).then(function () {
redirect("'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=rimuovi&backto=record-edit&id_plugin='.$id_plugin.'&id_componente=" + id_componente + "&hash=tab_'.$structure->id.'");
}
}).catch(swal.noop);
}
</script>';