fix: serve bootstrap locally, fix modal button null reference
- Replace CDN bootstrap with local /lib/bootstrap/ - CDN SRI hash was mismatching and blocking the script entirely (no Bootstrap = no modals) - Fix addEventListener null error: script runs before @section FormActions renders the button, so use document-level event delegation instead Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -158,8 +158,10 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('testModalBtn').addEventListener('click', function () {
|
||||
bootstrap.Modal.getOrCreateInstance(document.getElementById('testModal')).show();
|
||||
document.addEventListener('click', function (e) {
|
||||
if (e.target.closest('#testModalBtn')) {
|
||||
bootstrap.Modal.getOrCreateInstance(document.getElementById('testModal')).show();
|
||||
}
|
||||
});
|
||||
|
||||
async function sendTestEmail(channelId) {
|
||||
|
||||
Reference in New Issue
Block a user