From 90ddf55eb10a19ec65d222aec8e26e58ce1606c2 Mon Sep 17 00:00:00 2001 From: Brad Bodine Date: Wed, 18 Dec 2024 14:58:17 -0600 Subject: [PATCH] Add confirmation handler for applicant destruction in financial assistance --- app/assets/javascripts/financial_assistance.js | 4 ++++ .../app/views/financial_assistance/applicants/_edit.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/financial_assistance.js b/app/assets/javascripts/financial_assistance.js index baace9a88cc..5adfd5a37e8 100644 --- a/app/assets/javascripts/financial_assistance.js +++ b/app/assets/javascripts/financial_assistance.js @@ -21,6 +21,10 @@ $(document).on('ajax:success', '#edit-dependent-person', function (event) { $('.btn-confirmation').removeAttr('disabled'); }); + $(document).on('click', '#destroyApplicant #destroy-confirm', function (e) { + confirmDestoyApplicant(e, $(this).data('url')); + }); + function confirmDestoyApplicant(event, url) { $('.btn-confirmation').prop('disabled', true); event.preventDefault(); diff --git a/components/financial_assistance/app/views/financial_assistance/applicants/_edit.html.erb b/components/financial_assistance/app/views/financial_assistance/applicants/_edit.html.erb index 7428f223909..406138168a5 100644 --- a/components/financial_assistance/app/views/financial_assistance/applicants/_edit.html.erb +++ b/components/financial_assistance/app/views/financial_assistance/applicants/_edit.html.erb @@ -156,7 +156,7 @@