diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index cdb55c66049..43064277dca 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3550,7 +3550,7 @@ class Form $return = ''; - $return .= ''; $options = array( 'HT'=>$langs->trans("HT"), 'TTC'=>$langs->trans("TTC") diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c40daaca6c9..59037d18525 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8372,6 +8372,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u } $class = 'btnTitle'; + // hidden conf keep during button transition TODO: remove this block if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) { $class = 'butActionNew'; @@ -8446,10 +8447,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $tag = (empty($attr['href']) ? 'span' : 'a'); - $button = '<'.$tag.' '.$compiledAttributes.' >'; $button .= ''; - $button .= ''.$label.''; + $button .= ''.$label.''; $button .= ''; // hidden conf keep during button transition TODO: remove this block diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 30032c927cc..48498ac82f7 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1023,7 +1023,9 @@ else require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; $formbarcode = new FormBarCode($db); print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1); - print ''.$langs->trans("BarcodeValue").''; + print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''.$langs->trans("BarcodeValue").''; $tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode; if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); print ''; @@ -1052,10 +1054,13 @@ else print ''; print ''; print ''; + print ''; + // Stock min level print ''.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).''; print ''; print ''; + if ($conf->browser->layout == 'phone') print ''; // Stock desired level print ''.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).''; print ''; @@ -1094,9 +1099,9 @@ else if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { print ''.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; - print ' x '; - print ' x '; - print ''; + print ' x '; + print ' x '; + print ''; print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ?GETPOST('size_units', 'alpha') : '0', 0, 2); print ''; } @@ -1140,8 +1145,10 @@ else if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) { print ''.$langs->trans("CustomCode").''; + if ($conf->browser->layout == 'phone') print ''; // Origin country - print ''.$langs->trans("CountryOrigin").''; + print ''.$langs->trans("CountryOrigin").''; + print ''; print $form->select_country(GETPOST('country_id', 'int'), 'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 0e439e03052..05cc5752777 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -481,19 +481,21 @@ if ($resql) $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $newcardbutton = ''; - $rightskey = 'produit'; - if ($type == Product::TYPE_SERVICE) $rightskey = 'service'; - if ($user->rights->{$rightskey}->creer) + if ($type === "") $perm = ($user->rights->produit->creer || $user->rights->service->creer); + elseif ($type == Product::TYPE_SERVICE) $perm = $user->rights->service->creer; + elseif ($type == Product::TYPE_PRODUCT) $perm = $user->rights->produit->creer; + if ($perm) { $oldtype = $type; - + $params = array(); + if ($type === "") $params['forcenohideoftext']=1; if ($type === "") { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0'); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', 1, $params); $type = Product::TYPE_SERVICE; } $label = 'NewProduct'; if ($type == Product::TYPE_SERVICE) $label = 'NewService'; - $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type); + $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', 1, $params); $type = $oldtype; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 73b0da9323c..975c2a6a0e3 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5951,17 +5951,9 @@ div.tabsElem a.tab { font-size: 12px; } - .text-plus-circle { - display: none; - } - table.table-fiche-title .col-title div.titre{ line-height: unset; } - - .btnTitle-label { - display: none; - } }