From ad84aaacc6df575388b6d6d9aca684349f8422e5 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 14 Sep 2020 09:01:11 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/product/card.php | 95 ++++++++++++-------------- htdocs/product/class/product.class.php | 4 +- 2 files changed, 47 insertions(+), 52 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 748eb4414ab..27178de88f9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -397,8 +397,8 @@ if (empty($reshook)) $object->note = $object->note_private; } $object->customcode = GETPOST('customcode', 'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->state_id = GETPOST('state_id', 'int'); + $object->country_id = GETPOST('country_id', 'int'); + $object->state_id = GETPOST('state_id', 'int'); $object->status = GETPOST('statut', 'int'); $object->status_buy = GETPOST('statut_buy', 'int'); $object->status_batch = GETPOST('status_batch', 'aZ09'); @@ -868,7 +868,7 @@ llxHeader('', $title, $helpurl); $form = new Form($db); $formfile = new FormFile($db); -$formproduct = new FormProduct($db); +$formproduct = new FormProduct($db); $formcompany = new FormCompany($db); if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); @@ -903,18 +903,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates $objcanvas->display_canvas($action); // Show template -} else { - +} else { // ----------------------------------------- // When used in standard mode // ----------------------------------------- if ($action == 'create' && $usercancreate) { - //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - -print ''."\n"; - - // We set country_id, country_code and country for the selected country - $object->country_id = GETPOST('country_id') ? GETPOST('country_id') : $object->country_id; - if ($object->country_id) - { - $tmparray = getCountry($object->country_id, 'all'); - $object->country_code = $tmparray['code']; - $object->country = $tmparray['label']; - } - - + + // We set country_id, country_code and country for the selected country + $object->country_id = GETPOST('country_id') ? GETPOST('country_id') : $object->country_id; + if ($object->country_id) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } + + $type = $langs->trans('Product'); if ($object->isService()) $type = $langs->trans('Service'); //print load_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), ""); @@ -1411,7 +1406,7 @@ print '