Skip to content

Commit

Permalink
Merge pull request #566 from H2-invent/hotfix/send-ayax-with-confirm
Browse files Browse the repository at this point in the history
* fix direkt sind with confirm
  • Loading branch information
holema authored Nov 17, 2024
2 parents 9504a6d + 1dbfc50 commit caaf7f8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions assets/js/confirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function initDirectSend() {
if (e.target.matches('.directSend')) {
e.preventDefault();
var url = e.target.href;
var targetUrl = e.target.dataset.url;
var target = e.target.dataset.target;

fetch(url)
Expand Down Expand Up @@ -96,7 +95,6 @@ function initConfirmDirectSendHref() {
if (e.target.matches('.directSendWithConfirm')) {
e.preventDefault();
const url = e.target.href;
const targetUrl = e.target.dataset.url;
const target = e.target.dataset.target;
const text = e.target.dataset.text || 'Wollen Sie die Aktion durchführen?';

Expand All @@ -111,7 +109,7 @@ function initConfirmDirectSendHref() {
confirmButton: 'btn-danger btn',
cancelButton: 'btn-outline-primary btn'
}
}).then((resul) => {
}).then((result) => {
if (result.isConfirmed) {
fetch(url)
.then(response => response.text())
Expand Down

0 comments on commit caaf7f8

Please sign in to comment.