Skip to content
Snippets Groups Projects
Commit 8acd702c authored by Charles Benke's avatar Charles Benke
Browse files

Using hidden constant to use the feature

MARGININFO_HIDE_SHOW = 0 feature not used
MARGININFO_HIDE_SHOW = 1 feature used, displayed on open
MARGININFO_HIDE_SHOW = 2 feature used, not displayed on open
parent 3d7b6e9a
No related branches found
No related tags found
No related merge requests found
......@@ -3235,7 +3235,11 @@ abstract class CommonObject
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
$marginInfo = $this->getMarginInfos($force_price);
if ($conf->global->MARGININFO_HIDE_SHOW > 0)
print "<img onclick=\"$('.margininfos').toggle();\" src='".img_picto($langs->trans("Hide")."/".$langs->trans("Show"),'object_margin.png','','',1)."'>";
if ($conf->global->MARGININFO_HIDE_SHOW == 2) // hide by default
print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>';
print '<table class="nobordernopadding margintable" width="100%">';
print '<tr class="liste_titre">';
print '<td width="30%">'.$langs->trans('Margins').'</td>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment