Skip to content

Commit

Permalink
Merge pull request #49 from cevi/develop
Browse files Browse the repository at this point in the history
Korrektur für Modals und EditPost
  • Loading branch information
jeromesigg authored Sep 1, 2024
2 parents bcc4837 + 4bf94ba commit eb0cc50
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
6 changes: 4 additions & 2 deletions resources/views/admin/camps/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@
showCancelButton: true,
confirmButtonText: 'Ja',
cancelButtonText: 'Abbrechen',
}).then((willDelete) => {
if (willDelete) {
confirmButtonColor: 'blue',
cancelButtonColor: 'red',
}).then((result) => {
if (result.isConfirmed) {
document.getElementById("DeleteForm").submit();
}
});
Expand Down
6 changes: 4 additions & 2 deletions resources/views/admin/camps/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@
showCancelButton: true,
confirmButtonText: 'Ja',
cancelButtonText: 'Abbrechen',
}).then((willDelete) => {
if (willDelete) {
confirmButtonColor: 'blue',
cancelButtonColor: 'red',
}).then((result) => {
if (result.isConfirmed) {
document.getElementById("DeleteForm").submit();
}
});
Expand Down
6 changes: 4 additions & 2 deletions resources/views/admin/surveys/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
showCancelButton: true,
confirmButtonText: 'Ja',
cancelButtonText: 'Abbrechen',
}).then((willCreate) => {
if (willCreate) {
confirmButtonColor: 'blue',
cancelButtonColor: 'red',
}).then((result) => {
if (result.isConfirmed) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
Expand Down
6 changes: 4 additions & 2 deletions resources/views/admin/users/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@
showCancelButton: true,
confirmButtonText: 'Ja',
cancelButtonText: 'Abbrechen',
}).then((willDelete) => {
if (willDelete) {
confirmButtonColor: 'blue',
cancelButtonColor: 'red',
}).then((result) => {
if (result.isConfirmed) {
document.getElementById("DeleteForm").submit();
}
});
Expand Down
13 changes: 9 additions & 4 deletions resources/views/home/post_delete.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
$('.confirm').on('click', function(e){
e.preventDefault(); //cancel default action
swal({
Swal.fire({
title: 'Rückmeldung löschen?',
text: 'Willst du die Rückmeldung wirklich löschen?',
icon: 'info',
buttons: ["Abbrechen", "Ja"],
}).then((willDelete) => {
if (willDelete) {
showCancelButton: true,
confirmButtonText: 'Ja',
cancelButtonText: 'Abbrechen',
confirmButtonColor: 'blue',
cancelButtonColor: 'red',
}).then((result) => {
if (result.isConfirmed) {
document.getElementById("DeleteForm").submit();
}
});
Expand All @@ -21,4 +25,5 @@ function editPost(post) {
$('#user_id').val(post['user_id']);
$('#show_on_survey').prop("checked", post['show_on_survey']);
}
window.editPost = editPost;
</script>

0 comments on commit eb0cc50

Please sign in to comment.