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
This commit is contained in:
parent
3d7b6e9a26
commit
8acd702cd1
@ -3232,10 +3232,14 @@ abstract class CommonObject
|
|||||||
|
|
||||||
if (! $user->rights->margins->liretous) return;
|
if (! $user->rights->margins->liretous) return;
|
||||||
|
|
||||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
|
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||||
|
|
||||||
$marginInfo = $this->getMarginInfos($force_price);
|
$marginInfo = $this->getMarginInfos($force_price);
|
||||||
print "<img onclick=\"$('.margininfos').toggle();\" src='".img_picto($langs->trans("Hide")."/".$langs->trans("Show"),'object_margin.png','','',1)."'>";
|
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 '<table class="nobordernopadding margintable" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="30%">'.$langs->trans('Margins').'</td>';
|
print '<td width="30%">'.$langs->trans('Margins').'</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user