Added control for MS Edge and Internet Explorer browsers for disallow linear gradient

This commit is contained in:
Jose Gonzalez 2019-12-16 16:39:13 +01:00
parent 0d16bc3188
commit d8f232d814
2 changed files with 11 additions and 1 deletions

View File

@ -82,12 +82,18 @@ if (!empty($page) && !empty($sec)) {
}
$login_body_style = '';
$login_body_class = '';
// Overrides the default background with the defined by the user.
if (!empty($config['login_background'])) {
$background_url = 'images/backgrounds/'.$config['login_background'];
$login_body_style = "style=\"background:linear-gradient(74deg, #02020255 36%, transparent 36%), url('".$background_url."');\"";
}
// Support for Internet Explorer and Microsoft Edge browsers
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Edge') !== false) {
$login_body_class = "class='login_body_trident'";
}
// Get alternative custom in case of db fail.
$custom_fields = [
'custom_logo_login',
@ -111,7 +117,7 @@ foreach ($custom_fields as $field) {
// Get the custom icons.
$docs_logo = ui_get_docs_logo();
$support_logo = ui_get_support_logo();
echo '<div id="login_body" '.$login_body_style.'>';
echo '<div id="login_body" '.$login_body_class.' '.$login_body_style.'>';
echo '<div id="header_login">';
echo '<div id="list_icon_docs_support"><ul>';

View File

@ -33,6 +33,10 @@ div#error_buttons a {
background-repeat: repeat;
}
.login_body_trident {
background: url("../../images/backgrounds/background_pandora_console_keys.jpg") !important;
}
p.log_in {
color: #fff;
padding: 0px 10px;