Fix css for fontawesome 5

This commit is contained in:
Laurent Destailleur 2019-03-14 11:48:25 +01:00
parent 7e31e6b4f6
commit f8a4d9075b
3 changed files with 35 additions and 41 deletions

View File

@ -50,8 +50,8 @@ $type = 'bankaccount';
//Order display of bank account
if ($action == 'setbankorder') {
if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION",
GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) {
if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0)
{
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
@ -62,8 +62,8 @@ if ($action == 'setbankorder') {
//Auto report last num releve on conciliate
if ($action == 'setreportlastnumreleve') {
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0,
'', $conf->entity) > 0) {
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0, '', $conf->entity) > 0)
{
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
@ -72,8 +72,8 @@ if ($action == 'setreportlastnumreleve') {
}
}
elseif ($action == 'unsetreportlastnumreleve') {
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0,
'', $conf->entity) > 0) {
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0, '', $conf->entity) > 0)
{
header("Location: " . $_SERVER["PHP_SELF"]);
exit;
}
@ -100,8 +100,7 @@ if ($action == 'specimen') {
$filefound = 0;
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach ($dirmodels as $reldir) {
$file = dol_buildpath($reldir . "core/modules/bank/doc/pdf_" . $modele . ".modules.php",
0);
$file = dol_buildpath($reldir . "core/modules/bank/doc/pdf_" . $modele . ".modules.php", 0);
if (file_exists($file)) {
$filefound = 1;
$classname = "pdf_" . $modele;
@ -142,8 +141,7 @@ elseif ($action == 'del') {
}
// Set default model
elseif ($action == 'setdoc') {
if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '',
$conf->entity)) {
if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
// The constant that was read before the new set
// We therefore requires a variable to have a coherent view
$conf->global->BANKADDON_PDF = $value;
@ -169,8 +167,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader("", $langs->trans("BankSetupModule"));
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("BankSetupModule"), $linkback,
'title_setup');
print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');
$head = bank_admin_prepare_head(null);
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
@ -252,7 +249,7 @@ if ($resql) {
while ($i < $num_rows) {
$array = $db->fetch_array($resql);
array_push($def, $array[0]);
$i ++;
$i++;
}
}
else {
@ -285,8 +282,7 @@ foreach ($dirmodels as $reldir) {
arsort($filelist);
foreach ($filelist as $file) {
if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/',
$file)) {
if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
if (file_exists($dir . '/' . $file)) {
$name = substr($file, 4, dol_strlen($file) - 16);
@ -296,11 +292,9 @@ foreach ($dirmodels as $reldir) {
$module = new $classname($db);
$modulequalified = 1;
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL
< 2)
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
$modulequalified = 0;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL
< 1)
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
$modulequalified = 0;
if ($modulequalified) {
@ -317,27 +311,23 @@ foreach ($dirmodels as $reldir) {
if (in_array($name, $def)) {
print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&value=' . $name . '">';
print img_picto($langs->trans("Enabled"),
'switch_on');
print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>';
print '</td>';
}
else {
print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"),
'switch_off') . '</a>';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
print "</td>";
}
// Default
print '<td class="center">';
if ($conf->global->BANKADDON_PDF == $name) {
print img_picto($langs->trans("Default"),
'on');
print img_picto($langs->trans("Default"), 'on');
}
else {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"),
'off') . '</a>';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&amp;scan_dir=' . $module->scandir . '&amp;label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
}
print '</td>';
@ -348,30 +338,25 @@ foreach ($dirmodels as $reldir) {
$htmltooltip .= '<br>' . $langs->trans("Width") . '/' . $langs->trans("Height") . ': ' . $module->page_largeur . '/' . $module->page_hauteur;
}
$htmltooltip .= '<br><br><u>' . $langs->trans("FeaturesSupported") . ':</u>';
$htmltooltip .= '<br>' . $langs->trans("Logo") . ': ' . yn($module->option_logo,
1, 1);
$htmltooltip .= '<br>' . $langs->trans("Logo") . ': ' . yn($module->option_logo, 1, 1);
//$htmltooltip .= '<br>' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1);
//$htmltooltip .= '<br>' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1);
$htmltooltip .= '<br>' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang,
1, 1);
$htmltooltip .= '<br>' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang, 1, 1);
// $htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
// $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
//$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1,
0);
print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>';
// Preview
print '<td class="center">';
if ($module->type == 'pdf') {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"),
'bill') . '</a>';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"), 'bill') . '</a>';
}
else {
print img_object($langs->trans("PreviewNotAvailable"),
'generic');
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '</td>';
@ -423,8 +408,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
else
{
print '<td class="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),
'switch_off') . '</a>';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
print "</td>";
}

View File

@ -944,7 +944,7 @@ class Translate
* If mb_convert_encoding is not available, return currency code.
*
* @param string $currency_code Currency code
* @param integer $forceloadall 1=Force to load all currencies into cache. We know we need to use all of them. By default read and cache only required currency.
* @param integer $forceloadall 1=Force to load all currencies into cache. We know we need to use all of them. By default read and cache only the requested currency.
* @return string Currency symbol encoded into UTF8
*/
public function getCurrencySymbol($currency_code, $forceloadall = 0)

View File

@ -3005,10 +3005,20 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
}
elseif ($pictowithoutext == 'off') {
$fakey = 'fa-square-o';
if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
{
$fakey = 'fa-square';
$fa='far';
}
$fasize = '1.3em';
}
elseif ($pictowithoutext == 'on') {
$fakey = 'fa-check-square-o';
if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5))
{
$fakey = 'fa-check-square';
$fa='far';
}
$fasize = '1.3em';
}
elseif ($pictowithoutext == 'bank') {
@ -4385,7 +4395,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
{
if ($currency_code == 'auto') $currency_code=$conf->currency;
$listofcurrenciesbefore=array('USD','GBP','AUD','MXN','PEN','CNY');
$listofcurrenciesbefore=array('USD','GBP','AUD','HKD','MXN','PEN','CNY');
$listoflanguagesbefore=array('nl_NL');
if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore))
{