Skip to content

Commit

Permalink
Fixed event confirmation modal to static backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
mkokio committed Dec 15, 2023
1 parent ca80103 commit 152d251
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ class="form-control"
-->
</div>

<x-primary-button>{{ __('Submit') }}</x-primary-button>
<x-primary-button id="saveButton" data-bs-toggle="modal" data-bs-target="#confirmationModal">{{ __('Submit') }}</x-primary-button>

</form>
<!--class="modal fade" doesn't work... why?-->
<div id="confirmationModal" class="modal" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div id="confirmationModal" class="modal fade" data-bs-backdrop="static" ata-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
Expand Down Expand Up @@ -162,8 +162,8 @@ class="form-control"
const linkUrlElement = document.getElementById('link-url');
const linkPlaceholder = document.getElementById('link_placeholder');
if (form && confirmationModal && confirmSubmit && cancelSubmit && eventTitlePlaceholder && eventDescriptionPlaceholder && eventLocationPlaceholder) {
form.addEventListener('submit', function (event) {
if (saveButton && confirmationModal && confirmSubmit && cancelSubmit && eventTitlePlaceholder && eventDescriptionPlaceholder && eventLocationPlaceholder && loading) {
saveButton.addEventListener('click', function (event) {
event.preventDefault();
eventTitlePlaceholder.textContent = document.getElementById('event_title').value;
eventDescriptionPlaceholder.textContent = document.getElementById('description').value;
Expand Down

0 comments on commit 152d251

Please sign in to comment.