New: Add hidden option PRODUCT_DISABLE_CUSTOM_INFO to disable custom
info management (used for export activity only)
This commit is contained in:
parent
20ef4554e0
commit
68b54f5cac
@ -745,7 +745,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
print '<form action="fiche.php" method="post">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">'."\n";
|
||||
@ -784,8 +784,9 @@ else
|
||||
print $form->selectarray('statut_buy',$statutarray,GETPOST('statut_buy'));
|
||||
print '</td></tr>';
|
||||
|
||||
// batch number management
|
||||
if ($conf->productbatch->enabled) {
|
||||
// Batch number management
|
||||
if ($conf->productbatch->enabled)
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Batch").')</td><td colspan="3">';
|
||||
$statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"));
|
||||
print $form->selectarray('status_batch',$statutarray,GETPOST('status_batch'));
|
||||
@ -891,14 +892,17 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Customs code
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" size="10" value="'.GETPOST('customcode').'"></td>';
|
||||
// Origin country
|
||||
print '<td>'.$langs->trans("CountryOrigin").'</td><td>';
|
||||
print $form->select_country(GETPOST('country_id','int'),'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Custom code
|
||||
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" size="10" value="'.GETPOST('customcode').'"></td>';
|
||||
// Origin country
|
||||
print '<td>'.$langs->trans("CountryOrigin").'</td><td>';
|
||||
print $form->select_country(GETPOST('country_id','int'),'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => 3);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
@ -1156,14 +1160,17 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Customs code
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" size="10" value="'.$object->customcode.'"></td>';
|
||||
// Origin country
|
||||
print '<td>'.$langs->trans("CountryOrigin").'</td><td>';
|
||||
print $form->select_country($object->country_id,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Custom code
|
||||
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" size="10" value="'.$object->customcode.'"></td>';
|
||||
// Origin country
|
||||
print '<td>'.$langs->trans("CountryOrigin").'</td><td>';
|
||||
print $form->select_country($object->country_id,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="2"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
@ -1236,10 +1243,11 @@ else
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$object->libelle.'</td>';
|
||||
|
||||
$nblignes=8;
|
||||
$nblignes=7;
|
||||
if (! empty($conf->produit->enabled) && ! empty($conf->service->enabled)) $nblignes++;
|
||||
if ($showbarcode) $nblignes+=2;
|
||||
if ($object->type!=1) $nblignes++;
|
||||
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) $nblignes+=2;
|
||||
if ($object->isservice()) $nblignes++;
|
||||
else $nblignes+=4;
|
||||
|
||||
@ -1425,12 +1433,15 @@ else
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Customs code
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td colspan="2">'.$object->customcode.'</td>';
|
||||
|
||||
// Origin country code
|
||||
print '<tr><td>'.$langs->trans("CountryOrigin").'</td><td colspan="2">'.getCountry($object->country_id,0,$db).'</td>';
|
||||
|
||||
// Custom code
|
||||
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td colspan="2">'.$object->customcode.'</td>';
|
||||
|
||||
// Origin country code
|
||||
print '<tr><td>'.$langs->trans("CountryOrigin").'</td><td colspan="2">'.getCountry($object->country_id,0,$db).'</td>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="'.(2+(($showphoto||$showbarcode)?1:0)).'"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
Loading…
Reference in New Issue
Block a user