Merge pull request #10063 from aljawaid/patch-4

NEW: Add hidden config 'ADD_UNSPLASH_LOGIN_BACKGROUND'
This commit is contained in:
Laurent Destailleur 2018-12-14 17:51:41 +01:00 committed by GitHub
commit 4f07ab841b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,12 @@ $colorbackhmenu1=join(',',colorStringToArray($colorbackhmenu1)); // Normalize
?>
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode('logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
<?php if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) { ?>
<body class="body bodylogin" style="background-image: url('https://source.unsplash.com/random'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
<?php }
else { ?>
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
<?php } ?>
<?php if (empty($conf->dol_use_jmobile)) { ?>
<script type="text/javascript">