Skip to content

Commit

Permalink
Add confirmation handler for applicant destruction in financial assis…
Browse files Browse the repository at this point in the history
…tance
  • Loading branch information
bbodine1 committed Dec 24, 2024
1 parent 2126812 commit 90ddf55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/assets/javascripts/financial_assistance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary btn-confirmation" id="blarfengar" data-url="<%=application_applicant_path(@application, @applicant)%>">Confirm</button>
<button type="button" class="btn btn-primary btn-confirmation" id="destroy-confirm" data-url="<%=application_applicant_path(@application, @applicant)%>">Confirm</button>

</div>
</div>
Expand Down

0 comments on commit 90ddf55

Please sign in to comment.