mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-22 17:31:25 +01:00
Add warning on non https website to axplain why features is broken
This commit is contained in:
@@ -187,10 +187,18 @@ print '<td class="center"> </td>'."\n";
|
|||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
if (! getIsHTTPS()) {
|
||||||
|
$langs->load("errors");
|
||||||
|
print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' ';
|
||||||
|
}
|
||||||
|
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Disabled'), 'switch_off').'</a>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
if (! getIsHTTPS()) {
|
||||||
|
$langs->load("errors");
|
||||||
|
print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' ';
|
||||||
|
}
|
||||||
|
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_REMINDER_BROWSER&token='.newToken().'">'.img_picto($langs->trans('Enabled'), 'switch_on').'</a>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
|
|||||||
@@ -2897,6 +2897,26 @@ function getUserRemoteIP()
|
|||||||
return $ip;
|
return $ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return if we are using a HTTPS connexion
|
||||||
|
* Check HTTPS (no way to be modified by user but may be empty or wrong if user is using a proxy)
|
||||||
|
* Take HTTP_X_FORWARDED_PROTO (defined when using proxy)
|
||||||
|
* Then HTTP_X_FORWARDED_SSL
|
||||||
|
*
|
||||||
|
* @return boolean True if user is using HTTPS
|
||||||
|
*/
|
||||||
|
function getIsHTTPS()
|
||||||
|
{
|
||||||
|
$isSecure = false;
|
||||||
|
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
|
||||||
|
$isSecure = true;
|
||||||
|
}
|
||||||
|
elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
|
||||||
|
$isSecure = true;
|
||||||
|
}
|
||||||
|
return $isSecure;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a country code from IP. Empty string if not found.
|
* Return a country code from IP. Empty string if not found.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -283,3 +283,4 @@ WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were re
|
|||||||
WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into ECM database index table
|
WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into ECM database index table
|
||||||
WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> is on.
|
WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> is on.
|
||||||
WarningCreateSubAccounts=Warning, you can't create directly a sub account, you must create a third party or an user and assign them an accounting code to find them in this list
|
WarningCreateSubAccounts=Warning, you can't create directly a sub account, you must create a third party or an user and assign them an accounting code to find them in this list
|
||||||
|
WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection.
|
||||||
@@ -769,7 +769,8 @@ span.fa.fa-plus-circle.paddingleft {
|
|||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-toggle-on, .fa-toggle-off { font-size: 2em; }
|
.size15x { font-size: 1.5em; }
|
||||||
|
.fa-toggle-on, .fa-toggle-off, .size2x { font-size: 2em; }
|
||||||
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
|
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
|
||||||
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off,
|
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off,
|
||||||
.tdwebsitesearchresult .fa-toggle-on, .tdwebsitesearchresult .fa-toggle-off
|
.tdwebsitesearchresult .fa-toggle-on, .tdwebsitesearchresult .fa-toggle-off
|
||||||
|
|||||||
@@ -840,7 +840,8 @@ body[class*="colorblind-"] .text-success{
|
|||||||
color: rgb(<?php echo $colortexttitle; ?>) !important;
|
color: rgb(<?php echo $colortexttitle; ?>) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-toggle-on, .fa-toggle-off { font-size: 2em; }
|
.size15x { font-size: 1.5em; }
|
||||||
|
.fa-toggle-on, .fa-toggle-off, .size2x { font-size: 2em; }
|
||||||
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
|
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
|
||||||
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off {
|
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off {
|
||||||
font-size: 1.5em; vertical-align: text-bottom;
|
font-size: 1.5em; vertical-align: text-bottom;
|
||||||
|
|||||||
Reference in New Issue
Block a user