mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 22:41:30 +01:00
Fixing style errors.
This commit is contained in:
@@ -114,14 +114,12 @@ if (!empty($user->socid)) {
|
|||||||
|
|
||||||
// Load object modCodeProduct
|
// Load object modCodeProduct
|
||||||
$module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard');
|
$module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard');
|
||||||
if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php')
|
if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') {
|
||||||
{
|
$module = substr($module, 0, dol_strlen($module) - 4);
|
||||||
$module = substr($module, 0, dol_strlen($module) - 4);
|
|
||||||
}
|
}
|
||||||
$result = dol_include_once('/core/modules/product/'.$module.'.php');
|
$result = dol_include_once('/core/modules/product/'.$module.'.php');
|
||||||
if ($result > 0)
|
if ($result > 0) {
|
||||||
{
|
$modCodeProduct = new $module();
|
||||||
$modCodeProduct = new $module();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
@@ -259,11 +257,11 @@ if (empty($reshook)) {
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (empty($ref)) {
|
if (empty($ref)) {
|
||||||
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
||||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors');
|
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors');
|
||||||
$action = "create";
|
$action = "create";
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($duration_value) && empty($duration_unit)) {
|
if (!empty($duration_value) && empty($duration_unit)) {
|
||||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Unit')), null, 'errors');
|
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Unit')), null, 'errors');
|
||||||
@@ -1100,17 +1098,17 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
$tmpcode = '';
|
$tmpcode = '';
|
||||||
if (!empty($modCodeProduct->code_auto)) {
|
if (!empty($modCodeProduct->code_auto)) {
|
||||||
$tmpcode = $modCodeProduct->getNextValue($object, $type);
|
$tmpcode = $modCodeProduct->getNextValue($object, $type);
|
||||||
}
|
}
|
||||||
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOSTISSET('ref') ? GETPOST('ref', 'alphanohtml') : $tmpcode).'">';
|
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOSTISSET('ref') ? GETPOST('ref', 'alphanohtml') : $tmpcode).'">';
|
||||||
if ($refalreadyexists) {
|
if ($refalreadyexists) {
|
||||||
print $langs->trans("RefAlreadyExists");
|
print $langs->trans("RefAlreadyExists");
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
|
|||||||
Reference in New Issue
Block a user