remove fieldlabel and add fieldeditkey
This commit is contained in:
parent
461bd76f70
commit
f29ee25ea7
@ -1687,7 +1687,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
if (! empty($conf->multicurrency->enabled))
|
if (! empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
|
print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>';
|
||||||
print '<td class="maxwidthonsmartphone">';
|
print '<td class="maxwidthonsmartphone">';
|
||||||
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
|
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -2074,13 +2074,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer && $object->statut == Commande::STATUS_DRAFT;
|
||||||
print $langs->trans('Date');
|
print $form->editfieldkey("Date", 'date', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
if ($action != 'editdate' && $object->brouillon)
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate&id=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editdate') {
|
if ($action == 'editdate') {
|
||||||
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||||
@ -2100,12 +2095,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Delivery date planed
|
// Delivery date planed
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer && $object->statut == Commande::STATUS_DRAFT;
|
||||||
print $langs->trans('DateDeliveryPlanned');
|
print $form->editfieldkey("DateDeliveryPlanned", 'date_livraison', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editdate_livraison')
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate_livraison&id=' . $object->id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editdate_livraison') {
|
if ($action == 'editdate_livraison') {
|
||||||
print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||||
@ -2125,13 +2116,9 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Shipping Method
|
// Shipping Method
|
||||||
if (! empty($conf->expedition->enabled)) {
|
if (! empty($conf->expedition->enabled)) {
|
||||||
print '<tr><td height="10">';
|
print '<tr><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('SendingMethod');
|
print $form->editfieldkey("SendingMethod", 'shippingmethod', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editshippingmethod' && $user->rights->commande->creer)
|
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'),1).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editshippingmethod') {
|
if ($action == 'editshippingmethod') {
|
||||||
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
|
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
|
||||||
@ -2144,15 +2131,12 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Warehouse
|
// Warehouse
|
||||||
if (! empty($conf->expedition->enabled) && ! empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
if (! empty($conf->expedition->enabled) && ! empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
||||||
|
$langs->load('stocks');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||||
$formproduct=new FormProduct($db);
|
$formproduct=new FormProduct($db);
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('Warehouse');
|
print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editwarehouse' && $user->rights->commande->creer)
|
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editwarehouse&id='.$object->id.'">'.img_edit($langs->trans('SetWarehouse'),1).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editwarehouse') {
|
if ($action == 'editwarehouse') {
|
||||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
|
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
|
||||||
@ -2165,12 +2149,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Terms of payment
|
// Terms of payment
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('PaymentConditionsShort');
|
print $form->editfieldkey("PaymentConditionsShort", 'conditions', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editconditions')
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&id=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editconditions') {
|
if ($action == 'editconditions') {
|
||||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1);
|
$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1);
|
||||||
@ -2183,12 +2163,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Mode of payment
|
// Mode of payment
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('PaymentMode');
|
print $form->editfieldkey("PaymentMode", 'mode', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editmode')
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editmode') {
|
if ($action == 'editmode') {
|
||||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
|
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
|
||||||
@ -2203,12 +2179,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
// Multicurrency code
|
// Multicurrency code
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer && $object->statut == Commande::STATUS_DRAFT;
|
||||||
print fieldLabel('Currency','multicurrency_code');
|
print $form->editfieldkey("Currency", 'multicurrencycode', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editmulticurrencycode') {
|
if ($action == 'editmulticurrencycode') {
|
||||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code');
|
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code');
|
||||||
@ -2220,12 +2192,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
// Multicurrency rate
|
// Multicurrency rate
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $object->statut == Commande::STATUS_DRAFT;
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print $form->editfieldkey("CurrencyRate", 'multicurrencyrate', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
||||||
if($action == 'actualizemulticurrencyrate') {
|
if($action == 'actualizemulticurrencyrate') {
|
||||||
@ -2244,13 +2212,9 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delivery delay
|
// Delivery delay
|
||||||
print '<tr class="fielddeliverydelay"><td height="10">';
|
print '<tr class="fielddeliverydelay"><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('AvailabilityPeriod');
|
print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editavailability')
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editavailability') {
|
if ($action == 'editavailability') {
|
||||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
|
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
|
||||||
@ -2260,13 +2224,9 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Source reason (why we have an ordrer)
|
// Source reason (why we have an ordrer)
|
||||||
print '<tr><td height="10">';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('Channel');
|
print $form->editfieldkey("Channel", 'demandreason', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editdemandreason')
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editdemandreason') {
|
if ($action == 'editdemandreason') {
|
||||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||||
@ -2277,13 +2237,9 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// TODO Order mode (how we receive order). Not yet implemented
|
// TODO Order mode (how we receive order). Not yet implemented
|
||||||
/*
|
/*
|
||||||
print '<tr><td height="10">';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('SourceMode');
|
print $form->editfieldkey("SourceMode", 'inputmode', '', $object, $editenable);
|
||||||
print '</td>';
|
|
||||||
if ($action != 'editinputmode')
|
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editinputmode&id=' . $object->id . '">' . img_edit($langs->trans('SetInputMode'), 1) . '</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editinputmode') {
|
if ($action == 'editinputmode') {
|
||||||
$form->formInputMode($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->source, 'input_mode_id', 1);
|
$form->formInputMode($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->source, 'input_mode_id', 1);
|
||||||
@ -2296,15 +2252,13 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
$tmparray=$object->getTotalWeightVolume();
|
$tmparray=$object->getTotalWeightVolume();
|
||||||
$totalWeight=$tmparray['weight'];
|
$totalWeight=$tmparray['weight'];
|
||||||
$totalVolume=$tmparray['volume'];
|
$totalVolume=$tmparray['volume'];
|
||||||
if ($totalWeight)
|
if ($totalWeight) {
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no');
|
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
if ($totalVolume)
|
if ($totalVolume) {
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
|
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
|
||||||
@ -2314,15 +2268,10 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
// TODO How record was recorded OrderMode (llx_c_input_method)
|
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled))
|
if (!empty($conf->incoterm->enabled)) {
|
||||||
{
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
$editenable = $user->rights->commande->creer;
|
||||||
print $langs->trans('IncotermLabel');
|
print $form->editfieldkey("IncotermLabel", 'incoterm', '', $object, $editenable);
|
||||||
print '<td><td align="right">';
|
|
||||||
if ($user->rights->commande->creer) print '<a href="'.DOL_URL_ROOT.'/commande/card.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
|
|
||||||
else print ' ';
|
|
||||||
print '</td></tr></table>';
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($action != 'editincoterm')
|
if ($action != 'editincoterm')
|
||||||
@ -2337,15 +2286,10 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bank Account
|
// Bank Account
|
||||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled))
|
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) {
|
||||||
{
|
print '<tr><td>';
|
||||||
print '<tr><td class="nowrap">';
|
$editenable = $user->rights->commande->creer;
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
print $form->editfieldkey("BankAccount", 'bankaccount', '', $object, $editenable);
|
||||||
print $langs->trans('BankAccount');
|
|
||||||
print '<td>';
|
|
||||||
if ($action != 'editbankaccount' && $user->rights->commande->creer)
|
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editbankaccount') {
|
if ($action == 'editbankaccount') {
|
||||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
|
$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1);
|
||||||
@ -2446,12 +2390,11 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
*/
|
*/
|
||||||
$result = $object->getLinesArray();
|
$result = $object->getLinesArray();
|
||||||
|
|
||||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
print '<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
||||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
|
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
|
||||||
<input type="hidden" name="mode" value="">
|
<input type="hidden" name="mode" value="">
|
||||||
<input type="hidden" name="id" value="' . $object->id . '">
|
<input type="hidden" name="id" value="' . $object->id . '">';
|
||||||
';
|
|
||||||
|
|
||||||
if (! empty($conf->use_javascript_ajax) && $object->statut == Commande::STATUS_DRAFT) {
|
if (! empty($conf->use_javascript_ajax) && $object->statut == Commande::STATUS_DRAFT) {
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
|
||||||
@ -2518,10 +2461,11 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?id=' . $object->id . '&action=modif">' . $langs->trans('Modify') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?id=' . $object->id . '&action=modif">' . $langs->trans('Modify') . '</a></div>';
|
||||||
}
|
}
|
||||||
// Create event
|
// Create event
|
||||||
/*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a
|
/*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD))
|
||||||
// "workflow" action so should appears somewhere else on
|
|
||||||
// page.
|
|
||||||
{
|
{
|
||||||
|
// Add hidden condition because this is not a
|
||||||
|
// "workflow" action so should appears somewhere else on
|
||||||
|
// page.
|
||||||
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a>';
|
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a>';
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($object) || ! is_object($object))
|
if (empty($object) || ! is_object($object)) {
|
||||||
{
|
|
||||||
print "Error, template page can't be called as URL";
|
print "Error, template page can't be called as URL";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user