From 6bde0e5360e3ffa78b7710517a0b376ced674903 Mon Sep 17 00:00:00 2001 From: mmahomar Date: Sat, 25 Jun 2022 11:16:57 -0400 Subject: [PATCH] Update _DeleteScriptsPartial.cshtml Updated delete warning to use SweetAlert #8 --- .../Views/Shared/_DeleteScriptsPartial.cshtml | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/MEInsight.Web/Views/Shared/_DeleteScriptsPartial.cshtml b/MEInsight.Web/Views/Shared/_DeleteScriptsPartial.cshtml index 6c080b3..45668c9 100644 --- a/MEInsight.Web/Views/Shared/_DeleteScriptsPartial.cshtml +++ b/MEInsight.Web/Views/Shared/_DeleteScriptsPartial.cshtml @@ -10,11 +10,27 @@ .on('click', function(e) { // prevents default submit e.preventDefault(); - // activates ladda-button 'loading..' style and disables submit button after one click - - //var l = Ladda.create(this); + // activates button 'loading..' style and disables submit button after one click + //TODO + //$('.spinner').removeClass('d-none'); + //$('#submitbutton').addClass('disabled'); + //// disable cancel button after submit + //$('#cancelbutton').addClass('disabled'); + //TODO --replace with + // + //
+ // + // Cancel + // + // + //
+ // Swal.fire({ + toast: true, title: '@Localizer["Are you sure?"]', text: "Deleting this record will delete ALL related records. This cannot be undone.", icon: 'warning', @@ -25,11 +41,11 @@ }).then((result) => { if (result.isConfirmed) { var form = $('#main-form'); - form.submit(); + form.submit(); } }); - + }); }); \ No newline at end of file