From 156279d6a196aedba8592ea6b05a76e3e6b2227b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 May 2021 00:34:52 +0200 Subject: [PATCH] Fix nojs --- htdocs/product/stock/product.php | 78 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 9ef7b011d12..5908785e1cb 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -531,43 +531,43 @@ if ($id > 0 || $ref) { llxHeader('', $title, $helpurl); - if (! empty($conf->use_javascript_ajax)) { - ?> - - + 0) { @@ -909,9 +909,11 @@ if (!$variants) { if ((!empty($conf->productbatch->enabled)) && $object->hasbatch()) { $colspan = 3; print ''; - print ''.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'   '; - print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").''; - //print ' '.$form->textwithpicto('', $langs->trans('CollapseBatchDetailHelp'), 1, 'help', ''); + if (!empty($conf->use_javascript_ajax)) { + print ''.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'   '; + print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").''; + //print ' '.$form->textwithpicto('', $langs->trans('CollapseBatchDetailHelp'), 1, 'help', ''); + } print ''; print ''.$langs->trans("batch_number").''; if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { @@ -969,7 +971,7 @@ if (!$variants) { print ''; print ''; print $entrepotstatic->getNomUrl(1); - if (!empty($conf->productbatch->enabled) && $object->hasbatch()) { + if (!empty($conf->use_javascript_ajax) && !empty($conf->productbatch->enabled) && $object->hasbatch()) { print ''; print (empty($conf->global->STOCK_SHOW_ALL_BATCH_BY_DEFAULT) ? '(+)' : '(-)'); print '';