diff --git a/index.php b/index.php index ba6c24ce746..1f5ad001690 100644 --- a/index.php +++ b/index.php @@ -7,10 +7,12 @@ // Set the site ID if required. This must be done before any database // access is attempted. +$site_id = ''; + if (!empty($_GET['site'])) { $site_id = $_GET['site']; -} elseif (is_dir("sites/" . $_SERVER['HTTP_HOST'] ?? '')) { - $site_id = $_SERVER['HTTP_HOST'] ?? ''; +} elseif (is_dir("sites/" . ($_SERVER['HTTP_HOST'] ?? 'default'))) { + $site_id = ($_SERVER['HTTP_HOST'] ?? 'default'); } else { $site_id = 'default'; } diff --git a/library/dialog.js b/library/dialog.js index 64db046ac18..dbc25079a55 100644 --- a/library/dialog.js +++ b/library/dialog.js @@ -46,7 +46,7 @@ type: 'Alert', sizeHeight: 'auto', resolvePromiseOn: 'close', - html: '
' + data + '
' + html: '' + data + '
' }); } @@ -62,7 +62,7 @@ type: 'Confirm', resolvePromiseOn: 'confirm', sizeHeight: 'auto', - html: '' + data + '
' + html: '' + data + '
' }); } diff --git a/portal/sign/assets/signer_api.js b/portal/sign/assets/signer_api.js index 6bbe8d0aee8..e653b5da520 100644 --- a/portal/sign/assets/signer_api.js +++ b/portal/sign/assets/signer_api.js @@ -35,23 +35,37 @@ if (typeof cuser === 'undefined') { } function signerAlertMsg(message, timer = 5000, type = 'danger', size = '') { + // Remove any existing alert box $('#signerAlertBox').remove(); - size = (size == 'lg') ? 'left:25%;width:50%;' : 'left:35%;width:30%;'; - let style = "position:fixed;top:25%;" + size + " bottom:0;z-index:1020;z-index:5000"; - $("body").prepend(""); - let mHtml = '' + message + '
' + - '${message}
+ +