<div class="modal fade" tabindex="-1" aria-hidden="true" data-modal-form-target="modal" id="exampleModal">
<div class="modal-dialog ">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" data-modal-form-target="modalTitle" id="my_modal_title"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="my_modal_body" class="modal-body"
data-modal-form-target="modalBody"
data-action="submit->modal-form#submitForm"
>
{{ modalContent | default('Loading...') }}
<script type="text/javascript" >
$('body').on('click', '.open-centered-popup', event => {
event.preventDefault();
const width = 400; // Specify the width of the pop-up window.
const height = 600; // Specify the height of the pop-up window.
const left = (window.innerWidth - width) / 2; // Calculate the left position to center the window.
const top = (window.innerHeight - height) / 2; // Calculate the top position to center the window.
const windowFeatures = `width=${width},height=${height},scrollbars=yes,resizable=yes,top=${top},left=${left}`;
const url = $(this).data('url');
console.log('url = ' + url);
// Open the pop-up window.
window.open(url, '_blank', windowFeatures);
});
</script>
</div>
</div>
</div>
</div>