';
print '
'.$langs->trans("ThirdParty").' ';
if ($mode == 'customer') $filter='s.client in (1,2,3)';
if ($mode == 'supplier') $filter='s.fournisseur = 1';
- print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1);
+ print Form::selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1);
print ' ';
// User
print '
'.$langs->trans("CreatedBy").' ';
@@ -251,7 +251,7 @@ print '';
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear;
arsort($arrayyears);
- print $form->selectarray('year',$arrayyears,$year,0);
+ print Form::selectarray('year',$arrayyears,$year,0);
print '
';
print '
';
print '';
diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php
index b8a5779c708..fc99b8e747f 100644
--- a/htdocs/compta/journal/purchasesjournal.php
+++ b/htdocs/compta/journal/purchasesjournal.php
@@ -92,7 +92,7 @@ $builddate=time();
$description=$langs->trans("DescPurchasesJournal").'
';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
else $description.= $langs->trans("DepositsAreIncluded");
-$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php
index 0cbd5068077..30e0aa69a75 100644
--- a/htdocs/compta/journal/sellsjournal.php
+++ b/htdocs/compta/journal/sellsjournal.php
@@ -96,7 +96,7 @@ $builddate=time();
$description=$langs->trans("DescSellsJournal").'
';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
else $description.= $langs->trans("DepositsAreIncluded");
-$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php
index 566a2ff53cc..11f7e154f0a 100644
--- a/htdocs/compta/localtax/card.php
+++ b/htdocs/compta/localtax/card.php
@@ -164,11 +164,11 @@ if ($_GET["action"] == 'create')
print "
";
print ''.$langs->trans("DatePayment").' ';
- print $form->select_date($datep,"datep",'','','','add');
+ print Form::select_date($datep,"datep",'','','','add');
print ' ';
print '
'.$langs->trans("DateValue").' ';
- print $form->select_date($datev,"datev",'','','','add');
+ print Form::select_date($datev,"datev",'','','','add');
print ' ';
// Label
diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php
index ac30e529839..f2836dcb1ce 100644
--- a/htdocs/compta/localtax/clients.php
+++ b/htdocs/compta/localtax/clients.php
@@ -111,7 +111,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
$description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
@@ -129,7 +129,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$langs->trans("CalcModeLT2Debt");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
$description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php
index 7c1e99b3537..6cdc56baef5 100644
--- a/htdocs/compta/localtax/quadri_detail.php
+++ b/htdocs/compta/localtax/quadri_detail.php
@@ -131,7 +131,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
$nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
@@ -163,7 +163,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services
$nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode");
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index 72fd65d686b..b1abf17fe73 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -462,7 +462,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '
'.$langs->trans('Date').' ';
$datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
$datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment);
- $form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date);
+ Form::select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date);
print ' ';
print ''.$langs->trans('Comments').' ';
@@ -773,7 +773,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$text.='
'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed");
print '
';
}
- print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice);
+ print Form::formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice);
}
print "\n";
diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index 0f03eb8ae47..42370682f4b 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -185,7 +185,7 @@ dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), 0, 'pa
*/
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
+ print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
}
@@ -195,7 +195,7 @@ if ($action == 'delete')
if ($action == 'valide')
{
$facid = $_GET['facid'];
- print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
+ print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
}
@@ -206,12 +206,12 @@ $linkback = '
' . $langs-
// Ref
print ''.$langs->trans('Ref').' ';
-print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
+print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
print ' ';
// Date payment
-print ''.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).' ';
-print $form->editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded'));
+print ' '.Form::editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).' ';
+print Form::editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded'));
print ' ';
// Payment type (VIR, LIQ, ...)
@@ -219,16 +219,16 @@ $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$obje
print ''.$langs->trans('PaymentMode').' '.$labeltype.' ';
// Payment numero
-print ''.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).' ';
-print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
+print ' '.Form::editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).' ';
+print Form::editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
print ' ';
// Amount
print ''.$langs->trans('Amount').' '.price($object->montant,'',$langs,0,0,-1,$conf->currency).' ';
// Note
-print ''.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).' ';
-print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea');
+print ' '.Form::editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).' ';
+print Form::editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea');
print ' ';
$disable_delete = 0;
diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php
index fba7a9044fa..8c4b478abd2 100644
--- a/htdocs/compta/paiement/cheque/card.php
+++ b/htdocs/compta/paiement/cheque/card.php
@@ -339,7 +339,7 @@ else
*/
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
+ print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
}
@@ -348,7 +348,7 @@ else
*/
if ($action == 'valide')
{
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
+ print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
}
@@ -361,7 +361,7 @@ else
array('type' => 'hidden','name' => 'bankid','value' => GETPOST('lineid')),
array('type' => 'date','name' => 'rejectdate_','label' => $langs->trans("RejectCheckDate"),'value' => dol_now())
);
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1);
+ print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1);
}
}
@@ -387,7 +387,7 @@ if ($action == 'new')
//print ''.$langs->trans('Date').' '.dol_print_date($now,'day').' ';
// Filter
print ''.$langs->trans("DateChequeReceived").' ';
- print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1);
+ print Form::select_date($filterdate,'fd',0,0,1,'',1,1,1);
print ' ';
print ''.$langs->trans("BankAccount").' ';
$form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1);
@@ -582,7 +582,7 @@ else
}
else
{
- print $form->showrefnav($object,'ref',$linkback, 1, 'number');
+ print Form::showrefnav($object,'ref',$linkback, 1, 'number');
}
print ' ';
@@ -601,7 +601,7 @@ else
print '';
}
diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php
index 5b4929ae42b..ff4beea6c0e 100644
--- a/htdocs/compta/paiement/cheque/list.php
+++ b/htdocs/compta/paiement/cheque/list.php
@@ -162,7 +162,7 @@ if ($resql)
print '';
print ' ';
print '';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print " \n";
diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php
index bcca56ed645..f095e2ad577 100644
--- a/htdocs/compta/paiement/list.php
+++ b/htdocs/compta/paiement/list.php
@@ -265,7 +265,7 @@ if ($resql)
print ' ';
print '';
print ' ';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index a68f3445305..04926879739 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -209,7 +209,7 @@ if ($_GET["action"] == 'create')
print '
'.$langs->trans("Date").' ';
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0;
- $form->select_date($datepayment,'','','','',"add_payment",1,1);
+ Form::select_date($datepayment,'','','','',"add_payment",1,1);
print " ";
print '';
diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php
index ad59687b43c..a621a008f1b 100644
--- a/htdocs/compta/payment_sc/card.php
+++ b/htdocs/compta/payment_sc/card.php
@@ -144,7 +144,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0,
*/
if ($action == 'delete')
{
- print $form->formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
+ print Form::formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
}
@@ -154,7 +154,7 @@ if ($action == 'delete')
if ($action == 'valide')
{
$facid = $_GET['facid'];
- print $form->formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
+ print Form::formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
}
@@ -164,7 +164,7 @@ print '
';
// Ref
print ''.$langs->trans('Ref').' ';
print '';
-print $form->showrefnav($paiement,'id','',1,'rowid','id');
+print Form::showrefnav($paiement,'id','',1,'rowid','id');
print ' ';
// Date
diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php
index 9dd841e0add..f9d35b00937 100644
--- a/htdocs/compta/prelevement/card.php
+++ b/htdocs/compta/prelevement/card.php
@@ -156,7 +156,7 @@ if ($id > 0)
/*if ($action == 'credite')
{
- print $form->formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
+ print Form::formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
}*/
@@ -214,10 +214,10 @@ if ($id > 0)
print '';
print ''.$langs->trans("NotifyTransmision").' ';
print ''.$langs->trans("TransData").' ';
- print $form->select_date('','','','','',"userfile",1,1);
+ print Form::select_date('','','','','',"userfile",1,1);
print ' ';
print ''.$langs->trans("TransMetod").' ';
- print $form->selectarray("methode",$bon->methodes_trans);
+ print Form::selectarray("methode",$bon->methodes_trans);
print ' ';
/* print ''.$langs->trans("File").' ';
print ' ';
@@ -237,7 +237,7 @@ if ($id > 0)
print ' ';
print ''.$langs->trans("NotifyCredit").' ';
print ''.$langs->trans('CreditDate').' ';
- print $form->select_date('','','','','',"infocredit",1,1);
+ print Form::select_date('','','','','',"infocredit",1,1);
print ' ';
print '
';
print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice");
diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php
index d43ba27ef26..13e54e0e2d3 100644
--- a/htdocs/compta/prelevement/ligne.php
+++ b/htdocs/compta/prelevement/ligne.php
@@ -193,25 +193,25 @@ if ($id)
//Select yes/no
print '
'.$langs->trans("WithdrawalRefusedConfirm").' '.$soc->name.' ? ';
print '';
- print $form->selectyesno("confirm",1,0);
+ print Form::selectyesno("confirm",1,0);
print ' ';
//Date
print '
'.$langs->trans("RefusedData").' ';
print '';
- print $form->select_date('','','','','',"confirm_rejet");
+ print Form::select_date('','','','','',"confirm_rejet");
print ' ';
//Reason
print '
'.$langs->trans("RefusedReason").' ';
print '';
- print $form->selectarray("motif", $rej->motifs);
+ print Form::selectarray("motif", $rej->motifs);
print ' ';
//Facturer
print '
'.$langs->trans("RefusedInvoicing").' ';
print '';
- print $form->selectarray("facturer", $rej->facturer);
+ print Form::selectarray("facturer", $rej->facturer);
print ' ';
print '
';
diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php
index e7cef1a50ad..148052aa000 100644
--- a/htdocs/compta/prelevement/list.php
+++ b/htdocs/compta/prelevement/list.php
@@ -137,7 +137,7 @@ if ($result)
print '
';
print '
';
print '
';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print '';
diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index 4286c6a8453..8d7364af048 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -125,7 +125,7 @@ if ($modecompta=="CREANCES-DETTES")
$name=$langs->trans("AnnualByCompaniesDueDebtMode");
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'
0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='
'.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesResultDue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
@@ -137,8 +137,8 @@ else {
$name=$langs->trans("AnnualByCompaniesInputOutputMode");
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'
0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">',' ').')';
- //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ //$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',1,1,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='
'.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesResultInOut");
$builddate=time();
diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php
index 4a8dc21ca1b..e2bb44c31d8 100644
--- a/htdocs/compta/salaries/card.php
+++ b/htdocs/compta/salaries/card.php
@@ -239,13 +239,13 @@ if ($action == 'create')
// Date payment
print '
';
print fieldLabel('DatePayment','datep',1).' ';
- print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
+ print Form::select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
print ' ';
// Date value for bank
print '
';
print fieldLabel('DateValue','datev',0).' ';
- print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
+ print Form::select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
print ' ';
// Employee
@@ -263,13 +263,13 @@ if ($action == 'create')
// Date start period
print '
';
print fieldLabel('DateStartPeriod','datesp',1).' ';
- print $form->select_date($datesp,"datesp",'','','','add');
+ print Form::select_date($datesp,"datesp",'','','','add');
print ' ';
// Date end period
print '
';
print fieldLabel('DateEndPeriod','dateep',1).' ';
- print $form->select_date($dateep,"dateep",'','','','add');
+ print Form::select_date($dateep,"dateep",'','','','add');
print ' ';
// Amount
@@ -340,7 +340,7 @@ if ($id)
print "
";
print ''.$langs->trans("Ref").' ';
- print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
+ print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print ' ';
// Employee
diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php
index 7e015a4ad2e..7f89d9967c2 100644
--- a/htdocs/compta/salaries/document.php
+++ b/htdocs/compta/salaries/document.php
@@ -108,7 +108,7 @@ if ($object->id)
// Ref
print '
'.$langs->trans("Ref").' ';
- print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
+ print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print ' ';
// Societe
diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php
index b0584d62850..33218b00f02 100644
--- a/htdocs/compta/salaries/index.php
+++ b/htdocs/compta/salaries/index.php
@@ -176,7 +176,7 @@ if ($result)
print '
';
print '
';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print "\n";
diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php
index 2a9894be87a..53d12229f97 100644
--- a/htdocs/compta/sociales/charges.php
+++ b/htdocs/compta/sociales/charges.php
@@ -270,7 +270,7 @@ if ($action == 'create')
print $langs->trans("PeriodEndDate");
print '';
print '
';
- print $form->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1);
+ print Form::select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1);
print ' ';
print '';
// Amount
@@ -286,7 +286,7 @@ if ($action == 'create')
print $langs->trans("DateDue");
print '';
print '
';
- print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1);
+ print Form::select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1);
print ' ';
print "\n";
@@ -325,20 +325,20 @@ if ($id > 0)
);
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes');
+ print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes');
}
// Confirmation de la suppression de la charge
if ($action == 'paid')
{
$text=$langs->trans('ConfirmPaySocialContribution');
- print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2);
+ print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2);
}
if ($action == 'delete')
{
$text=$langs->trans('ConfirmDeleteSocialContribution');
- print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2);
+ print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2);
}
if ($action == 'edit')
@@ -351,7 +351,7 @@ if ($id > 0)
// Ref
print '
'.$langs->trans("Ref").' ';
- print $form->showrefnav($object,'id');
+ print Form::showrefnav($object,'id');
print " ";
// Label
@@ -443,7 +443,7 @@ if ($id > 0)
print "
";
if ($action == 'edit')
{
- print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1);
+ print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1);
}
else
{
@@ -455,7 +455,7 @@ if ($id > 0)
if ($action == 'edit')
{
print ' '.$langs->trans("DateDue")." ";
- print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
+ print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
print " ";
}
else {
diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php
index f87791dfed9..6bc9fe14f9d 100644
--- a/htdocs/compta/sociales/document.php
+++ b/htdocs/compta/sociales/document.php
@@ -107,7 +107,7 @@ if ($object->id)
// Ref
print '
'.$langs->trans("Ref").' ';
- print $form->showrefnav($object,'id');
+ print Form::showrefnav($object,'id');
print " ";
// Label
@@ -130,7 +130,7 @@ if ($object->id)
print "
";
if ($action == 'edit')
{
- print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1);
+ print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1);
}
else
{
@@ -143,7 +143,7 @@ if ($object->id)
if ($action == 'edit')
{
print ' '.$langs->trans("DateDue")." ";
- print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
+ print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
print " ";
}
else {
diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php
index 3133022b9e6..d33d3ea2414 100644
--- a/htdocs/compta/sociales/index.php
+++ b/htdocs/compta/sociales/index.php
@@ -205,7 +205,7 @@ if ($resql)
print '
';
print '
';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print "\n";
diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php
index e995b06aa6b..910bc6e16e6 100644
--- a/htdocs/compta/stats/cabyprodserv.php
+++ b/htdocs/compta/stats/cabyprodserv.php
@@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") {
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
@@ -164,7 +164,7 @@ if ($modecompta=="CREANCES-DETTES") {
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");
diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php
index cb8151cf33c..cbcbb4d860d 100644
--- a/htdocs/compta/stats/cabyuser.php
+++ b/htdocs/compta/stats/cabyuser.php
@@ -139,7 +139,7 @@ if ($modecompta=="CREANCES-DETTES") {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="
".img_previous()." ".img_next()." ";
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
@@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="
".img_previous()." ".img_next()." ";
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");
diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php
index dade07fd0e3..41da09ed290 100644
--- a/htdocs/compta/stats/casoc.php
+++ b/htdocs/compta/stats/casoc.php
@@ -155,7 +155,7 @@ if ($modecompta=="CREANCES-DETTES")
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$calcmode=$langs->trans("CalcModeDebt");
$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='
'.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesCADue");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
@@ -166,7 +166,7 @@ if ($modecompta=="CREANCES-DETTES")
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$calcmode=$langs->trans("CalcModeEngagement");
$calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink='
'.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesCAIn");
$description.= $langs->trans("DepositsAreIncluded");
diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php
index f7d8361b8ff..6c6d22be491 100644
--- a/htdocs/compta/tva/card.php
+++ b/htdocs/compta/tva/card.php
@@ -234,11 +234,11 @@ if ($action == 'create')
print "
";
print ''.$langs->trans("DatePayment").' ';
- print $form->select_date($datep,"datep",'','','','add',1,1);
+ print Form::select_date($datep,"datep",'','','','add',1,1);
print ' ';
print '
'.$langs->trans("DateValue").' ';
- print $form->select_date($datev,"datev",'','','','add',1,1);
+ print Form::select_date($datev,"datev",'','','','add',1,1);
print ' ';
// Label
diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php
index b0d7a9bce30..dcf6d284490 100644
--- a/htdocs/compta/tva/clients.php
+++ b/htdocs/compta/tva/clients.php
@@ -140,7 +140,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
//$name.='
('.$langs->trans("SeeVATReportInInputOutputMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"
".img_previous()." ".img_next()." ":"");
$description=$langs->trans("RulesVATDueServices");
$description.='
';
@@ -183,7 +183,7 @@ if ($modetax==0) { // Invoice for goods, payment for services
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
//$name.='
('.$langs->trans("SeeVATReportInDueDebtMode",'
',' ').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"
".img_previous()." ".img_next()." ":"");
$description=$langs->trans("RulesVATInServices");
$description.=' '.$langs->trans("DepositsAreIncluded");
diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php
index e04530a9dc7..500739c18fb 100644
--- a/htdocs/compta/tva/quadri_detail.php
+++ b/htdocs/compta/tva/quadri_detail.php
@@ -130,7 +130,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
@@ -165,7 +165,7 @@ if ($modetax==0) // Invoice for goods, payment for services
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php
index 61d019894e8..a4cfedca663 100644
--- a/htdocs/compta/tva/quarter_report.php
+++ b/htdocs/compta/tva/quarter_report.php
@@ -149,7 +149,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
$calcmode=$langs->trans("CalcModeVATDebt");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) {
$prevquarter--;
@@ -198,7 +198,7 @@ if ($modetax==0) { // Invoice for goods, payment for services
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
$calcmode=$langs->trans("CalcModeVATEngagement");
$calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
- $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) {
$prevquarter--;
diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php
index 9615bec99f1..1eeba95d634 100644
--- a/htdocs/compta/tva/reglement.php
+++ b/htdocs/compta/tva/reglement.php
@@ -172,7 +172,7 @@ if ($result)
print '
';
print '
';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print "\n";
diff --git a/htdocs/compta/ventilation/card.php b/htdocs/compta/ventilation/card.php
index 59ed7fe9cde..1dc2925bd57 100644
--- a/htdocs/compta/ventilation/card.php
+++ b/htdocs/compta/ventilation/card.php
@@ -129,7 +129,7 @@ if($_GET["id"])
if($objp->fk_code_ventilation == 0)
{
- print $form->selectarray("codeventil",$cgs, $objp->fk_code_ventilation);
+ print Form::selectarray("codeventil",$cgs, $objp->fk_code_ventilation);
}
else
{
diff --git a/htdocs/compta/ventilation/fournisseur/card.php b/htdocs/compta/ventilation/fournisseur/card.php
index dc376de7c06..0542bd7c68b 100644
--- a/htdocs/compta/ventilation/fournisseur/card.php
+++ b/htdocs/compta/ventilation/fournisseur/card.php
@@ -113,7 +113,7 @@ if($_GET["id"])
if($objp->fk_code_ventilation == 0)
{
- print $form->selectarray("codeventil",$cgs, $objp->fk_code_ventilation);
+ print Form::selectarray("codeventil",$cgs, $objp->fk_code_ventilation);
}
else
{
diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php
index 3d6b792d99b..bb00cd08d62 100644
--- a/htdocs/contact/canvas/actions_contactcard_common.class.php
+++ b/htdocs/contact/canvas/actions_contactcard_common.class.php
@@ -309,7 +309,7 @@ abstract class ActionsContactCardCommon
// Public or private
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
- $this->tpl['select_visibility'] = $form->selectarray('priv',$selectarray,$this->object->priv,0);
+ $this->tpl['select_visibility'] = Form::selectarray('priv',$selectarray,$this->object->priv,0);
}
if ($action == 'view' || $action == 'edit' || $action == 'delete')
@@ -364,7 +364,7 @@ abstract class ActionsContactCardCommon
if ($action == 'view' || $action == 'delete')
{
- $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id');
+ $this->tpl['showrefnav'] = Form::showrefnav($this->object,'id');
if ($this->object->socid > 0)
{
@@ -413,7 +413,7 @@ abstract class ActionsContactCardCommon
array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login),
array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password));
- $this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no');
+ $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no');
}
}
diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php
index 30a52469da2..709c1b30300 100644
--- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php
+++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php
@@ -107,7 +107,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
// Confirm delete contact
if ($action == 'delete' && $user->rights->societe->contact->supprimer)
{
- $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
+ $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
}
}
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index fca007bfd1f..0e3653c2293 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -450,7 +450,7 @@ else
{
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
+ print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
}
}
@@ -633,7 +633,7 @@ else
if (! empty($conf->mailing->enabled))
{
print '
'.$langs->trans("No_Email").' ';
- print '
'.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).' ';
+ print '
'.Form::selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).' ';
}
else
{
@@ -655,14 +655,14 @@ else
// Visibility
print '
'.$langs->trans("ContactVisibility").' ';
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
- print $form->selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0);
+ print Form::selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0);
print ' ';
// Categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
print '
' . fieldLabel( 'Categories', 'contcats' ) . ' ';
$cate_arbo = $form->select_all_categories( Categorie::TYPE_CONTACT, null, 'parent', null, null, 1 );
- print $form->multiselectarray( 'contcats', $cate_arbo, GETPOST( 'contcats', 'array' ), null, null, null,
+ print Form::multiselectarray( 'contcats', $cate_arbo, GETPOST( 'contcats', 'array' ), null, null, null,
null, '90%' );
print " ";
}
@@ -688,11 +688,11 @@ else
$form=new Form($db);
if ($object->birthday)
{
- print $form->select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1);
+ print Form::select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1);
}
else
{
- print $form->select_date('','birthday',0,0,1,"perso", 1, 0, 1);
+ print Form::select_date('','birthday',0,0,1,"perso", 1, 0, 1);
}
print '';
@@ -873,7 +873,7 @@ else
if (! empty($conf->mailing->enabled))
{
print '
'.$langs->trans("No_Email").' ';
- print '
'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).' ';
+ print '
'.Form::selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).' ';
}
else
{
@@ -891,7 +891,7 @@ else
// Visibility
print '
'.$langs->trans("ContactVisibility").' ';
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
- print $form->selectarray('priv',$selectarray,$object->priv,0);
+ print Form::selectarray('priv',$selectarray,$object->priv,0);
print ' ';
// Note Public
@@ -922,7 +922,7 @@ else
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
- print $form->multiselectarray( 'contcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%' );
+ print Form::multiselectarray( 'contcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%' );
print "";
}
@@ -980,7 +980,7 @@ else
print '
'.fieldLabel('Photo','photoinput').' ';
print '
';
if ($object->photo) {
- print $form->showphoto('contact',$object);
+ print Form::showphoto('contact',$object);
print " \n";
}
print '';
@@ -1036,7 +1036,7 @@ else
$formquestion=array(
array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login),
array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password),
- //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External')))
+ //array('label' => Form::textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External')))
);
$text=$langs->trans("ConfirmCreateContact").' ';
if (! empty($conf->societe->enabled))
@@ -1044,7 +1044,7 @@ else
if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser");
else $text.=$langs->trans("UserWillBeInternalUser");
}
- print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
+ print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
}
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index cee89d0970f..c579c7faf56 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -434,7 +434,7 @@ if ($result)
}
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
- $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
+ $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '';
@@ -553,7 +553,7 @@ if ($result)
{
print '';
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
- print $form->selectarray('search_priv',$selectarray,$search_priv,1);
+ print Form::selectarray('search_priv',$selectarray,$search_priv,1);
print ' ';
}
// Extra fields
@@ -587,7 +587,7 @@ if ($result)
if (! empty($arrayfields['p.statut']['checked']))
{
print '';
- print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
+ print Form::selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
print ' ';
}
print '';
diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php
index 8bebb6f0cfb..121dbba32bb 100644
--- a/htdocs/contact/perso.php
+++ b/htdocs/contact/perso.php
@@ -130,7 +130,7 @@ if ($action == 'edit')
// Date To Birth
print ' '.$langs->trans("DateToBirth").' ';
$form=new Form($db);
- print $form->select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1);
+ print Form::select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1);
print ' ';
print ''.$langs->trans("Alert").': ';
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index c8903d8d363..6343461e9a7 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1148,7 +1148,7 @@ if ($action == 'create')
print ' ';
print ''.$langs->trans("Date").' ';
- $form->select_date($datecontrat,'',0,0,'',"contrat");
+ Form::select_date($datecontrat,'',0,0,'',"contrat");
print " ";
// Project
@@ -1243,7 +1243,7 @@ else
*/
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1);
+ print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1);
}
@@ -1264,7 +1264,7 @@ else
$text=$langs->trans('ConfirmValidateContract',$numref);
- print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1);
+ print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1);
}
@@ -1273,7 +1273,7 @@ else
*/
if ($action == 'close')
{
- print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1);
+ print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1);
}
@@ -1294,31 +1294,31 @@ else
// Ref du contrat
if (!empty($modCodeContract->code_auto)) {
print ''.$langs->trans("Ref").' ';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
+ print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
print " ";
} else {
print '';
print '';
- print $form->editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
+ print Form::editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
print ' ';
- print $form->editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
+ print Form::editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
print ' ';
print ' ';
}
print '';
print '';
- print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
+ print Form::editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
print ' ';
- print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
+ print Form::editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
print ' ';
print ' ';
print '';
print '';
- print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
+ print Form::editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
print ' ';
- print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
+ print Form::editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
print ' ';
print ' ';
@@ -1346,9 +1346,9 @@ else
// Date
print '';
print '';
- print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer);
+ print Form::editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer);
print ' ';
- print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker');
+ print Form::editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker');
print ' ';
print ' ';
/* print ''.$langs->trans("Date").' ';
@@ -1491,7 +1491,7 @@ else
$description = ''; // Already added into main visible desc
}
- echo $form->textwithtooltip($text,$description,3,'','',$cursorline,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
+ echo Form::textwithtooltip($text,$description,3,'','',$cursorline,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
print '';
}
@@ -1651,9 +1651,9 @@ else
print "";
print '';
print $langs->trans("DateStartPlanned").' ';
- $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
+ Form::select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
print ' '.$langs->trans("DateEndPlanned").' ';
- $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
+ Form::select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
print ' ';
if (is_array($extralabelslines) && count($extralabelslines)>0) {
@@ -1691,7 +1691,7 @@ else
*/
if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid'))
{
- print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
+ print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
if ($ret == 'html') print '';
}
@@ -1711,7 +1711,7 @@ else
'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"),
array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid));
- $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion);
+ $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion);
print '';
}
@@ -1723,7 +1723,7 @@ else
$dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
$comment = GETPOST('comment');
- $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
+ $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
print '';
}
@@ -1735,7 +1735,7 @@ else
$dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
$comment = GETPOST('comment');
- $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
+ $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
print '';
}
@@ -1824,11 +1824,11 @@ else
print ' ';
print ''.$langs->trans("DateServiceActivate").' ';
- print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1);
+ print Form::select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1);
print ' ';
print ''.$langs->trans("DateEndPlanned").' ';
- print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1);
+ print Form::select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1);
print ' ';
print '';
@@ -1881,7 +1881,7 @@ else
if ($objp->statut == 4)
{
print $langs->trans("DateEndReal").' ';
- print $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1);
+ print Form::select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1);
}
}
print ' ';
@@ -2015,7 +2015,7 @@ else
$somethingshown = $formfile->show_documents('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Linked object block
- $somethingshown = $form->showLinkedObjectBlock($object);
+ $somethingshown = Form::showLinkedObjectBlock($object);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object);
diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php
index cd070f6078d..e526b840af8 100644
--- a/htdocs/contrat/contact.php
+++ b/htdocs/contrat/contact.php
@@ -143,7 +143,7 @@ if ($id > 0 || ! empty($ref))
// Reference du contrat
print ' '.$langs->trans("Ref").' ';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
+ print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
print " ";
// Customer
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index 49466c7fcb0..148abdb0ed1 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -110,7 +110,7 @@ if ($object->id)
$linkback = ''.$langs->trans("BackToList").' ';
// Reference
- print ''.$langs->trans('Ref').' '.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').' ';
+ print ''.$langs->trans('Ref').' '.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').' ';
// Societe
print ''.$langs->trans("Customer").' ';
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index df6e0007023..8b3d203b2c9 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -217,7 +217,7 @@ if ($resql)
$moreforfilter.='';
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
- $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
+ $moreforfilter.=Form::selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
$moreforfilter.='
';
}
@@ -267,7 +267,7 @@ if ($resql)
print ' ';
print ' ';
print '';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print " \n";
diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php
index 502b354ee69..be39c90de57 100644
--- a/htdocs/contrat/note.php
+++ b/htdocs/contrat/note.php
@@ -78,7 +78,7 @@ if ($id > 0 || ! empty($ref))
$linkback = ''.$langs->trans("BackToList").' ';
// Reference
- print ''.$langs->trans('Ref').' '.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').' ';
+ print ''.$langs->trans('Ref').' '.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').' ';
// Societe
print ''.$langs->trans("Customer").' ';
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index 2f1c3697058..3cf3a922b59 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -216,17 +216,17 @@ if ($resql)
print '';
print '';
$arrayofoperators=array('<'=>'<','>'=>'>');
- print $form->selectarray('filter_op1',$arrayofoperators,$filter_op1,1);
+ print Form::selectarray('filter_op1',$arrayofoperators,$filter_op1,1);
print ' ';
$filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year);
- print $form->select_date($filter_date1,'op1',0,0,1,'',1,0,1);
+ print Form::select_date($filter_date1,'op1',0,0,1,'',1,0,1);
print ' ';
print '';
$arrayofoperators=array('<'=>'<','>'=>'>');
- print $form->selectarray('filter_op2',$arrayofoperators,$filter_op2,1);
+ print Form::selectarray('filter_op2',$arrayofoperators,$filter_op2,1);
print ' ';
$filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year);
- print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1);
+ print Form::select_date($filter_date2,'op2',0,0,1,'',1,0,1);
print ' ';
print '';
$arrayofstatus=array(
@@ -236,10 +236,10 @@ if ($resql)
'4&filter=expired'=>$langs->trans("ServiceStatusLate"),
'5'=>$langs->trans("ServiceStatusClosed")
);
- print $form->selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1);
+ print Form::selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1);
print ' ';
print '';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print " \n";
diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php
index 997e27adb20..3a0c6d05ff4 100644
--- a/htdocs/core/ajax/ajaxdirpreview.php
+++ b/htdocs/core/ajax/ajaxdirpreview.php
@@ -241,7 +241,7 @@ if ($section)
$useglobalvars=1;
$form = new Form($db);
$formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'));
- print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));
+ print Form::formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));
}
if ($useajax)
diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php
index 8b9102a799f..144245f8aa4 100644
--- a/htdocs/core/ajax/ajaxdirtree.php
+++ b/htdocs/core/ajax/ajaxdirtree.php
@@ -194,7 +194,7 @@ if (file_exists($fullpathselecteddir))
$htmltooltip.=''.$langs->trans("ECMNbOfFilesInDir").' : '.((isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0)?$val['cachenbofdoc']:$langs->trans("NeedRefresh")).' ';
if ($nboffilesinsubdir > 0) $htmltooltip.=''.$langs->trans("ECMNbOfFilesInSubDir").' : '.$nboffilesinsubdir;
else $htmltooltip.=''.$langs->trans("ECMNbOfSubDir").' : '.($nbofsubdir >= 0 ? $nbofsubdir : $langs->trans("NeedRefresh")).' ';
- print $form->textwithpicto('',$htmltooltip,1,"info");
+ print Form::textwithpicto('',$htmltooltip,1,"info");
print "";
print "
\n";
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index a65573a7947..d44230d3eb6 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3115,13 +3115,13 @@ abstract class CommonObject
* Show linked object block.
*
* @return int <0 if KO, >0 if OK
- * @deprecated 3.8 Use instead $form->showLinkedObjectBlock($object)
+ * @deprecated 3.8 Use instead Form::showLinkedObjectBlock($object)
* @see Form::showLinkedObjectBlock
*/
function showLinkedObjectBlock()
{
global $form;
- return $form->showLinkedObjectBlock($this);
+ return Form::showLinkedObjectBlock($this);
}
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 0b55e2cc814..4431b8c3336 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -30,7 +30,8 @@
/**
* Class to stock current configuration
*/
-class Conf
+class
+Conf
{
/** \public */
//! To store properties found in conf file
@@ -582,5 +583,15 @@ class Conf
if (empty($conf->loghandlers[$handler])) $this->loghandlers[$handler]=$loghandlerinstance;
}
}
+
+ public function setConstant()
+ {
+
+ }
+
+ public function getConstant()
+ {
+
+ }
}
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 97645487d45..166b6d6b41f 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -702,7 +702,7 @@ class ExtraFields
if (! is_object($form)) $form=new Form($this->db);
// TODO Must also support $moreparam
- $out = $form->select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1);
+ $out = Form::select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1);
}
elseif (in_array($type,array('int')))
{
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index d06677d97af..e17bd17861d 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -64,7 +64,7 @@ class Form
*
* @param DoliDB $db Database handler
*/
- public function __construct($db)
+ public function __construct(DoliDB $db)
{
$this->db = $db;
}
@@ -81,7 +81,7 @@ class Form
* @param string $moreparam More param to add on a href URL
* @return string HTML edit field
*/
- function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='')
+ public static function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='')
{
global $conf,$langs;
@@ -129,7 +129,7 @@ class Form
* @param string $moreparam More param to add on a href URL
* @return string HTML edit field
*/
- function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='')
+ public static function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='')
{
global $conf,$langs,$db;
@@ -141,7 +141,7 @@ class Form
// When option to edit inline is activated
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;|datehourpicker/',$typeofdata)) // TODO add jquery timepicker
{
- $ret.=$this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg);
+ $ret.= self::editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg);
}
else
{
@@ -171,11 +171,11 @@ class Form
}
else if ($typeofdata == 'day' || $typeofdata == 'datepicker')
{
- $ret.=$this->select_date($value,$htmlname,0,0,1,'form'.$htmlname,1,0,1);
+ $ret.=self::select_date($value,$htmlname,0,0,1,'form'.$htmlname,1,0,1);
}
else if ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker')
{
- $ret.=$this->select_date($value,$htmlname,1,1,1,'form'.$htmlname,1,0,1);
+ $ret.=self::select_date($value,$htmlname,1,1,1,'form'.$htmlname,1,0,1);
}
else if (preg_match('/^select;/',$typeofdata))
{
@@ -185,7 +185,7 @@ class Form
$tmp=explode(':',$val);
$arraylist[$tmp[0]]=$tmp[1];
}
- $ret.=$this->selectarray($htmlname,$arraylist,$value);
+ $ret.= Form::selectarray($htmlname,$arraylist,$value);
}
else if (preg_match('/^ckeditor/',$typeofdata))
{
@@ -253,7 +253,7 @@ class Form
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
* @return string HTML edit in place
*/
- private function editInPlace($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null)
+ private static function editInPlace($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null)
{
global $conf;
@@ -370,7 +370,7 @@ class Form
/**
* Show a text and picto with tooltip on text or picto.
- * Can be called by an instancied $form->textwithtooltip or by a static call Form::textwithtooltip
+ * Can be called by an instancied Form::textwithtooltip or by a static call Form::textwithtooltip
*
* @param string $text Text to show
* @param string $htmltext HTML content of tooltip. Must be HTML/UTF8 encoded.
@@ -384,7 +384,7 @@ class Form
* @return string Code html du tooltip (texte+picto)
* @see Use function textwithpicto if you can.
*/
- function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0)
+ public static function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0)
{
global $conf;
@@ -446,7 +446,7 @@ class Form
* @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span
* @return string HTML code of text, picto, tooltip
*/
- function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2)
+ public static function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2)
{
global $conf;
@@ -479,17 +479,17 @@ class Form
elseif ($type == 'admin') $img = img_picto($alt, 'star');
elseif ($type == 'warning') $img = img_warning($alt);
- return $this->textwithtooltip($text, $htmltext, 2, $direction, $img, $extracss, $notabs, '', $noencodehtmltext);
+ return self::textwithtooltip($text, $htmltext, 2, $direction, $img, $extracss, $notabs, '', $noencodehtmltext);
}
/**
* Generate select HTML to choose massaction
*
* @param string $selected Selected value
- * @param int $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
+ * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
* @return string Select list
*/
- function selectMassAction($selected, $arrayofaction)
+ public static function selectMassAction($selected, array $arrayofaction)
{
global $conf,$langs,$hookmanager;
@@ -3098,7 +3098,7 @@ class Form
require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php';
$bankstatic=new Account($this->db);
$bankstatic->fetch($selected);
- print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code);
+ print self::textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code);
} else {
print " ";
}
@@ -3158,27 +3158,6 @@ class Form
return $output;
}
- /**
- * Show a confirmation HTML form or AJAX popup
- *
- * @param string $page Url of page to call if confirmation is OK
- * @param string $title Title
- * @param string $question Question
- * @param string $action Action
- * @param array $formquestion An array with forms complementary inputs
- * @param string $selectedchoice "" or "no" or "yes"
- * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
- * @param int $height Force height of box
- * @param int $width Force width of box
- * @return void
- * @deprecated
- * @see formconfirm()
- */
- function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
- {
- print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width);
- }
-
/**
* Show a confirmation HTML form or AJAX popup.
* Easiest way to use this is with useajax=1.
@@ -3201,7 +3180,7 @@ class Form
* @param int $width Force width of bow
* @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
*/
- function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
+ public static function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{
global $langs,$conf;
global $useglobalvars;
@@ -3249,7 +3228,7 @@ class Form
{
$more.='';
if (! empty($input['label'])) $more.=$input['label'].' ';
- $more.=$this->selectarray($input['name'],$input['values'],$input['default'],1);
+ $more.= Form::selectarray($input['name'],$input['values'],$input['default'],1);
$more.=' '."\n";
}
else if ($input['type'] == 'checkbox')
@@ -3285,7 +3264,7 @@ class Form
{
$more.=''.$input['label'].' ';
$more.='';
- $more.=$this->select_date($input['value'],$input['name'],0,0,0,'',1,0,1);
+ $more.=self::select_date($input['value'],$input['name'],0,0,0,'',1,0,1);
$more.=' '."\n";
$formquestion[] = array('name'=>$input['name'].'day');
$formquestion[] = array('name'=>$input['name'].'month');
@@ -3441,7 +3420,7 @@ class Form
$formconfirm.= '';
$formconfirm.= ''.$question.' ';
$formconfirm.= '';
- $formconfirm.= $this->selectyesno("confirm",$newselectedchoice);
+ $formconfirm.= self::selectyesno("confirm",$newselectedchoice);
$formconfirm.= ' ';
$formconfirm.= ' ';
$formconfirm.= ' '."\n";
@@ -3637,7 +3616,7 @@ class Form
* @return void
* @see select_date
*/
- function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
+ public static function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
{
global $langs;
@@ -3650,7 +3629,7 @@ class Form
$ret.=' ';
$ret.='';
$ret.='';
- $ret.=$this->select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1);
+ $ret.=self::select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1);
$ret.=' ';
$ret.=' ';
$ret.='
';
@@ -3962,6 +3941,7 @@ class Form
* @param string $selected preselected currency code
* @param string $htmlname name of HTML select list
* @return void
+ * @deprecated use Form::selectCurrency
*/
function select_currency($selected='',$htmlname='currency_id')
{
@@ -4277,7 +4257,7 @@ class Form
* @return mixed Nothing or string if nooutput is 1
* @see form_date
*/
- function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
+ public static function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
{
global $conf,$langs;
@@ -4650,7 +4630,7 @@ class Form
* @return string HTML select string.
* @see multiselectarray
*/
- static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='')
+ public static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='')
{
global $conf, $langs;
@@ -4744,7 +4724,7 @@ class Form
* @param string $acceptdelayedhtml 1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect)
* @return string HTML select string
*/
- static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0)
+ public static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0)
{
global $langs;
global $delayedhtmlcontent;
@@ -4846,7 +4826,7 @@ class Form
* @return string HTML multiselect string
* @see selectarray
*/
- static function multiselectarray($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $morecss='', $translate=0, $width=0, $moreattrib='',$elemtype='')
+ public static function multiselectarray($htmlname, array $array, array $selected = array(), $key_in_label=0, $value_as_key=0, $morecss='', $translate=0, $width=0, $moreattrib='',$elemtype='')
{
global $conf, $langs;
@@ -4935,7 +4915,7 @@ class Form
* @return string HTML multiselect string
* @see selectarray
*/
- static function multiSelectArrayWithCheckbox($htmlname, &$array, $varpage)
+ public static function multiSelectArrayWithCheckbox($htmlname, array &$array, $varpage)
{
global $user;
@@ -5077,7 +5057,7 @@ class Form
* @param CommonObject $object Object we want to show links to
* @return int <0 if KO, >0 if OK
*/
- function showLinkedObjectBlock($object)
+ public static function showLinkedObjectBlock(CommonObject $object)
{
global $conf,$langs,$hookmanager;
global $bc;
@@ -5381,7 +5361,7 @@ class Form
* @param int $useempty 1=Add empty line
* @return mixed See option
*/
- function selectyesno($htmlname,$value='',$option=0,$disabled=false,$useempty='')
+ public static function selectyesno($htmlname,$value='',$option=0,$disabled=false,$useempty='')
{
global $langs;
@@ -5479,7 +5459,7 @@ class Form
* @param string $morehtmlright More html code to show before navigation arrows
* @return string Portion HTML avec ref + boutons nav
*/
- function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='')
+ public static function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='')
{
global $langs,$conf;
@@ -5545,11 +5525,11 @@ class Form
/**
* Return HTML code to output a barcode
*
- * @param Object $object Object containing data to retrieve file name
+ * @param object $object Object containing data to retrieve file name
* @param int $width Width of photo
* @return string HTML code to output barcode
*/
- function showbarcode(&$object,$width=100)
+ public static function showbarcode($object, $width = 100)
{
global $conf;
@@ -5585,7 +5565,7 @@ class Form
* @param int $cache 1=Accept to use image in cache
* @return string HTML code to output photo
*/
- static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0)
+ public static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0)
{
global $conf,$langs;
@@ -5824,7 +5804,7 @@ class Form
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
* @return string
*/
- function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0)
+ public static function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0)
{
global $conf, $langs;
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 0316fb461cf..8fe32b0dd70 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -273,11 +273,11 @@ class FormActions
if (! empty($multiselect))
{
if(!is_array($selected) && !empty($selected)) $selected = explode(',', $selected);
- print $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
+ print Form::multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
}
else
{
- print $form->selectarray($htmlname, $arraylist, $selected);
+ print Form::selectarray($htmlname, $arraylist, $selected);
}
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 339ba9c6b5e..a70c6f3f40c 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -512,7 +512,7 @@ class FormFile
$arraykeys=array_keys($modellist);
$modelselected=$arraykeys[0];
}
- $out.= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', '');
+ $out.= Form::selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', '');
$out.= '';
}
else
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 9d540a37bb6..7441902a837 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -313,7 +313,7 @@ class FormMail extends Form
if (count($modelmail_array)>0)
{
$out.= ''."\n";
- $out.= $langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1);
+ $out.= $langs->trans('SelectMailModel').': '.Form::selectarray('modelmailselected', $modelmail_array, 0, 1);
if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
$out.= ' ';
$out.= '
';
@@ -348,7 +348,7 @@ class FormMail extends Form
{
$help.=$key.' -> '.$langs->trans($val).'
';
}
- $out.= $form->textwithpicto($langs->trans("EMailTestSubstitutionReplacedByGenericValues"), $help);
+ $out.= Form::textwithpicto($langs->trans("EMailTestSubstitutionReplacedByGenericValues"), $help);
$out.= "\n";
}
@@ -432,7 +432,7 @@ class FormMail extends Form
if (! empty($this->withto) || is_array($this->withto))
{
$out.= '
';
- if ($this->withtofree) $out.= $form->textwithpicto($langs->trans("MailTo"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
+ if ($this->withtofree) $out.= Form::textwithpicto($langs->trans("MailTo"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
else $out.= $langs->trans("MailTo");
$out.= ' ';
if ($this->withtoreadonly)
@@ -477,7 +477,7 @@ class FormMail extends Form
if (! empty($this->withto) && is_array($this->withto))
{
if (! empty($this->withtofree)) $out.= " ".$langs->trans("or")." ";
- $out.= $form->selectarray("receiver", $this->withto, GETPOST("receiver"), 1);
+ $out.= Form::selectarray("receiver", $this->withto, GETPOST("receiver"), 1);
}
if (isset($this->withtosocid) && $this->withtosocid > 0) // deprecated. TODO Remove this. Instead, fill withto with array before calling method.
{
@@ -489,7 +489,7 @@ class FormMail extends Form
$liste[$key]=$value;
}
if ($this->withtofree) $out.= " ".$langs->trans("or")." ";
- $out.= $form->selectarray("receiver", $liste, GETPOST("receiver"), 1);
+ $out.= Form::selectarray("receiver", $liste, GETPOST("receiver"), 1);
}
}
$out.= " \n";
@@ -499,7 +499,7 @@ class FormMail extends Form
if (! empty($this->withtocc) || is_array($this->withtocc))
{
$out.= '
';
- $out.= $form->textwithpicto($langs->trans("MailCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
+ $out.= Form::textwithpicto($langs->trans("MailCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
$out.= ' ';
if ($this->withtoccreadonly)
{
@@ -511,7 +511,7 @@ class FormMail extends Form
if (! empty($this->withtocc) && is_array($this->withtocc))
{
$out.= " ".$langs->trans("or")." ";
- $out.= $form->selectarray("receivercc", $this->withtocc, GETPOST("receivercc"), 1);
+ $out.= Form::selectarray("receivercc", $this->withtocc, GETPOST("receivercc"), 1);
}
}
$out.= " \n";
@@ -521,7 +521,7 @@ class FormMail extends Form
if (! empty($this->withtoccc) || is_array($this->withtoccc))
{
$out.= '
';
- $out.= $form->textwithpicto($langs->trans("MailCCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
+ $out.= Form::textwithpicto($langs->trans("MailCCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
$out.= ' ';
if (! empty($this->withtocccreadonly))
{
@@ -533,7 +533,7 @@ class FormMail extends Form
if (! empty($this->withtoccc) && is_array($this->withtoccc))
{
$out.= " ".$langs->trans("or")." ";
- $out.= $form->selectarray("receiverccc", $this->withtoccc, GETPOST("receiverccc"), 1);
+ $out.= Form::selectarray("receiverccc", $this->withtoccc, GETPOST("receiverccc"), 1);
}
}
@@ -562,7 +562,7 @@ class FormMail extends Form
if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_SUPPLIER_PROPOSAL) && ! empty($this->param['models']) && $this->param['models'] == 'supplier_proposal_send') $defaultvaluefordeliveryreceipt=1;
if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_ORDER) && ! empty($this->param['models']) && $this->param['models'] == 'order_send') $defaultvaluefordeliveryreceipt=1;
if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_INVOICE) && ! empty($this->param['models']) && $this->param['models'] == 'facture_send') $defaultvaluefordeliveryreceipt=1;
- $out.= $form->selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1);
+ $out.= Form::selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1);
}
$out.= " \n";
diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php
index 4ecbef60b58..593d38e2296 100644
--- a/htdocs/core/class/html.formorder.class.php
+++ b/htdocs/core/class/html.formorder.class.php
@@ -138,7 +138,7 @@ class FormOrder
return -1;
}
- print $form->selectarray($htmlname,$listofmethods,$selected,$addempty);
+ print Form::selectarray($htmlname,$listofmethods,$selected,$addempty);
return 1;
}
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 7ccb382a4a3..859c0e7b586 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -91,7 +91,7 @@ class FormProjets
if (class_exists('Form'))
{
if (empty($form)) $form=new Form($this->db);
- print $form->textwithpicto('', $langs->trans("ClosedProjectsAreHidden"));
+ print Form::textwithpicto('', $langs->trans("ClosedProjectsAreHidden"));
}
}
}
diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php
index 35736b56228..d4c95f02837 100644
--- a/htdocs/core/class/html.formsms.class.php
+++ b/htdocs/core/class/html.formsms.class.php
@@ -136,7 +136,7 @@ function limitChars(textarea, limit, infodiv)
{
$help.=$key.' -> '.$langs->trans($val).'
';
}
- print $form->textwithpicto($langs->trans("SmsTestSubstitutionReplacedByGenericValues"),$help);
+ print Form::textwithpicto($langs->trans("SmsTestSubstitutionReplacedByGenericValues"),$help);
print "\n";
}
@@ -244,7 +244,7 @@ function limitChars(textarea, limit, infodiv)
print '
';
//$moretext=$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients");
$moretext='';
- print $form->textwithpicto($langs->trans("SmsTo"),$moretext);
+ print Form::textwithpicto($langs->trans("SmsTo"),$moretext);
print ' ';
if ($this->withtoreadonly)
{
@@ -262,7 +262,7 @@ function limitChars(textarea, limit, infodiv)
}
print " ".$langs->trans("or")." ";
//var_dump($_REQUEST);exit;
- print $form->selectarray("receiver", $liste, GETPOST("receiver"), 1);
+ print Form::selectarray("receiver", $liste, GETPOST("receiver"), 1);
}
print ' '.$langs->trans("SmsInfoNumero");
}
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index 5c6b9613c17..73d59c82918 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -1156,7 +1156,7 @@ function form_constantes($tableau,$strictw3c=0)
{
$arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name'];
}
- print $form->selectarray('constvalue'.(empty($strictw3c)?'':'[]'),$arrayoflabels,($obj->value?$obj->value:'CARD'),1,0,0);
+ print Form::selectarray('constvalue'.(empty($strictw3c)?'':'[]'),$arrayoflabels,($obj->value?$obj->value:'CARD'),1,0,0);
print ' ';
print ' ';
}
@@ -1179,7 +1179,7 @@ function form_constantes($tableau,$strictw3c=0)
}
else if ($obj->type == 'yesno')
{
- print $form->selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1);
+ print Form::selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1);
print ' ';
}
else
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 7e3b5ea2810..ee7a711919f 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -677,7 +677,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
// Status
print '';
- print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status);
+ print Form::selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status);
print ' ';
// Add to agenda
diff --git a/htdocs/core/lib/ecm.lib.php b/htdocs/core/lib/ecm.lib.php
index 34294f502e8..6a2fc50b3ac 100644
--- a/htdocs/core/lib/ecm.lib.php
+++ b/htdocs/core/lib/ecm.lib.php
@@ -40,14 +40,14 @@ function ecm_prepare_dasboard_head($object)
$helptext.=$langs->trans("ECMAreaDesc2");
$head[$h][0] = DOL_URL_ROOT.'/ecm/index.php';
- $head[$h][1] = $langs->trans("ECMSectionsManual").$form->textwithpicto('', $helptext, 1, 'info', '', 0, 3);
+ $head[$h][1] = $langs->trans("ECMSectionsManual").Form::textwithpicto('', $helptext, 1, 'info', '', 0, 3);
$head[$h][2] = 'index';
$h++;
if (! empty($conf->global->ECM_AUTO_TREE_ENABLED))
{
$head[$h][0] = DOL_URL_ROOT.'/ecm/index_auto.php';
- $head[$h][1] = $langs->trans("ECMSectionsAuto").$form->textwithpicto('', $helptext, 1, 'info', '', 0, 3);
+ $head[$h][1] = $langs->trans("ECMSectionsAuto").Form::textwithpicto('', $helptext, 1, 'info', '', 0, 3);
$head[$h][2] = 'index_auto';
$h++;
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index d45cdf45492..5887e767409 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -908,9 +908,9 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
}
else
{
- if ($showimage) $morehtmlleft.=''.$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'
';
+ if ($showimage) $morehtmlleft.=''.Form::showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'
';
}
- if ($showbarcode) $morehtmlleft.=''.$form->showbarcode($object).'
';
+ if ($showbarcode) $morehtmlleft.=''.Form::showbarcode($object).'
';
if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
}
@@ -947,7 +947,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlref.=$langs->trans("TechnicalID").': '.$object->id;
$morehtmlref.='';
}
- print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
+ print Form::showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
print '';
print '
';
}
@@ -3646,8 +3646,7 @@ function get_localtax_by_third($local)
* Get vat rate and npr from id.
* You can call getLocalTaxesFromRate after to get other fields
*
- * @param string $vatrate VAT Rate. Value can be value or the string with code into parenthesis or rowid if $firstparamisid is 1. Example: '8.5' or '8.5 (8.5NPR)' or 123.
- * @param int $usenpr Use npr
+ * @param int $vatrowid Line ID into vat rate table.
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
*/
function getTaxesFromId($vatrowid)
diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php
index 52653fa7f4d..791e43c7496 100644
--- a/htdocs/core/lib/price.lib.php
+++ b/htdocs/core/lib/price.lib.php
@@ -40,8 +40,8 @@
* @param float $pu Unit price (HT or TTC selon price_base_type)
* @param float $remise_percent_ligne Discount for line
* @param float $txtva 0=do not apply standard tax, Vat rate=apply
- * @param float $uselocaltax1_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty)
- * @param float $uselocaltax2_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty)
+ * @param float $uselocaltax1_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
+ * @param float $uselocaltax2_rate 0=do not use this localtax, >0=apply and get value from localtaxes_array (or database if empty), -1=autodetect according to seller if we must apply, get value from localtaxes_array (or database if empty). Try to always use -1.
* @param float $remise_percent_global 0
* @param string $price_base_type HT=Unit price parameter is HT, TTC=Unit price parameter is TTC
* @param int $info_bits Miscellaneous informations on line
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 92229a72d23..217030bd1e9 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -636,7 +636,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
// Form to add new time
print '';
- $tableCell=$form->select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask);
+ $tableCell=Form::select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask);
print $tableCell;
print ' ';
@@ -654,8 +654,8 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
print ' ';
print '';
- if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
- else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
+ if ((! $lines[$i]->public) && $disabledproject) print Form::textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
+ else if ($disabledtask) print Form::textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
print ' ';
print "\n";
@@ -828,8 +828,8 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
}
print '
';
- if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
- else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
+ if ((! $lines[$i]->public) && $disabledproject) print Form::textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
+ else if ($disabledtask) print Form::textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
print ' ';
print "\n";
@@ -1098,7 +1098,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
print '
'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).' ';
- print '
'.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).' ';
+ print '
'.Form::textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).' ';
}
if (empty($conf->global->PROJECT_HIDE_TASKS))
{
diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php
index 8cfd5f202d5..0de36087fdd 100644
--- a/htdocs/core/lib/sendings.lib.php
+++ b/htdocs/core/lib/sendings.lib.php
@@ -256,7 +256,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='')
$text=$product_static->getNomUrl(1);
$text.= ' - '.$label;
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
- print $form->textwithtooltip($text,$description,3,'','',$i);
+ print Form::textwithtooltip($text,$description,3,'','',$i);
// Show range
print_date_range($objp->date_start,$objp->date_end);
@@ -277,7 +277,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='')
if (! empty($objp->label)) {
$text.= '
'.$objp->label.' ';
- print $form->textwithtooltip($text,$objp->description,3,'','',$i);
+ print Form::textwithtooltip($text,$objp->description,3,'','',$i);
} else {
print $text.' '.nl2br($objp->description);
}
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index 666c44c8ae6..fdbce72eec8 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -26,7 +26,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 100__+MAX_llx_menu__, 'home', 'setup', 1__+MAX_llx_menu__, '/admin/index.php?leftmenu=setup', 'Setup', 0, 'admin', '', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 101__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/company.php?leftmenu=setup', 'MenuCompanySetup', 1, 'admin', '', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 102__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/ihm.php?leftmenu=setup', 'GUISetup', 1, 'admin', '', '', 2, 4, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup" && $conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/translation.php?leftmenu=setup', 'Translation', 1, 'admin', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 103__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/modules.php?leftmenu=setup', 'Modules', 1, 'admin', '', '', 2, 2, __ENTITY__);
@@ -322,16 +322,16 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5200__+MAX_llx_menu__, 'members', 'cat', 13__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=3', 'MembersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5201__+MAX_llx_menu__, 'members', '', 5200__+MAX_llx_menu__, '/categories/card.php?action=create&type=3', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__);
-- HRM - Employee
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/index.php?&leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?&action=create', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/index.php?$leftmenu=hrm&mode=employee', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/index.php?leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?action=create&leftmenu=hrm', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/index.php?leftmenu=hrm&mode=employee', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__);
-- HRM - Holiday
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?&action=request', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'holiday', 15__+MAX_llx_menu__, '/holiday/list.php?leftmenu=holiday', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?action=request&leftmenu=holiday', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?leftmenu=holiday', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=holiday', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?action=request&leftmenu=holiday', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?action=request&leftmenu=holiday', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__);
-- HRM - Trips and expenses (old module)
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__);
diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php
index aeb7ea4cd8f..5c3c185f83e 100644
--- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php
+++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php
@@ -89,7 +89,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
// Mask parameter
//$texte.= '
'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'): ';
$texte.= ''.$langs->trans("Mask").': ';
- $texte.= ''.$form->textwithpicto(' ',$tooltip,1,1).' ';
+ $texte.= ''.Form::textwithpicto(' ',$tooltip,1,1).' ';
$texte.= ' ';
$texte.= '';
diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
index b6d4df5657f..ceccfdc5765 100644
--- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
+++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
@@ -134,7 +134,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
$texthelp.='
'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'
';
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
- $texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
+ $texte.= Form::textwithpicto($texttitle,$texthelp,1,'help','',1);
$texte.= '
';
diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
index a2ddb144e6d..969fda5e072 100644
--- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
+++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
@@ -135,7 +135,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
$texthelp.=' '.$langs->trans("FollowingSubstitutionKeysCanBeUsed").' ';
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
- $texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
+ $texte.= Form::textwithpicto($texttitle,$texthelp,1,'help','',1);
$texte.= ' ';
@@ -1599,7 +1599,7 @@ else
// Status
print '
'.fieldLabel('Status','status').' ';
- print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$object->status);
+ print Form::selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$object->status);
print ' ';
// Address
@@ -1676,7 +1676,7 @@ else
// VAT payers
print '
'.fieldLabel('VATIsUsed','assujtva_value').' ';
- print $form->selectyesno('assujtva_value',$object->tva_assuj,1);
+ print Form::selectyesno('assujtva_value',$object->tva_assuj,1);
print ' ';
// VAT Code
@@ -1698,7 +1698,7 @@ else
print '';
print "\n";
$s.=''.$langs->trans("VATIntraCheck").' ';
- $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
+ $s = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
}
else
{
@@ -1714,7 +1714,7 @@ else
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{
print ''.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').' ';
- print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
+ print Form::selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
if(! isOnlyOneLocalTax(1))
{
print ' '.$langs->transcountry("Type",$mysoc->country_code).': ';
@@ -1723,7 +1723,7 @@ else
}
print ' '.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').' ';
- print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
+ print Form::selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
if (! isOnlyOneLocalTax(2))
{
print ' '.$langs->transcountry("Type",$mysoc->country_code).': ';
@@ -1736,7 +1736,7 @@ else
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
{
print ''.fieldLabel($langs->transcountry("LocalTax1IsUsed",$mysoc->country_code),'localtax1assuj_value').' ';
- print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
+ print Form::selectyesno('localtax1assuj_value',$object->localtax1_assuj,1);
if(! isOnlyOneLocalTax(1))
{
print ' '.$langs->transcountry("Type",$mysoc->country_code).': ';
@@ -1749,7 +1749,7 @@ else
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
{
print ''.fieldLabel($langs->transcountry("LocalTax2IsUsed",$mysoc->country_code),'localtax2assuj_value').' ';
- print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
+ print Form::selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
if(! isOnlyOneLocalTax(2))
{
print ' '.$langs->transcountry("Type",$mysoc->country_code).': ';
@@ -1761,11 +1761,11 @@ else
// Type - Size
print ''.fieldLabel('ThirdPartyType','typent_id').' ';
- print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
+ print Form::selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
print ' ';
print ''.fieldLabel('Staff','effectif_id').' ';
- print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id);
+ print Form::selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
print ' ';
@@ -1800,7 +1800,7 @@ else
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
- print $form->multiselectarray('custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
+ print Form::multiselectarray('custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
print " ";
}
@@ -1814,7 +1814,7 @@ else
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
- print $form->multiselectarray('suppcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
+ print Form::multiselectarray('suppcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
print " ";
}
}
@@ -1860,7 +1860,7 @@ else
print '';
print ''.fieldLabel('Logo','photoinput').' ';
print '';
- if ($object->logo) print $form->showphoto('societe',$object);
+ if ($object->logo) print Form::showphoto('societe',$object);
$caneditfield=1;
if ($caneditfield)
{
@@ -1903,7 +1903,7 @@ else
// Confirm delete third party
if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)))
{
- print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete");
+ print Form::formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete");
}
if ($action == 'merge')
@@ -1917,7 +1917,7 @@ else
)
);
- print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 190);
+ print Form::formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 190);
}
dol_htmloutput_errors($error,$errors);
@@ -1981,7 +1981,7 @@ else
print ' ';
print $langs->trans('Gencod').' '.$object->barcode;
print ' ';
- if ($htmllogobar) $htmllogobar.=$form->showbarcode($object);
+ if ($htmllogobar) $htmllogobar.=Form::showbarcode($object);
print $htmllogobar;
$htmllogobar='';
print ' ';
@@ -2044,7 +2044,7 @@ else
print '';
print "\n";
$s.=''.$langs->trans("VATIntraCheck").' ';
- $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
+ $s = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
}
else
{
@@ -2227,7 +2227,7 @@ else
print ' ';
if ($action != 'editincoterm')
{
- print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1);
+ print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1);
}
else
{
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index 5411cee24b6..ddaef38a778 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1138,9 +1138,9 @@ if ($action == 'create')
$syear = date("Y", $tmpdte);
$smonth = date("m", $tmpdte);
$sday = date("d", $tmpdte);
- $form->select_date($syear."-".$smonth."-".$sday, 'liv_', '', '', '', "addask");
+ Form::select_date($syear."-".$smonth."-".$sday, 'liv_', '', '', '', "addask");
} else {
- $form->select_date(-1, 'liv_', '', '', '', "addask", 1, 1);
+ Form::select_date(-1, 'liv_', '', '', '', "addask", 1, 1);
}
print ' ';
@@ -1150,7 +1150,7 @@ if ($action == 'create')
print '
' . $langs->trans("DefaultModel") . ' ';
print '
';
$liste = ModelePDFSupplierProposal::liste_modeles($db);
- print $form->selectarray('model', $liste, ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT : $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF));
+ print Form::selectarray('model', $liste, ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT : $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF));
print " ";
// Project
@@ -1267,7 +1267,7 @@ if ($action == 'create')
$liste_ask [$row [0]] = $askPriceSupplierRefAndSocName;
$i ++;
}
- print $form->selectarray("copie_supplier_proposal", $liste_ask, 0);
+ print Form::selectarray("copie_supplier_proposal", $liste_ask, 0);
} else {
dol_print_error($db);
}
@@ -1358,22 +1358,22 @@ if ($action == 'create')
// 1),
array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=1')));
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneAsk'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneAsk'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
// Confirm delete
else if ($action == 'delete') {
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1);
+ $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1);
}
// Confirm reopen
else if ($action == 'reopen') {
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1);
+ $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1);
}
// Confirmation delete product/service line
else if ($action == 'ask_deleteline') {
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
+ $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
}
// Confirm validate askprice
@@ -1401,7 +1401,7 @@ if ($action == 'create')
}
if (! $error)
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1);
+ $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1);
}
if (! $formconfirm) {
@@ -1420,7 +1420,7 @@ if ($action == 'create')
// Ref
print '
' . $langs->trans('Ref') . ' ';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
+ print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
print ' ';
// Company
@@ -1458,7 +1458,7 @@ if ($action == 'create')
print '
id . '" method="post">';
print ' ';
print ' ';
- $form->select_date($object->date_livraison, 'liv_', '', '', '', "editdate_livraison");
+ Form::select_date($object->date_livraison, 'liv_', '', '', '', "editdate_livraison");
print ' ';
print ' ';
} else {
@@ -1832,7 +1832,7 @@ if ($action == 'create')
$somethingshown = $formfile->show_documents('supplier_proposal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Linked object block
- $somethingshown = $form->showLinkedObjectBlock($object);
+ $somethingshown = Form::showLinkedObjectBlock($object);
// Show links to link elements
//$linktoelem = $form->showLinkToObjectBlock($object);
diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php
index ff1abaa2da1..9f2338b69d7 100644
--- a/htdocs/supplier_proposal/document.php
+++ b/htdocs/supplier_proposal/document.php
@@ -99,7 +99,7 @@ if ($object->id > 0)
// Ref
print '
'.$langs->trans('Ref').' ';
- print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
+ print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','');
print ' ';
// Supplier
diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php
index 4e9f3affa50..32d7d22dc66 100644
--- a/htdocs/supplier_proposal/note.php
+++ b/htdocs/supplier_proposal/note.php
@@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print '
'.$langs->trans('Ref').' ';
- print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
+ print Form::showrefnav($object,'ref',$linkback,1,'ref','ref','');
print ' ';
// Customer
diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php
index 95ff6365dac..5d60a701779 100644
--- a/htdocs/user/agenda_extsites.php
+++ b/htdocs/user/agenda_extsites.php
@@ -174,7 +174,7 @@ print "
";
print "".$langs->trans("Parameter")." ";
print "".$langs->trans("Name")." ";
print "".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics) ';
-print "".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).' ';
+print "".Form::textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).' ';
print ''.$langs->trans("Color").' ';
print " ";
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index 9344572d9df..dd80281d093 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -699,7 +699,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '
';
if (is_array($liste) && count($liste))
{
- print $form->selectarray('users', $liste, '', 1);
+ print Form::selectarray('users', $liste, '', 1);
}
print '
';
print ' ';
@@ -756,7 +756,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
// Employee
print ' ';
print ''.fieldLabel('Employee','employee',0).' ';
- print $form->selectyesno("employee",(isset($_POST['employee'])?GETPOST('employee'):0),1);
+ print Form::selectyesno("employee",(isset($_POST['employee'])?GETPOST('employee'):0),1);
print ' ';
// Position/Job
@@ -769,7 +769,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '
'.$langs->trans("Gender").' ';
print '';
$arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
- print $form->selectarray('gender', $arraygender, GETPOST('gender'), 1);
+ print Form::selectarray('gender', $arraygender, GETPOST('gender'), 1);
print ' ';
// Login
@@ -847,7 +847,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
{
print '
'.$langs->trans("Administrator").' ';
print '';
- print $form->selectyesno('admin',GETPOST('admin'),1);
+ print Form::selectyesno('admin',GETPOST('admin'),1);
if (! empty($conf->multicompany->enabled) && ! $user->entity && empty($conf->multicompany->transverse_mode))
{
@@ -889,7 +889,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
// Type
print ' '.$langs->trans("Type").' ';
print '';
- print $form->textwithpicto($langs->trans("Internal"),$langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2);
+ print Form::textwithpicto($langs->trans("Internal"),$langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2);
print ' ';
// Address
@@ -1032,7 +1032,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
// THM
print '
';
$text=$langs->trans("THM");
- print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
+ print Form::textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
print ' ';
print '';
print ' ';
@@ -1042,7 +1042,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
// TJM
print ' ';
$text=$langs->trans("TJM");
- print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
+ print Form::textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
print ' ';
print '';
print ' ';
@@ -1087,7 +1087,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
{
print ' ' . fieldLabel( 'Categories', 'usercats' ) . ' ';
$cate_arbo = $form->select_all_categories( Categorie::TYPE_USER, null, 'parent', null, null, 1 );
- print $form->multiselectarray( 'usercats', $cate_arbo, GETPOST( 'usercats', 'array' ), null, null, null,
+ print Form::multiselectarray( 'usercats', $cate_arbo, GETPOST( 'usercats', 'array' ), null, null, null,
null, '90%' );
print " ";
}
@@ -1199,7 +1199,7 @@ else
*/
if ($action == 'password')
{
- print $form->formconfirm("card.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1);
+ print Form::formconfirm("card.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1);
}
/*
@@ -1207,7 +1207,7 @@ else
*/
if ($action == 'passwordsend')
{
- print $form->formconfirm("card.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1);
+ print Form::formconfirm("card.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1);
}
/*
@@ -1215,7 +1215,7 @@ else
*/
if ($action == 'disable')
{
- print $form->formconfirm("card.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1);
+ print Form::formconfirm("card.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1);
}
/*
@@ -1223,7 +1223,7 @@ else
*/
if ($action == 'enable')
{
- print $form->formconfirm("card.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1);
+ print Form::formconfirm("card.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1);
}
/*
@@ -1231,7 +1231,7 @@ else
*/
if ($action == 'delete')
{
- print $form->formconfirm("card.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1);
+ print Form::formconfirm("card.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1);
}
/*
@@ -1324,11 +1324,11 @@ else
print '
'.$langs->trans("Administrator").' ';
if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity)
{
- print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin");
+ print Form::textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin");
}
else if ($object->admin)
{
- print $form->textwithpicto(yn($object->admin),$langs->trans("AdministratorDesc"),1,"admin");
+ print Form::textwithpicto(yn($object->admin),$langs->trans("AdministratorDesc"),1,"admin");
}
else
{
@@ -1339,7 +1339,7 @@ else
// Type
print ' ';
$text=$langs->trans("Type");
- print $form->textwithpicto($text, $langs->trans("InternalExternalDesc"));
+ print Form::textwithpicto($text, $langs->trans("InternalExternalDesc"));
print ' ';
$type=$langs->trans("Internal");
if ($object->societe_id > 0) $type=$langs->trans("External");
@@ -1379,7 +1379,7 @@ else
// THM
print ' ';
$text=$langs->trans("THM");
- print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
+ print Form::textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
print ' ';
print '';
print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):'');
@@ -1389,7 +1389,7 @@ else
// TJM
print ' ';
$text=$langs->trans("TJM");
- print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
+ print Form::textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
print ' ';
print '';
print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):'');
@@ -1806,7 +1806,7 @@ else
// Photo
print ' ';
- print $form->showphoto('userphoto',$object,100,0,$caneditfield,'photowithmargin','small');
+ print Form::showphoto('userphoto',$object,100,0,$caneditfield,'photowithmargin','small');
print ' ';
print '';
@@ -1828,7 +1828,7 @@ else
// Employee
print '
';
print ''.fieldLabel('Employee','employee',0).' ';
- print $form->selectyesno("employee",$object->employee,1);
+ print Form::selectyesno("employee",$object->employee,1);
print ' ';
// Position/Job
@@ -1849,7 +1849,7 @@ else
print '
'.$langs->trans("Gender").' ';
print '';
$arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
- print $form->selectarray('gender', $arraygender, GETPOST('gender')?GETPOST('gender'):$object->gender, 1);
+ print Form::selectarray('gender', $arraygender, GETPOST('gender')?GETPOST('gender'):$object->gender, 1);
print ' ';
// Login
@@ -1879,7 +1879,7 @@ else
$text='
';
if ($dolibarr_main_authentication && $dolibarr_main_authentication == 'http')
{
- $text=$form->textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,'warning');
+ $text=Form::textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,'warning');
}
}
else
@@ -1924,7 +1924,7 @@ else
)
)
{
- print $form->selectyesno('admin',$object->admin,1);
+ print Form::selectyesno('admin',$object->admin,1);
if (! empty($conf->multicompany->enabled) && ! $user->entity && empty($conf->multicompany->transverse_mode))
{
@@ -1976,7 +1976,7 @@ else
$yn = yn($object->admin);
print '
';
print '
';
- if (! empty($conf->multicompany->enabled) && empty($object->entity)) print $form->textwithpicto($yn,$langs->trans("DontDowngradeSuperAdmin"),1,'warning');
+ if (! empty($conf->multicompany->enabled) && empty($object->entity)) print Form::textwithpicto($yn,$langs->trans("DontDowngradeSuperAdmin"),1,'warning');
else print $yn;
}
print '';
@@ -1989,7 +1989,7 @@ else
{
$type=$langs->trans("Internal");
if ($object->societe_id) $type=$langs->trans("External");
- print $form->textwithpicto($type,$langs->trans("InternalExternalDesc"));
+ print Form::textwithpicto($type,$langs->trans("InternalExternalDesc"));
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
}
else
@@ -2160,7 +2160,7 @@ else
// THM
print '
';
$text=$langs->trans("THM");
- print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
+ print Form::textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
print ' ';
print '';
print ' ';
@@ -2170,7 +2170,7 @@ else
// TJM
print ' ';
$text=$langs->trans("TJM");
- print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm');
+ print Form::textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm');
print ' ';
print '';
print ' ';
@@ -2231,7 +2231,7 @@ else
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
- print $form->multiselectarray( 'usercats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%' );
+ print Form::multiselectarray( 'usercats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%' );
print " ";
}
diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php
index cb1e9f875aa..342b21490ec 100644
--- a/htdocs/user/clicktodial.php
+++ b/htdocs/user/clicktodial.php
@@ -121,7 +121,7 @@ if ($id > 0)
}
else
{
- print ' '.$form->textwithpicto($langs->trans("KeepEmptyToUseDefault").': '.$conf->global->CLICKTODIAL_URL,$langs->trans("ClickToDialUrlDesc"));
+ print ' '.Form::textwithpicto($langs->trans("KeepEmptyToUseDefault").': '.$conf->global->CLICKTODIAL_URL,$langs->trans("ClickToDialUrlDesc"));
}
print '';
print '';
@@ -162,7 +162,7 @@ if ($id > 0)
}
else
{
- print $form->textwithpicto((empty($object->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc"));
+ print Form::textwithpicto((empty($object->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc"));
}
print '';
print '';
diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php
index 6f5e79b9d60..70caca334d0 100644
--- a/htdocs/user/group/card.php
+++ b/htdocs/user/group/card.php
@@ -296,7 +296,7 @@ else
*/
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAGroup"),$langs->trans("ConfirmDeleteGroup",$object->name),"confirm_delete", '',0,1);
+ print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAGroup"),$langs->trans("ConfirmDeleteGroup",$object->name),"confirm_delete", '',0,1);
}
/*
@@ -312,7 +312,7 @@ else
// Ref
print '
'.$langs->trans("Ref").' ';
print '';
- print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
+ print Form::showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print ' ';
print '';
diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php
index af46fd39d21..580700b69ec 100644
--- a/htdocs/user/group/index.php
+++ b/htdocs/user/group/index.php
@@ -101,7 +101,7 @@ if ($resql)
$moreforfilter='';
//$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
- //$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
+ //$selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '
';
print '';
diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php
index 199041551c5..6d23fcda8d8 100644
--- a/htdocs/user/group/ldap.php
+++ b/htdocs/user/group/ldap.php
@@ -102,7 +102,7 @@ print '';
// Ref
print ''.$langs->trans("Ref").' ';
print '';
-print $form->showrefnav($fgroup,'id','',$canreadperms);
+print Form::showrefnav($fgroup,'id','',$canreadperms);
print ' ';
print ' ';
diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php
index 9ffda5e96c8..32a1a8129cd 100644
--- a/htdocs/user/group/perms.php
+++ b/htdocs/user/group/perms.php
@@ -193,7 +193,7 @@ if ($id)
// Ref
print ''.$langs->trans("Ref").' ';
print '';
- print $form->showrefnav($fgroup,'id','',$user->rights->user->user->lire || $user->admin);
+ print Form::showrefnav($fgroup,'id','',$user->rights->user->user->lire || $user->admin);
print ' ';
print ' ';
diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php
index 66d725b3204..d05ca0ef1e5 100644
--- a/htdocs/user/hierarchy.php
+++ b/htdocs/user/hierarchy.php
@@ -150,10 +150,10 @@ print ' ';
print ' ';
// Status
print '';
-print $form->selectarray('search_statut', array('-1'=>'','1'=>$langs->trans('Enabled')),$search_statut);
+print Form::selectarray('search_statut', array('-1'=>'','1'=>$langs->trans('Enabled')),$search_statut);
print ' ';
print '';
-$searchpitco=$form->showFilterAndCheckAddButtons(0);
+$searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
print '';
diff --git a/htdocs/user/index.php b/htdocs/user/index.php
index 161e39a89a8..eaddfc1248a 100644
--- a/htdocs/user/index.php
+++ b/htdocs/user/index.php
@@ -270,7 +270,7 @@ if ($result)
$moreforfilter='';
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
- $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
+ $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '';
print '';
@@ -326,13 +326,13 @@ if ($result)
{
print '';
$arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
- print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
+ print Form::selectarray('search_gender', $arraygender, $search_gender, 1);
print ' ';
}
if (! empty($arrayfields['u.employee']['checked']))
{
print '';
- print $form->selectyesno('search_employee', $search_employee, 1, false, 1);
+ print Form::selectyesno('search_employee', $search_employee, 1, false, 1);
print ' ';
}
if (! empty($arrayfields['u.accountancy_code']['checked']))
@@ -391,12 +391,12 @@ if ($result)
{
// Status
print '';
- print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
+ print Form::selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
print ' ';
}
// Action column
print '';
- $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ $searchpitco=Form::showFilterAndCheckAddButtons();
print $searchpitco;
print ' ';
diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php
index fa54a128cac..2f1b0e2e437 100644
--- a/htdocs/user/perms.php
+++ b/htdocs/user/perms.php
@@ -374,7 +374,7 @@ if ($result)
if ($caneditperms)
{
print '';
- print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup"));
+ print Form::textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup"));
print ' ';
}
print '';
diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php
index 05236aabf7e..f9770194e02 100755
--- a/scripts/accountancy/export-thirdpartyaccount.php
+++ b/scripts/accountancy/export-thirdpartyaccount.php
@@ -102,7 +102,7 @@ $periodlink = '';
$exportlink = '';
$nom = $langs->trans("ReportThirdParty");
-$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
+$period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
$description = $langs->trans("DescThirdPartyReport");
$builddate = time();