mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-18 22:58:53 +08:00
Fix issue loading iframe modal in session_layouts [SCI-9310]
This commit is contained in:
parent
ad4a4412f7
commit
996e3b1d9a
1 changed files with 4 additions and 0 deletions
|
|
@ -7,6 +7,10 @@ $(document).on('turbolinks:load', function() {
|
||||||
window.iFrameModal = document.getElementById('iFrameModal');
|
window.iFrameModal = document.getElementById('iFrameModal');
|
||||||
let iFrameModalFrame = document.getElementById('iFrameModalFrame');
|
let iFrameModalFrame = document.getElementById('iFrameModalFrame');
|
||||||
|
|
||||||
|
// Block from running when accessing page without defined iframe modal
|
||||||
|
// (sign in, reset password, accept invitation, 2fa)
|
||||||
|
if (!iFrameModalFrame || !iFrameModal) return;
|
||||||
|
|
||||||
window.showIFrameModal = (url) => {
|
window.showIFrameModal = (url) => {
|
||||||
iFrameModalFrame.setAttribute('src', url);
|
iFrameModalFrame.setAttribute('src', url);
|
||||||
iFrameModal.classList.remove('hidden');
|
iFrameModal.classList.remove('hidden');
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue