diff --git a/ChangeLog b/ChangeLog index a83fc453a65..204eeddf8a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,7 +24,9 @@ Dolibarr 4.0 should be compatible with PHP 7 but more feedbacks are still expect Following changes may create regression for some external modules, but were necessary to make Dolibarr better: -- Method select_type_comptes_financiers() has been renamed into selectTypeOfBankAccount() +- Method FormBank::select_type_comptes_financiers() has been renamed into FormBank::selectTypeOfBankAccount() +- Method Form::form_date() has been renamed into Form::formDate() +- Method Form::select_date() has been renamed into Form::selectDate() diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php index 03f70955527..ac7e7169fd1 100644 --- a/dev/skeletons/skeleton_card.php +++ b/dev/skeletons/skeleton_card.php @@ -288,7 +288,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete')) dol_fiche_head(); if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); print $formconfirm; } @@ -322,7 +322,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete')) // Example 2 : Adding links to objects - //$somethingshown=$form->showLinkedObjectBlock($object); + //$somethingshown=Form::showLinkedObjectBlock($object); //$linktoelem = $form->showLinkToObjectBlock($object); //if ($linktoelem) print '
'.$linktoelem; diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 2321b76aac8..48a0cc7bd2c 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -291,7 +291,7 @@ if ($resql) } $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 ''; @@ -365,12 +365,12 @@ if ($resql) { // Status print ''; }*/ // Action column print ''; print ''."\n"; diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 3f251e0090b..9e16c81dcd5 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -62,7 +62,7 @@ if (! $sortorder) $sortorder = "ASC"; if ($action == 'delete') { - $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); print $formconfirm; } diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 1a32c22e12f..368e2a84523 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -149,7 +149,7 @@ if (! $conf->use_javascript_ajax) { 'csv' => $langs->trans("csv"), 'txt' => $langs->trans("txt") ); - print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0); + print Form::selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0); print ''; } @@ -197,7 +197,7 @@ if (! $conf->use_javascript_ajax) { } else { print ''; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index e04cc7132f0..041d1322038 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -162,19 +162,19 @@ if ($action == 'create') { // Date start print ''; // Date end print ''; // Statut print ''; print ''; print ''; 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 ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'; $listmodelcsv = AccountancyExport::getType(); - print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0); + print Form::selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0); print '
' . $langs->trans("DateStart") . ''; - print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear'); + print Form::selectDate(($date_start ? $date_start : ''), 'fiscalyear'); print '
' . $langs->trans("DateEnd") . ''; - print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); + print Form::selectDate(($date_end ? $date_end : - 1), 'fiscalyearend'); print '
' . $langs->trans("Statut") . ''; - print $form->selectarray('statut', $statut2label, GETPOST('statut')); + print Form::selectarray('statut', $statut2label, GETPOST('statut')); print '
'; @@ -216,17 +216,17 @@ if ($action == 'create') { // Date start print '' . $langs->trans("DateStart") . ''; - print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); + print Form::selectDate($object->date_start ? $object->date_start : - 1, 'fiscalyear'); print ''; // Date end print '' . $langs->trans("DateEnd") . ''; - print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); + print Form::selectDate($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); print ''; // Statut print '' . $langs->trans("Statut") . ''; - print $form->selectarray('statut', $statut2label, $object->statut); + print Form::selectarray('statut', $statut2label, $object->statut); print ''; print ''; @@ -245,7 +245,7 @@ if ($action == 'create') { * Confirm delete */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); } dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); @@ -263,23 +263,23 @@ if ($action == 'create') { // Label print ''; - print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print Form::editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print ''; - print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print Form::editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print ""; // Date start print ''; - print $form->editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; - print $form->editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; // Date end print ''; - print $form->editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; - print $form->editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; // Statut diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 3e4b69d6624..f44f9620d8e 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -161,9 +161,9 @@ else { print '
'; print $langs->trans('DateStart') . ': '; - print $form->select_date($search_date_start, 'date_start', 0, 0, 1); + print Form::selectDate($search_date_start, 'date_start', 0, 0, 1); print $langs->trans('DateEnd') . ': '; - print $form->select_date($search_date_end, 'date_end', 0, 0, 1); + print Form::selectDate($search_date_end, 'date_end', 0, 0, 1); print '
'; print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index b77bc5446af..0af4f745e3d 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -203,7 +203,7 @@ $formventilation = new FormVentilation($db); * Confirmation to delete the command */ if ($action == 'delete') { - $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); print $formconfirm; } @@ -248,13 +248,13 @@ if ($action == 'create') { print ''; print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b507c4dfffa..f2ada190468 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -340,7 +340,7 @@ else { } if ($action == 'delmouv') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); print $formconfirm; } if ($action == 'delbookkeepingyear') { @@ -361,7 +361,7 @@ else { 'default' => $delyear ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); print $formconfirm; } @@ -394,10 +394,10 @@ else { print ''; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 8e265eb70f7..cc91fe6cad9 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -134,7 +134,7 @@ print ''; print ''; print ''; print '\n"; @@ -147,7 +147,7 @@ print ''; print ''; print ''; print '\n"; @@ -160,7 +160,7 @@ print ''; print ''; print ''; print '\n"; @@ -178,7 +178,7 @@ if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans(" if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly"); if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice"); print ''; @@ -197,7 +197,7 @@ if ($conf->facture->enabled) if (! empty($conf->banque->enabled)) { print ''; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 6f5d1de5c87..a6419883b53 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -149,7 +149,7 @@ print ''; print '\n"; // Type @@ -158,7 +158,7 @@ print ''; print '\n"; */ // Amount @@ -176,7 +176,7 @@ print ''; print '\n"; if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) @@ -189,7 +189,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) $listofval=array(); if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox'; if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal'; - print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1); + print Form::selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1); print "\n"; } diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 77fa8022968..7988383b1d7 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -105,7 +105,7 @@ if ($object->id > 0) // Morphy print ''; /*print '';*/ print ''; diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 8d629175902..f76caaec033 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -313,7 +313,7 @@ abstract class ActionsAdherentCardCommon // Physical or Moral $selectarray=array('0'=>$langs->trans("Physical"),'1'=>$langs->trans("Moral")); - $this->tpl['select_morphy'] = $form->selectarray('morphy',$selectarray,$this->object->morphy,0); + $this->tpl['select_morphy'] = Form::selectarray('morphy',$selectarray,$this->object->morphy,0); } if ($action == 'view' || $action == 'edit' || $action == 'delete') @@ -338,7 +338,7 @@ abstract class ActionsAdherentCardCommon 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) { @@ -385,7 +385,7 @@ abstract class ActionsAdherentCardCommon 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("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); + $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); } } diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 7e0b1291998..702438a9f68 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -108,7 +108,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon // Confirm delete contact if ($action == 'delete' && $user->rights->adherent->supprimer) { - $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); + $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); } } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index f17ca46299f..c4125c1f482 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -807,7 +807,7 @@ else $listetype=$adht->liste_array(); if (count($listetype)) { - print $form->selectarray("typeid", $listetype, GETPOST('typeid','int')?GETPOST('typeid','int'):$typeid, count($listetype)>1?1:0); + print Form::selectarray("typeid", $listetype, GETPOST('typeid','int')?GETPOST('typeid','int'):$typeid, count($listetype)>1?1:0); } else { print ''.$langs->trans("NoTypeDefinedGoToSetup").''; } @@ -817,7 +817,7 @@ else $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Moral"); print '\n"; // Company @@ -900,12 +900,12 @@ else // Birthday print "\n"; // Public profil print "\n"; // Categories @@ -913,7 +913,7 @@ else { print '"; } @@ -1054,12 +1054,12 @@ else $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); print '"; // Photo print '\n"; // Public profil print "\n"; // Categories @@ -1173,7 +1173,7 @@ else foreach ($cats as $cat) { $arrayselected[] = $cat->id; } - print $form->multiselectarray('memcats', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); + print Form::multiselectarray('memcats', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); print ""; } @@ -1278,7 +1278,7 @@ else if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); } // Confirm create third party @@ -1297,7 +1297,7 @@ else // Create a form array $formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } // Confirm validate member @@ -1322,7 +1322,7 @@ else $helpcontent.="
"; $helpcontent.=''.$langs->trans("Content").':
'; $helpcontent.=dol_htmlentitiesbr($texttosend)."\n"; - $label=$form->textwithpicto($tmp,$helpcontent,1,'help'); + $label=Form::textwithpicto($tmp,$helpcontent,1,'help'); // Create form popup $formquestion=array(); @@ -1333,13 +1333,13 @@ else if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); } - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); } // Confirm send card by mail if ($action == 'sendinfo') { - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); } // Confirm terminate @@ -1364,13 +1364,13 @@ else $helpcontent.="
"; $helpcontent.=''.$langs->trans("Content").':
'; $helpcontent.=dol_htmlentitiesbr($texttosend)."\n"; - $label=$form->textwithpicto($tmp,$helpcontent,1,'help'); + $label=Form::textwithpicto($tmp,$helpcontent,1,'help'); // Cree un tableau formulaire $formquestion=array(); if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false')); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); } // Confirm remove member @@ -1378,7 +1378,7 @@ else { $formquestion=array(); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); } /* @@ -1386,7 +1386,7 @@ else */ if ($action == 'add_spip') { - print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); + print Form::formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } /* @@ -1394,7 +1394,7 @@ else */ if ($action == 'del_spip') { - print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); + print Form::formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); } $rowspan=17; @@ -1439,7 +1439,7 @@ else { $langs->load("errors"); $htmltext=$langs->trans("WarningPasswordSetWithNoAccount"); - print ' '.$form->textwithpicto('', $htmltext,1,'warning'); + print ' '.Form::textwithpicto('', $htmltext,1,'warning'); } print ''; } diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 998dc53d525..77361c7e732 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -605,7 +605,7 @@ if ($rowid > 0) { $langs->load("errors"); $htmltext=$langs->trans("WarningPasswordSetWithNoAccount"); - print ' '.$form->textwithpicto('', $htmltext,1,'warning'); + print ' '.Form::textwithpicto('', $htmltext,1,'warning'); } print ''; } @@ -929,7 +929,7 @@ if ($rowid > 0) // Create a form array $formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } @@ -974,7 +974,7 @@ if ($rowid > 0) $datefrom=$object->datevalid; } } - print $form->select_date($datefrom,'','','','',"cotisation",1,1,1); + print Form::selectDate($datefrom,'','','','',"cotisation",1,1,1); print ""; // Date end subscription @@ -987,7 +987,7 @@ if ($rowid > 0) $dateto=-1; // By default, no date is suggested } print '"; if ($adht->cotisation) @@ -1088,7 +1088,7 @@ if ($rowid > 0) // Date of payment print '\n"; print ''; print ''; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index b5e4efaec16..abbbc574d69 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -239,7 +239,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); +print Form::selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); print '
'; print ''; print '
'; @@ -255,7 +255,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); +print Form::selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); print '
'.$langs->trans("Login").': '; print '
'; print ''; @@ -272,7 +272,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); +print Form::selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); print '
'; print ''; print '
'; diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 301664fab83..5f319652182 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -200,7 +200,7 @@ if ($result) // Action column print ''; diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 4dd5fd9bf64..b237a7fc91e 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -131,7 +131,7 @@ if ($id > 0) // Morphy print ''; /*print '';*/ print ''; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index 6b980a4df1c..3ecc840c1bb 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -196,7 +196,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Ref print ''; print ''; // Member @@ -207,13 +207,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Date start subscription print ''; print ''; // Date end subscription print ''; print ''; @@ -295,7 +295,7 @@ if ($rowid && $action != 'edit') //$formquestion['text']=''.$langs->trans("ThisWillAlsoDeleteBankRecord").''; $text=$langs->trans("ConfirmDeleteSubscription"); if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='
'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord"); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); } print ''; @@ -307,7 +307,7 @@ if ($rowid && $action != 'edit') // Ref print ''; print ''; // Member diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index aea09f73124..b6c07676bad 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -270,7 +270,7 @@ if ($resql) print ''; print ''; @@ -287,7 +287,7 @@ if ($resql) // Action column print ''; diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index a895d6cfef8..6c2214a06c8 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -94,7 +94,7 @@ if ($id) // Morphy print ''; /*print '';*/ print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index f46b6d0268c..a8c59995bf4 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -236,11 +236,11 @@ if ($action == 'create') print ''; print ''; print ''; print ''; print ''; // Label @@ -634,11 +634,11 @@ if ($rowid > 0) print ''; print ''; print ''; print '"; print ""; print ""; print "'; -print "'; +print "'; print ''; print ""; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index b9051f6f33a..3d3722269f8 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -164,7 +164,7 @@ print ''."\n"; print ''."\n"; print ''."\n"; print '
' . $langs->trans("Docdate") . ''; - print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); + print Form::selectDate('', 'doc_date', '', '', '', "create_mvt", 1, 1); print '
' . $langs->trans("Codejournal") . '' . $html->selectarray('code_journal', $code_journal_array) . '' . Form::selectarray('code_journal', $code_journal_array) . '
'; print $langs->trans('From') . ': '; - print $form->select_date($search_date_start, 'date_start', 0, 0, 1); + print Form::selectDate($search_date_start, 'date_start', 0, 0, 1); print '
'; print $langs->trans('To') . ': '; - print $form->select_date($search_date_end, 'date_end', 0, 0, 1); + print Form::selectDate($search_date_end, 'date_end', 0, 0, 1); print '
'; diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index 10640c1887a..f9f86002376 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -176,9 +176,9 @@ print_barre_liste($langs->trans("Bookkeeping") . ' ' . dol_print_date($search_da print '
'; print '
'; print $langs->trans('DateStart') . ': '; -print $form->select_date($search_date_start, 'date_start'); +print Form::selectDate($search_date_start, 'date_start'); print $langs->trans('DateEnd') . ': '; -print $form->select_date($search_date_end, 'date_end'); +print Form::selectDate($search_date_end, 'date_end'); print '
'; print '
'; print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; @@ -220,7 +220,7 @@ print ''; -print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1); +print Form::selectDate($search_doc_date, 'doc_date', 0, 0, 1); print '
'; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index f995b2684ee..f09a8960933 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -541,7 +541,7 @@ else { $nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1); $builddate = time(); $description = $langs->trans("DescFinanceJournal") . '
'; - $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::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $varlink = 'id_account=' . $id_bank_account; report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 82811598188..6f8642a4c47 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -403,7 +403,7 @@ if ($action == 'export_csv') { $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::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 670875ec52b..65e383dce88 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -418,7 +418,7 @@ if ($action == 'export_csv') { $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::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index ade361fdd51..5ced4aa5f84 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -221,7 +221,7 @@ if ($result) { print '
 '; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("AdherentLoginRequired").''; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); print ''; print ''; print "
'.$langs->trans("AdherentMailRequired").''; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); print ''; print ''; print "
'.$langs->trans("MemberSendInformationByMailByDefault").''; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); print ''; print ''; print "
'; -print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0); +print Form::selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0); print ''; print ''; print ''; - print $form->selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0); + print Form::selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0); print ''; print ''; print '
'; print $langs->trans("EnablePublicSubscriptionForm"); print ''; -print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); +print Form::selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); print "
'; print $langs->trans("EnablePublicSubscriptionForm"); print ''; -print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); +print Form::selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); print "
'; print $langs->trans("CanEditAmount"); print ''; -print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); +print Form::selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); print "
'.$langs->trans("Nature").''.$object->getmorphylib().''; - print $form->showphoto('memberphoto',$member); + print Form::showphoto('memberphoto',$member); print '
'.$langs->trans("Nature")."\n"; - print $form->selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1); + print Form::selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1); print "
".$langs->trans("Birthday")."\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "
".$langs->trans("Public")."\n"; - print $form->selectyesno("public",$object->public,1); + print Form::selectyesno("public",$object->public,1); print "
' . fieldLabel('Categories', 'memcars') . ''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, 'parent', null, null, 1); - print $form->multiselectarray('memcats', $cate_arbo, GETPOST('memcats', 'array'), null, null, null, null, '100%'); + print Form::multiselectarray('memcats', $cate_arbo, GETPOST('memcats', 'array'), null, null, null, null, '100%'); print "
'.$langs->trans("Nature").''; - print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy); + print Form::selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy); print "'; - print $form->showphoto('memberphoto',$object)."\n"; + print Form::showphoto('memberphoto',$object)."\n"; if ($caneditfieldmember) { if ($object->photo) print "
\n"; @@ -1075,7 +1075,7 @@ else print '
'.$langs->trans("Type").''; if ($user->rights->adherent->creer) { - print $form->selectarray("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$object->typeid)); + print Form::selectarray("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$object->typeid)); } else { @@ -1154,12 +1154,12 @@ else // Birthday print "
".$langs->trans("Birthday")."\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + Form::selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "
".$langs->trans("Public")."\n"; - print $form->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); + print Form::selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); print "
'.$langs->trans("DateEndSubscription").''; - print $form->select_date($dateto,'end','','','',"cotisation",1,0,1); + print Form::selectDate($dateto,'end','','','',"cotisation",1,0,1); print "
'.$langs->trans("DatePayment").''; - print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); + print Form::selectDate(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); print "
'.$langs->trans('Numero'); @@ -1134,7 +1134,7 @@ if ($rowid > 0) $helpcontent.=''.$langs->trans("MailText").':
'; $helpcontent.=dol_htmlentitiesbr($texttosend)."\n"; - print $form->textwithpicto($tmp,$helpcontent,1,'help'); + print Form::textwithpicto($tmp,$helpcontent,1,'help'); } print '
'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("Nature").''.$object->getmorphylib().''; - print $form->showphoto('memberphoto',$object); + print Form::showphoto('memberphoto',$object); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($subscription, 'rowid', $linkback, 1); + print Form::showrefnav($subscription, 'rowid', $linkback, 1); print '
'.$langs->trans("DateSubscription").''; - $form->select_date($subscription->dateh,'datesub',1,1,0,'update',1); + Form::selectDate($subscription->dateh,'datesub',1,1,0,'update',1); print '
'.$langs->trans("DateEndSubscription").''; - $form->select_date($subscription->datef,'datesubend',0,0,0,'update',1); + Form::selectDate($subscription->datef,'datesubend',0,0,0,'update',1); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($subscription, 'rowid', $linkback, 1); + print Form::showrefnav($subscription, 'rowid', $linkback, 1); print '
'; $listetype=$membertypestatic->liste_array(); - print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); + print Form::selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); print ' '; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("Nature").''.$object->getmorphylib().''; - print $form->showphoto('memberphoto',$member); + print Form::showphoto('memberphoto',$member); print '
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; - print $form->selectyesno("cotisation",1,1); + print Form::selectyesno("cotisation",1,1); print '
'.$langs->trans("VoteAllowed").''; - print $form->selectyesno("vote",0,1); + print Form::selectyesno("vote",0,1); print '
'.$langs->trans("Description").''; @@ -297,7 +297,7 @@ if ($rowid > 0) // Ref print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'rowid', $linkback); + print Form::showrefnav($object, 'rowid', $linkback); print '
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; - print $form->selectyesno("cotisation",$object->cotisation,1); + print Form::selectyesno("cotisation",$object->cotisation,1); print '
'.$langs->trans("VoteAllowed").''; - print $form->selectyesno("vote",$object->vote,1); + print Form::selectyesno("vote",$object->vote,1); print '
'.$langs->trans("Description").''; diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 79e6d3dbd6c..f58bd3378e4 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -195,7 +195,7 @@ print "
".$langs->trans("Parameter")."".$langs->trans("Name")."".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).'".Form::textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).''.$langs->trans("Color").'
'.$langs->trans("AGENDA_DEFAULT_VIEW").' '."\n"; $tmplist=array('show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_list'=>$langs->trans("ViewList"), 'show_peruser'=>$langs->trans("ViewPerUser")); -print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW); +print Form::selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW); print '
'; diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index b7cc6e94bf2..8aa018c4b90 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -431,7 +431,7 @@ if ($conf->produit->enabled) } print ''; $s=$modBarCode->getToolTip($langs,null,-1); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print ''; print "\n"; } diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 9e09bf87b1d..0d5fd409b49 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -367,7 +367,7 @@ foreach($boxtoadd as $box) // Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position print ''; - print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n"; + print Form::selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n"; print ''."\n"; print ''; @@ -472,7 +472,7 @@ print ''; if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { $var=!$var; print ''.$langs->trans("EnableFileCache").''; - print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); + print Form::selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); print ''; print ''; } diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index a77fb706a71..1bba473b374 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -83,7 +83,7 @@ print "\n"; $var=!$var; print ''; print $langs->trans("ClickToDialUseTelLink").''; -print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'
'; +print Form::selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'
'; print '
'; print $langs->trans("ClickToDialUseTelLinkDesc"); print ''; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 9e55369dac9..9d0e903d282 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -376,7 +376,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print "\n"; @@ -524,7 +524,7 @@ foreach ($dirmodels as $reldir) print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 849916222dd..2047a774f4a 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -608,7 +608,7 @@ if ($action == 'edit' || $action == 'updateedit') $opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc")); print ''.$langs->trans("CalcLocaltax").': '; - print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); + print Form::selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); print ''; print ""; print "\n"; @@ -650,7 +650,7 @@ if ($action == 'edit' || $action == 'updateedit') print ''; } print ': '; - print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); + print Form::selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); print ''; print ""; print "\n"; @@ -914,7 +914,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 { diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index acfe7de156f..1842ca8c43e 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -311,7 +311,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -457,7 +457,7 @@ foreach ($dirmodels as $reldir) print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 14332ceee63..984480a3cef 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -184,7 +184,7 @@ if ($action == 'edit') $var=false; print ''; - print ''.$langs->trans("MAIN_DISABLE_METEO").'' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . ''; + print ''.$langs->trans("MAIN_DISABLE_METEO").'' .Form::selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . ''; print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 8ee8b791303..bee98d607a3 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -850,7 +850,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); } //var_dump($elementList); @@ -920,7 +920,7 @@ if ($id) if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); } if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); } if ($fieldlist[$field]=='type') { - if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,'')); + if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=Form::textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,'')); else $valuetoshow=$langs->trans("Type"); } if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); } @@ -963,7 +963,7 @@ if ($id) { print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + else if (! empty($tabhelp[$id][$value])) print Form::textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; } @@ -1545,21 +1545,21 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') elseif ($fieldlist[$field] == 'type_template') { print ''; - print $form->selectarray('type_template', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray('type_template', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } // Le type de l'element (pour les type de contact) elseif ($fieldlist[$field] == 'element') { print ''; - print $form->selectarray('element', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray('element', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } // La source de l'element (pour les type de contact) elseif ($fieldlist[$field] == 'source') { print ''; - print $form->selectarray('source', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray('source', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") @@ -1570,7 +1570,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm' || $fieldlist[$field] == 'deductible') { print ''; - print $form->selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); + print Form::selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); print ''; } elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) { @@ -1615,14 +1615,14 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') 'point' => $langs->trans('SizeUnitpoint'), 'inch' => $langs->trans('SizeUnitinch') ); - print $form->selectarray('unit', $units, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 0, 0, 0); + print Form::selectarray('unit', $units, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 0, 0, 0); print ''; } // Le type de taxe locale elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type') { print ''; - print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 42741b49c7a..a7796bfbfa8 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -316,7 +316,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -463,7 +463,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 5c8fa9732e4..66574bac59d 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -327,7 +327,7 @@ foreach ($dirmodels as $reldir) } } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -469,7 +469,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); $htmltooltip.='
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,-1,0); + print Form::textwithpicto('',$htmltooltip,-1,0); print ''; // Preview diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index b3f1d7a5d51..ca1ce3e324e 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -444,7 +444,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors { @@ -600,7 +600,7 @@ foreach ($dirmodels as $reldir) print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview @@ -744,7 +744,7 @@ print ''; print ''; print $langs->trans("ForceInvoiceDate"); print ''; -print $form->selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); +print Form::selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); print ''; print ''; print "\n"; @@ -758,7 +758,7 @@ print ''; print ''; print $langs->trans("JSOnPaimentBill"); print ''; -print $form->selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); +print Form::selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); print ''; print ''; print "\n"; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index fd34d01f620..34f25dc2044 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -338,7 +338,7 @@ foreach ($dirmodels as $reldir) } } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -479,7 +479,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); $htmltooltip.='
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,-1,0); + print Form::textwithpicto('',$htmltooltip,-1,0); print ''; // Preview diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 51d0a6174c8..b6c928d5fd3 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -170,7 +170,7 @@ if ($action == 'edit') // Edit // Multilangual GUI $var=!$var; print ''.$langs->trans("EnableMultilangInterface").''; - print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); + print Form::selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); print ''; print ' '; print ''; @@ -191,7 +191,7 @@ if ($action == 'edit') // Edit { $var=!$var; print ''.$searchformtitle[$key].''; - print $form->selectyesno($searchform[$key],$searchformconst[$key],1); + print Form::selectyesno($searchform[$key],$searchformconst[$key],1); print ''; } print ''; @@ -207,7 +207,7 @@ if ($action == 'edit') // Edit // Show logo $var=!$var; print ''.$langs->trans("EnableShowLogo").''; - print $form->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); + print Form::selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); print ''; print ' '; print ''; @@ -227,7 +227,7 @@ if ($action == 'edit') // Edit // Disable javascript and ajax $var=!$var; print ''.$langs->trans("DisableJavascript").''; - print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); + print Form::selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); print ''; print ' '; print ''; @@ -237,7 +237,7 @@ if ($action == 'edit') // Edit { $var=!$var; print ''.$langs->trans("UsePreviewTabs").''; - print $form->selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); + print Form::selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); print ''; print ' '; print ''; @@ -271,7 +271,7 @@ if ($action == 'edit') // Edit $var=!$var; print ''.$langs->trans("FirstnameNamePosition").''; $array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"),1=>$langs->trans("Lastname").' '.$langs->trans("Firstname")); - print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION',$array,(isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); + print Form::selectarray('MAIN_FIRSTNAME_NAME_POSITION',$array,(isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); print ''; print ' '; print ''; @@ -279,7 +279,7 @@ if ($action == 'edit') // Edit // Hide unauthorized button $var=!$var; print ''.$langs->trans("ButtonHideUnauthorized").''; - print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); + print Form::selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); print ''; print ' '; print ''; @@ -287,7 +287,7 @@ if ($action == 'edit') // Edit // Hide helpcenter link on login page $var=!$var; print ''.$langs->trans("DisableLinkToHelpCenter").''; - print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); + print Form::selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); print ''; print ' '; print ''; @@ -295,7 +295,7 @@ if ($action == 'edit') // Edit // Hide wiki link on login page $var=!$var; print ''.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).''; - print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); + print Form::selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); print ''; print ' '; print ''; @@ -303,7 +303,7 @@ if ($action == 'edit') // Edit // Show bugtrack link $var=!$var; print ''.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; - print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); + print Form::selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); print ''; print ' '; print ''; diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 92c4d20670b..f019fdde8c0 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -116,7 +116,7 @@ $arraylist=array(); $arraylist['0']=$langs->trans("No"); $arraylist['ldap2dolibarr']=$langs->trans("LDAPToDolibarr"); $arraylist['dolibarr2ldap']=$langs->trans("DolibarrToLDAP"); -print $form->selectarray('activesynchro',$arraylist,$conf->global->LDAP_SYNCHRO_ACTIVE); +print Form::selectarray('activesynchro',$arraylist,$conf->global->LDAP_SYNCHRO_ACTIVE); print ''.$langs->trans("LDAPDnSynchroActiveExample"); if ($conf->global->LDAP_SYNCHRO_ACTIVE && ! $conf->global->LDAP_USER_DN) { @@ -132,7 +132,7 @@ if (! empty($conf->societe->enabled)) $arraylist=array(); $arraylist['0']=$langs->trans("No"); $arraylist['1']=$langs->trans("DolibarrToLDAP"); - print $form->selectarray('activecontact',$arraylist,$conf->global->LDAP_CONTACT_ACTIVE); + print Form::selectarray('activecontact',$arraylist,$conf->global->LDAP_CONTACT_ACTIVE); print ''.$langs->trans("LDAPDnContactActiveExample").''; } @@ -145,7 +145,7 @@ if (! empty($conf->adherent->enabled)) $arraylist['0']=$langs->trans("No"); $arraylist['1']=$langs->trans("DolibarrToLDAP"); $arraylist['ldap2dolibarr']=$langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')'; - print $form->selectarray('activemembers',$arraylist,$conf->global->LDAP_MEMBER_ACTIVE); + print Form::selectarray('activemembers',$arraylist,$conf->global->LDAP_MEMBER_ACTIVE); print ''.$langs->trans("LDAPDnMemberActiveExample").''; } @@ -162,7 +162,7 @@ $arraylist=array(); $arraylist['activedirectory']='Active Directory'; $arraylist['openldap']='OpenLdap'; $arraylist['egroupware']='Egroupware'; -print $form->selectarray('type',$arraylist,$conf->global->LDAP_SERVER_TYPE); +print Form::selectarray('type',$arraylist,$conf->global->LDAP_SERVER_TYPE); print ' '; // Version @@ -171,7 +171,7 @@ print ''.$langs->trans("Version").''; $arraylist=array(); $arraylist['3']='Version 3'; $arraylist['2']='Version 2'; -print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION); +print Form::selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION); print ''.$langs->trans("LDAPServerProtocolVersion").''; // Serveur primaire @@ -213,7 +213,7 @@ print ''.$langs->trans("LDAPServerUseTLS").''; $arraylist=array(); $arraylist['0']=$langs->trans("No"); $arraylist['1']=$langs->trans("Yes"); -print $form->selectarray('usetls',$arraylist,$conf->global->LDAP_SERVER_USE_TLS); +print Form::selectarray('usetls',$arraylist,$conf->global->LDAP_SERVER_USE_TLS); print ''.$langs->trans("LDAPServerUseTLSExample").''; print ''; diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 3806258d246..00a553cd073 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -108,12 +108,12 @@ if ($action == 'edit') $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''; $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''; $var=!$var; @@ -121,7 +121,7 @@ if ($action == 'edit') $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''; print ''; @@ -142,12 +142,12 @@ else $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_MAX_DECIMALS_UNIT.''; $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_MAX_DECIMALS_TOT.''; $var=!$var; @@ -155,7 +155,7 @@ else $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_ROUNDING_RULE_TOT.''; print ''; diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 42d7fa69ac8..7000f526a84 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -305,7 +305,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -442,7 +442,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 52324dc1678..d327c286803 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -343,7 +343,7 @@ if ($action == 'edit') // Disable $var=!$var; print ''.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; - print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); + print Form::selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); print ''; // Separator @@ -357,14 +357,14 @@ if ($action == 'edit') // SuperAdministrator access only if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SENDMODE',$listofmethods,$conf->global->MAIN_MAIL_SENDMODE); + print Form::selectarray('MAIN_MAIL_SENDMODE',$listofmethods,$conf->global->MAIN_MAIL_SENDMODE); } else { $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; if (empty($text)) $text = $langs->trans("Undefined"); $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($text,$htmltext,1,'superadmin'); + print Form::textwithpicto($text,$htmltext,1,'superadmin'); print ''; } print ''; @@ -396,7 +396,7 @@ if ($action == 'edit') { $text = ! empty($mainserver) ? $mainserver : $smtpserver; $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($text,$htmltext,1,'superadmin'); + print Form::textwithpicto($text,$htmltext,1,'superadmin'); print ''; } } @@ -429,7 +429,7 @@ if ($action == 'edit') { $text = (! empty($mainport) ? $mainport : $smtpport); $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($text,$htmltext,1,'superadmin'); + print Form::textwithpicto($text,$htmltext,1,'superadmin'); print ''; } } @@ -449,7 +449,7 @@ if ($action == 'edit') else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID,$htmltext,1,'superadmin'); + print Form::textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID,$htmltext,1,'superadmin'); print ''; } print ''; @@ -469,7 +469,7 @@ if ($action == 'edit') else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW,$htmltext,1,'superadmin'); + print Form::textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW,$htmltext,1,'superadmin'); print ''; } print ''; @@ -482,7 +482,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); + print Form::selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -496,7 +496,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); + print Form::selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index f8b89c515aa..e4556371ffe 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -171,10 +171,10 @@ if ($action == 'edit') print ''; print ''; print ''; print ''; print ''; @@ -210,10 +210,10 @@ else print '
'.$langs->trans("Menu").''; - print $form->textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); print ''; - print $form->textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); print '
'; print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 7da0673b196..15b47d5efe8 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -249,7 +249,7 @@ if ($action == 'delete') $result = $db->query($sql); $obj = $db->fetch_object($result); - print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); + print Form::formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); } diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 8cc02613f6c..89a60e957d3 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -267,7 +267,7 @@ if (! empty($categ[$categidx])) { $categidx='expdev'; $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; - $head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3); + $head[$h][1] = Form::textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3); $head[$h][2] = 'expdev'; $h++; } @@ -299,10 +299,10 @@ if ($mode != 'marketplace') $moreforfilter.= $langs->trans('Keyword') . ': '; $moreforfilter.= ''; $moreforfilter.='
'; - $moreforfilter.= $langs->trans('Status') . ': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1); + $moreforfilter.= $langs->trans('Status') . ': '.Form::selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1); $moreforfilter.= '
'; $moreforfilter.='
'; - $moreforfilter.= $langs->trans('Nature') . ': '.$form->selectarray('search_nature', array('standard'=>$langs->transnoentitiesnoconv("Standard"), 'external'=>$langs->transnoentitiesnoconv("External")), $search_nature, 1); + $moreforfilter.= $langs->trans('Nature') . ': '.Form::selectarray('search_nature', array('standard'=>$langs->transnoentitiesnoconv("Standard"), 'external'=>$langs->transnoentitiesnoconv("External")), $search_nature, 1); $moreforfilter.= '
'; $moreforfilter.=' '; $moreforfilter.='
'; @@ -451,7 +451,7 @@ if ($mode != 'marketplace') $text=$langs->trans("ExternalModule",$dirofmodule); if (! empty($objMod->editor_name) && $objMod->editor_name != 'dolibarr') $text.=' - '.$objMod->editor_name; if (! empty($objMod->editor_web) && $objMod->editor_web != 'www.dolibarr.org') $text.=' - '.$objMod->editor_web; - print $form->textwithpicto($version, $text, 1, 'help'); + print Form::textwithpicto($version, $text, 1, 'help'); } else print $version; print "\n"; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index b1ad347d8b7..918b3d0b5d7 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -173,7 +173,7 @@ print '
'; @@ -186,7 +186,7 @@ print ''; @@ -199,7 +199,7 @@ print ''; @@ -212,7 +212,7 @@ print ''; diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index e8ac153bea7..28dbe55c31e 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -239,12 +239,12 @@ foreach($listofnotifiedevents as $notifiedevent) if (! empty($valuedet) && ! isValidEmail($valuedet,1)) $showwarning++; } if ((! empty($conf->global->$param)) && $showwarning) $s.=' '.img_warning($langs->trans("ErrorBadEMail")); - print $form->textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); + print Form::textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); print '
'; } // New entry input fields $s=''; // Do not use type="email" here, we must be able to enter a list of email with , separator. - print $form->textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); + print Form::textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); print ''; print ''; // Show prof id 1 in address into pdf @@ -156,7 +156,7 @@ if ($action == 'edit') // Edit if ($pid1) { print ''; } @@ -174,7 +174,7 @@ if ($action == 'edit') // Edit if ($pid2) { print ''; } @@ -192,7 +192,7 @@ if ($action == 'edit') // Edit if ($pid3) { print ''; } @@ -210,7 +210,7 @@ if ($action == 'edit') // Edit if ($pid4) { print ''; } @@ -227,31 +227,31 @@ if ($action == 'edit') // Edit // Hide any PDF informations $var=!$var; print ''; //Desc $var=!$var; print ''; //Ref $var=!$var; print ''; //Details $var=!$var; print ''; // Place customer adress to the ISO location $var=!$var; print ''; @@ -404,7 +404,7 @@ else // Show print ""; print ''; print '\n"; print ''; print ''; print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index b4f1fe67e0b..dfa084357a2 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -356,7 +356,7 @@ foreach ($dirmodels as $reldir) } print ''; print "\n"; @@ -503,7 +503,7 @@ foreach ($dirmodels as $reldir) print ''; // Preview @@ -565,7 +565,7 @@ print '\n"; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 1f6e45223b4..1a9eebcaf70 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -158,7 +158,7 @@ print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 1213a9b2238..5949b61d4d9 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -151,7 +151,7 @@ print ''; $var=!$var; print ''; print ''; print ''; @@ -187,7 +187,7 @@ $sessiontimeout=ini_get("session.gc_maxlifetime"); if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout; print ''; print ''; print ''; // Separator @@ -187,7 +187,7 @@ if ($action == 'edit') // Method $var=!$var; print ''; diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 98ff43360a8..8613c99e04a 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -150,7 +150,7 @@ if (! empty($conf->facture->enabled)) print ""; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); print ''; print "\n"; } @@ -170,7 +170,7 @@ if (! empty($conf->commande->enabled)) print ""; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); print ''; print "\n"; } @@ -192,7 +192,7 @@ if (! empty($conf->expedition->enabled)) print ""; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); print ''; print "\n"; } @@ -234,7 +234,7 @@ if (! empty($conf->fournisseur->enabled)) print ""; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); print ''; print "\n"; } @@ -255,7 +255,7 @@ if (! empty($conf->fournisseur->enabled)) print ""; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); print ''; print "\n"; } @@ -275,7 +275,7 @@ if (! empty($conf->fournisseur->enabled)) print ""; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); print ''; print "\n"; } @@ -314,7 +314,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print ""; print ''; print ""; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); print ''; print ''; print "\n"; @@ -329,7 +329,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print ""; print ''; print ""; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); print ''; print ''; print "\n"; @@ -344,7 +344,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print ""; print ''; print ""; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); print ''; print ''; print "\n"; @@ -373,7 +373,7 @@ if ($virtualdiffersfromphysical) print ""; print ''; print ""; - print $form->selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); + print Form::selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); print ''; print ''; print "\n"; @@ -399,7 +399,7 @@ print '\n"; @@ -419,7 +419,7 @@ if ($conf->global->PRODUIT_SOUSPRODUITS) print ""; print ''; print ""; - print $form->selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); + print Form::selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); print ''; print ''; print "\n"; diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 6fa692f47fc..f1f9ce5964c 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -291,7 +291,7 @@ foreach ($dirmodels as $reldir) } print ''; print ''; @@ -431,7 +431,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); print ''; print ''; print ''; @@ -441,7 +441,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); print ''; print ''; print "\n"; @@ -480,7 +480,7 @@ foreach ($dirmodels as $reldir) print ''; // Preview diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index f3cfcff9807..f1d7f489e01 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -225,11 +225,11 @@ foreach ($syslogModules as $moduleName) print ''; print "\n"; diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 365cfaa449d..dc9f262a159 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -114,8 +114,8 @@ else $show=1; } if ($show==0) print $paramval; - if ($show==1) print $form->textwithpicto($paramval,$text); - if ($show==2) print $form->textwithpicto($paramval,$text,1,'warning'); + if ($show==1) print Form::textwithpicto($paramval,$text); + if ($show==2) print Form::textwithpicto($paramval,$text,1,'warning'); print ''; print ''."\n"; } diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index eeea93a2fea..5df1083cd93 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -82,7 +82,7 @@ print '\n"; $var=!$var; print ''."\n"; @@ -182,7 +182,7 @@ $val=($a>=0?'+':'').$a; $val.=' ('.($a=='unknown'?'unknown':($a>=0?'+':'').($a*3600)).')'; $val.='       '.getServerTimeZoneString(); $val.='       '.$langs->trans("DaylingSavingTime").': '.($daylight==='unknown'?'unknown':($a==$c?yn($daylight):yn(0).($daylight?'     ('.$langs->trans('YesInSummer').')':''))); -print $form->textwithtooltip($val,$txt,2,1,img_info('')); +print Form::textwithtooltip($val,$txt,2,1,img_info('')); print ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php $var=!$var; print ''."\n"; @@ -202,7 +202,7 @@ if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') if ($resql) { $obj = $db->fetch_object($resql); - print $form->textwithtooltip($obj->Value,$langs->trans('TZHasNoEffect'),2,1,img_info('')); + print Form::textwithtooltip($obj->Value,$langs->trans('TZHasNoEffect'),2,1,img_info('')); } print ''."\n"; } diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 4ba759a66fa..21ccb1efd6c 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -180,7 +180,7 @@ if ($result) if ($action == 'purge') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); } print ''; @@ -198,7 +198,7 @@ if ($result) // Lignes des champs de filtres print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index c313c91a7bd..1b88edbb9dc 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -116,12 +116,12 @@ print '
'; if ($action == 'purge') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); } else if ($action == 'lock') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); } if ($savehandler == 'files') @@ -150,7 +150,7 @@ if ($savehandler == 'files') // ID print ''; diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 170c37a79bf..f0e62f65998 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -108,7 +108,7 @@ if (preg_match('/^confirm/i',$choice)) { print '
'; $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); + print Form::formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); } diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index de59c9136b2..3f75499559a 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -72,7 +72,7 @@ foreach ($triggers as $trigger) $text=$trigger['info']; $text.="
\n".$langs->trans("File").":
\n".$trigger['relpath']; //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']); - print $form->textwithpicto('', $text); + print Form::textwithpicto('', $text); print ''; print ''; } diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php index de4c0472f62..d2e62a5d57f 100644 --- a/htdocs/admin/websites.php +++ b/htdocs/admin/websites.php @@ -321,7 +321,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); } //var_dump($elementList); @@ -381,7 +381,7 @@ if ($id) { print ''; } diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 01e969fc927..9b50200b7f7 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -294,7 +294,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) $arrayoflabels[$codecards]=$labeltoshow; $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); +print Form::selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); print ''; // Number of stickers to print diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 67e01bcb773..9acfed7c9d8 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -163,7 +163,7 @@ if ($action == 'create') print ''; print ''; // Force warehouse (this is not a default value) print '\n"; } @@ -177,7 +177,7 @@ if (! empty($conf->receiptprinter->enabled)) print '\n"; } diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index ecb11c3e6ee..92db0df15fb 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -43,10 +43,10 @@ $langs->load("cashdesk");
'.$langs->trans("Menu").''; - print $form->textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); print ''; - print $form->textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); print '
'; print ''; print ''; print ''; -print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); +print Form::selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); print ''; print ''; print '
'; print '
'; print ''; print ''; -print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); +print Form::selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); print ''; print '
'; print '
'; print '
'; print ''; print ''; -print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); +print Form::selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); print ''; print '
'; print '
'; print '
'; print ''; print ''; -print $form->selectarray('MULTICURRENCY_MODIFY_RATE_APPLICATION', array('PU_DOLIBARR' => 'PU_DOLIBARR', 'PU_CURRENCY' => 'PU_CURRENCY')); +print Form::selectarray('MULTICURRENCY_MODIFY_RATE_APPLICATION', array('PU_DOLIBARR' => 'PU_DOLIBARR', 'PU_CURRENCY' => 'PU_CURRENCY')); print ''; print '
'; print '
'; diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index fa99e2c202b..f6d7de38048 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -193,7 +193,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors { diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 3b968af09c3..e65f74376bb 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -139,7 +139,7 @@ if ($action == 'edit') // Edit // Hide VAT Intra on address $var=!$var; print '
'.$langs->trans("ShowVATIntaInAddress").''; - print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); + print Form::selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); print '
'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.''; - print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); print '
'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.''; - print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); print '
'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.''; - print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); print '
'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.''; - print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); print '
'.$langs->trans("HideAnyVATInformationOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); print '
'.$langs->trans("HideDescOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); print '
'.$langs->trans("HideRefOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); print '
'.$langs->trans("HideDetailsOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); print '
'.$langs->trans("PlaceCustomerAddressToIsoLocation").''; - print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); + print Form::selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); print '
'; $text = $langs->trans("ProtectAndEncryptPdfFiles"); - $desc = $form->textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); + $desc = Form::textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); print $desc; print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 410851b640b..d962b57f1bf 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -238,11 +238,11 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print "
'; - print $form->selectarray('user',$internalusers);// select_dolusers(0,'user',0); + print Form::selectarray('user',$internalusers);// select_dolusers(0,'user',0); print ''; - print $form->selectarray('action',$actions);// select_dolusers(0,'user',0); + print Form::selectarray('action',$actions);// select_dolusers(0,'user',0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; -print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); +print Form::selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); print ''; print ''; print "
'.$langs->trans("MAIN_PROXY_USE").''; print ''; -print $form->selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); +print Form::selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); print '
'.$langs->trans("UMask").''; -print $form->textwithpicto('',$langs->trans("UMaskExplanation")); +print Form::textwithpicto('',$langs->trans("UMaskExplanation")); print ''; print ''; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index ac0a1e883eb..a72a00b992c 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -140,7 +140,7 @@ if (function_exists("imagecreatefrompng")) } else { - $desc = $form->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); + $desc = Form::textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); print $desc; } print '
'.$langs->trans("SessionTimeOut").''; -print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print Form::textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print ''; print ' '.strtolower($langs->trans("Seconds")); diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 05fe548daff..672a94151ee 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -177,7 +177,7 @@ if ($action == 'edit') // Disable $var=!$var; print '
'.$langs->trans("MAIN_DISABLE_ALL_SMS").''; - print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); + print Form::selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print '
'.$langs->trans("MAIN_SMS_SENDMODE").''; - if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); + if (count($listofmethods)) print Form::selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); else print ''.$langs->trans("None").''; print '
'; print "
"; print ''; print ""; -print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); +print Form::selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); print ''; print '
'; print "
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''.img_object($langs->trans("Preview"),'order').''; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 50eb9c9a322..d55b35b7960 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -307,7 +307,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''.img_object($langs->trans("Preview"),'order').''; diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 41737f7a9d5..aad9bb9040b 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -190,7 +190,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors { diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 069c90ead8a..5cf09741cf1 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -333,7 +333,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; if ($module->getInfo()) { - print $form->textwithpicto('', $module->getInfo(), 1, 'help'); + print Form::textwithpicto('', $module->getInfo(), 1, 'help'); } if ($module->getWarning()) { - print $form->textwithpicto('', $module->getWarning(), 1, 'warning'); + print Form::textwithpicto('', $module->getWarning(), 1, 'warning'); } print '
'.$langs->trans("SessionId").''.$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); print ''; -print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print Form::textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print "
'.$langs->trans("CurrentTheme").''.$conf->theme.'
  => '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').'
'.$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).''.Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).Form::selectDate($date_end,'date_end',0,0,0,'',1,0,1).''; print ''; @@ -270,7 +270,7 @@ if ($result) // More informations print ''; $htmltext=''.$langs->trans("UserAgent").': '.($obj->user_agent?$obj->user_agent:$langs->trans("Unknown")); - print $form->textwithpicto('',$htmltext); + print Form::textwithpicto('',$htmltext); print '
'; - if ("$key" == session_id()) print $form->textwithpicto($key,$langs->trans("YourSession")); + if ("$key" == session_id()) print Form::textwithpicto($key,$langs->trans("YourSession")); else print $key; print '
'; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + else if (! empty($tabhelp[$id][$value])) print Form::textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print '
'.$langs->trans("BehaviourOnClick").''; $liste=array(0=>$langs->trans("ReplaceWindow"),1=>$langs->trans("OpenANewWindow")); - print $form->selectarray('target',$liste,1); + print Form::selectarray('target',$liste,1); print ''.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'
'.$langs->trans("Owner").''; @@ -252,7 +252,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) if ($action == 'edit') { $liste=array(1=>$langs->trans("OpenANewWindow"),0=>$langs->trans("ReplaceWindow")); - print $form->selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$bookmark->target); + print Form::selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$bookmark->target); } else { diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index de60e8b80cf..c6c7548b851 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -132,7 +132,7 @@ if (! empty($conf->stock->enabled)) print '
'.$langs->trans("CashDeskDoNotDecreaseStock").''; if (empty($conf->productbatch->enabled)) { - print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); + print Form::selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); } else { @@ -166,7 +166,7 @@ if (! empty($conf->service->enabled)) print '
'; print $langs->trans("CashdeskShowServices"); print ''; - print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); + print Form::selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); print "
'; print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')'; print ''; - print $form->selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); + print Form::selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); print "
+ onchange="setSource('REF');" + onkeyup="verifResultat('resultats_dhtml', this.value, global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);" + onfocus="this.select(); verifResultat('resultats_dhtml', this.value, global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);" + onBlur="document.getElementById('resultats_dhtml').innerHTML = '';"/> load("cashdesk"); */ ?> - '.$top_liste_produits.''."\n"; @@ -93,7 +93,7 @@ $langs->load("cashdesk");
-
+ @@ -106,7 +106,7 @@ $langs->load("cashdesk"); - @@ -115,10 +115,10 @@ $langs->load("cashdesk"); - + - @@ -126,7 +126,7 @@ $langs->load("cashdesk"); - @@ -201,10 +201,10 @@ $langs->load("cashdesk"); print '
'; print '
'; ?> - " onclick="javascript: verifClic('DIF');" /> + " onclick="verifClic('DIF');" /> trans("DateEcheance").' :'; - print $form->select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); + print Form::selectDate(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); print '
'; ?>
diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index d1af6bdafb2..2fb95bdbf33 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -99,7 +99,7 @@ $form = new Form($db); $var=!$var; print ''; print ''; -print ''; +print ''; print ''; // Ref cde client diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index da8b9012b14..69bcbad33c1 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1505,7 +1505,7 @@ if ($action == 'create' && $user->rights->commande->creer) } // Date print ''; // Delivery date planed @@ -1515,7 +1515,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:''; } - $form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); + Form::selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); print ""; // Conditions de reglement @@ -1583,7 +1583,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; @@ -1602,7 +1602,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '"; // Multicurrency @@ -1775,7 +1775,7 @@ if ($action == 'create' && $user->rights->commande->creer) * Confirmation de la suppression de la commande */ if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); } /* @@ -1825,7 +1825,7 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockDecrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); } // Confirm back to draft status @@ -1857,14 +1857,14 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); } /* * Confirmation de la cloture */ if ($action == 'shipped') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); } /* @@ -1898,13 +1898,13 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); } // Confirmation to delete line 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); } // Clone confirmation @@ -1918,7 +1918,7 @@ if ($action == 'create' && $user->rights->commande->creer) // => 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) { @@ -1951,7 +1951,7 @@ if ($action == 'create' && $user->rights->commande->creer) // Ref print ''; print ''; print ''; @@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - $form->select_date($object->date, 'order_', '', '', '', "setdate"); + Form::selectDate($object->date, 'order_', '', '', '', "setdate"); print ''; print ''; } else { @@ -2072,7 +2072,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - $form->select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); + Form::selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); print ''; print ''; } else { @@ -2281,7 +2281,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '"; // Ref commande client diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 2d9c80e9d2d..1c4c7b8b8cb 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -110,7 +110,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; print ''; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 91a602c31a6..fff1434e0fc 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -334,7 +334,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.='
'; } $parameters=array(); @@ -398,16 +398,16 @@ if ($resql) '3'=>$langs->trans("StatusOrderDelivered"), '-1'=>$langs->trans("StatusOrderCanceledShort") ); - print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4); + print Form::selectarray('viewstatut', $liststatus, $viewstatut, -4); print ''; if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { print ''; } print ''; print "\n"; @@ -543,10 +543,10 @@ if ($resql) print ''; } diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 6f3519e9ced..17ca75b8e80 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '"; // Ref commande client diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index ebb9bedca2c..e4879d14c05 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -420,14 +420,14 @@ if ($action == 'create' && !$error) print ''."\n"; print '
trans("Qty"); ?>trans("VATRate"); ?>
+ + - tva(); // Try to get a previously entered VAT rowid. First time, this will return empty. @@ -151,7 +151,7 @@ $langs->load("cashdesk"); - +
trans("Amount"); ?> @@ -161,7 +161,7 @@ $langs->load("cashdesk");
+
'.$langs->trans("CategorieRecursiv").''. $form->textwithpicto('',$langs->trans("CategorieRecursivHelp"),1,'help').''. Form::textwithpicto('',$langs->trans("CategorieRecursivHelp"),1,'help').''; if ($conf->use_javascript_ajax) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 1775c14767d..ef159b7954c 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -248,7 +248,7 @@ if ($socid) print ''; print ''; // Alias names (commercial, trademark or alias names) @@ -358,7 +358,7 @@ else if ($id || $ref) // Ref print ""; print ''; print ''; @@ -418,7 +418,7 @@ else if ($id || $ref) // Ref print ''; print ''; // Login @@ -430,7 +430,7 @@ else if ($id || $ref) // Morphy print ''; /*print '';*/ print ''; @@ -492,7 +492,7 @@ else if ($id || $ref) // Ref print ''; print ''; // Name diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index f3a84eed5d5..6560c0a6ed6 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -108,7 +108,7 @@ if ($object->id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); } print($mesg); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a1486ff344f..a72f8a803f3 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -182,7 +182,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category'); if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); } print '
'.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); + print Form::showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($product,'ref','',1,'ref'); + print Form::showrefnav($product,'ref','',1,'ref'); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($member,'id','','1','rowid','ref','','&type='.$type); + print Form::showrefnav($member,'id','','1','rowid','ref','','&type='.$type); print '
'.$langs->trans("Nature").''.$member->getmorphylib().''; - print $form->showphoto('memberphoto',$member); + print Form::showphoto('memberphoto',$member); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'rowid'); + print Form::showrefnav($object,'rowid'); print '
'; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 19633aa13d7..e1422b077a9 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -665,9 +665,9 @@ if ($action == 'create') $datep=($datep?$datep:$object->datep); if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0); print ''; // Date end @@ -678,9 +678,9 @@ if ($action == 'create') $datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h'); } print ''; // Status @@ -893,7 +893,7 @@ if ($id > 0) // Confirmation suppression action if ($action == 'delete') { - print $form->formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); + print Form::formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); } if ($action == 'edit') @@ -955,16 +955,16 @@ if ($id > 0) // Date start print ''; // Date end print ''; $userepeatevent=0; // Dev in progress @@ -985,7 +985,7 @@ if ($id > 0) if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i',$object->recurrule,$reg)) $selectedrecurrulefreq=$reg[1]; if ($object->recurrule && preg_match('/FREQ=MONTHLY.*BYMONTHDAY=(\d+)/i',$object->recurrule,$reg)) $selectedrecurrulebymonthday=$reg[1]; if ($object->recurrule && preg_match('/FREQ=WEEKLY.*BYDAY(\d+)/i',$object->recurrule,$reg)) $selectedrecurrulebyday=$reg[1]; - print $form->selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq); + print Form::selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq); // If recurrulefreq is MONTHLY print '
'; print $langs->trans("DayOfMonth").': '; @@ -1168,7 +1168,7 @@ if ($id > 0) // Clone event if($action == 'clone') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); print $formconfirm; } @@ -1180,7 +1180,7 @@ if ($id > 0) // Ref print '
'; // Type diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 992c2314446..349a94511ed 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -130,7 +130,7 @@ if ($object->id > 0) // Ref print ''; // Type diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index ed8227a1cb8..1ad1374da6a 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -142,7 +142,7 @@ $form=new Form($db); $userstatic=new User($db); $nav=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $now=dol_now(); @@ -320,10 +320,10 @@ if ($resql) //print ''; } print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 28a531c6b28..f0b5df726fe 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -261,7 +261,7 @@ $nav.=''; $nav.=''; $nav.=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 621d3ada57a..aa588d7a837 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -264,7 +264,7 @@ $nav.=''; $nav.=''; $nav.=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index edb5042e358..18341fbeaef 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -413,7 +413,7 @@ else // Confirmation delete if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); + print Form::formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); } $nblines = count($object->lines); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 3988a986f67..a687b9a814d 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -255,9 +255,9 @@ if ($id > 0) print ''; print ''; print ''; } @@ -371,10 +371,10 @@ if ($id > 0) { print ''; print ''; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 9a7d0349f41..d79ca327990 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -726,17 +726,17 @@ else // Confirmation de la validation du mailing if ($action == 'valid') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); } // Confirm reset else if ($action == 'reset') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); } // Confirm delete else if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); } @@ -783,7 +783,7 @@ else } $text.=$langs->trans('ConfirmSendingEmailing').'
'; $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); } } @@ -793,22 +793,22 @@ else print ''; print ''; // Description - print ''; // From - print ''; // Errors to - print ''; // Status @@ -826,12 +826,12 @@ else if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { $text=$langs->trans('NotEnoughPermissions'); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } } @@ -864,7 +864,7 @@ else array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0) ); // Paiement incomplet. On demande si motif = escompte ou autre - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); } /* @@ -1072,7 +1072,7 @@ else if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 0c133fac6df..83cff684919 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -184,7 +184,7 @@ if ($object->fetch($id) >= 0) print ''; print ''; print ''; @@ -208,7 +208,7 @@ if ($object->fetch($id) >= 0) if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 66474afea8e..7094163c9a7 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -150,7 +150,7 @@ if ($result) if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index b12e8004bc4..68bcfe55b62 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1368,7 +1368,7 @@ if ($action == 'create') // Date print ''; // Validaty duration @@ -1416,9 +1416,9 @@ if ($action == 'create') $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); - $form->select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); + Form::selectDate($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); } else { - $form->select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); + Form::selectDate(-1, 'date_livraison', '', '', '', "addprop", 1, 1); } print ''; @@ -1441,7 +1441,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; @@ -1452,7 +1452,7 @@ if ($action == 'create') print ''; print '"; // Multicurrency @@ -1579,7 +1579,7 @@ if ($action == 'create') $liste_propal [$row [0]] = $propalRefAndSocName; $i ++; } - print $form->selectarray("copie_propal", $liste_propal, 0); + print Form::selectarray("copie_propal", $liste_propal, 0); } else { dol_print_error($db); } @@ -1671,22 +1671,22 @@ if ($action == 'create') // 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Confirm delete else if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $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('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $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 proposal @@ -1714,7 +1714,7 @@ if ($action == 'create') } if (! $error) - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); } if (! $formconfirm) { @@ -1733,7 +1733,7 @@ if ($action == 'create') // Ref print ''; // Ref customer @@ -1804,7 +1804,7 @@ if ($action == 'create') print ''; print ''; print ''; - $form->select_date($object->date, 're', '', '', 0, "editdate"); + Form::selectDate($object->date, 're', '', '', 0, "editdate"); print ''; print ''; } else { @@ -1830,7 +1830,7 @@ if ($action == 'create') print ''; print ''; print ''; - $form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); + Form::selectDate($object->fin_validite, 'ech', '', '', '', "editecheance"); print ''; print ''; } else { @@ -1865,9 +1865,9 @@ if ($action == 'create') // Delivery date $langs->load('deliveries'); print ''; print ''; @@ -2064,7 +2064,7 @@ if ($action == 'create') print ''; // Ref client diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 544c5ab27e3..d85768170d0 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -161,7 +161,7 @@ if ($object->id > 0) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index af603d0606b..858e4e1c34b 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -106,7 +106,7 @@ if ($object->id > 0) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 74ac2fdd7ea..a363730ecaa 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -310,7 +310,7 @@ if ($result) $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.='
'; } if (! empty($moreforfilter)) diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 1e5ace7353e..cff7e9c313e 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 2c93f874baa..ac5606aa2cd 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -272,7 +272,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 '
'.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) Form::selectDate($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); + else Form::selectDate($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '
'.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else Form::selectDate($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '
'.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) $form->select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); - else if (GETPOST("afaire") == 2) $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); - else $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); + else if (GETPOST("afaire") == 2) Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + else Form::selectDate($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '
'.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - //else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); - else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + //else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); + else Form::selectDate($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '
'; - print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); + print Form::selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print ''; - print $form->select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); + print Form::selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); print '
'; - print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print Form::editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print ''; - print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print Form::editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print '
'; - print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); + print Form::editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount'; - print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); + print Form::editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); if (empty($object->outstanding_limit)) print $langs->trans("NoLimit"); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'id', $linkback); + print Form::showrefnav($object,'id', $linkback); print '
'.$form->editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print $form->editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.Form::editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print Form::editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.Form::editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print Form::editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.Form::editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print Form::editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'id', $linkback); + print Form::showrefnav($object,'id', $linkback); print '
'.$langs->trans("MailTitle").''.$object->titre.'
' . $langs->trans('Date') . ''; - $form->select_date('', '', '', '', '', "addprop", 1, 1); + Form::selectDate('', '', '', '', '', "addprop", 1, 1); print '
'; print $form->select_incoterms((!empty($soc->fk_incoterms) ? $soc->fk_incoterms : ''), (!empty($soc->location_incoterms)?$soc->location_incoterms:'')); print '
' . $langs->trans("DefaultModel") . ''; $liste = ModelePDFPropales::liste_modeles($db); - print $form->selectarray('model', $liste, ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF)); + print Form::selectarray('model', $liste, ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF)); print "
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'; - print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); + print Form::editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); print ''; - print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); + print Form::editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); 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 { @@ -2350,7 +2350,7 @@ if ($action == 'create') $somethingshown = $formfile->show_documents('propal', $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/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index cdeacefafe1..d3373ff92d8 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -73,7 +73,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 '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'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 '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '
'; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 07989b457de..a9445743e0e 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -296,7 +296,7 @@ if ($socid > 0) if ($_GET['action'] == 'remove') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } /* @@ -403,7 +403,7 @@ if ($socid > 0) array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); } } else diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 1ec3a0533cc..712ef0fbc86 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -70,7 +70,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 '
' . $langs->trans('Date') . ''; - $form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date + Form::selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print '
'; print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); print '
'; include_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php'; $liste = ModelePDFCommandes::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->COMMANDE_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->COMMANDE_ADDON_PDF); print "
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); 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 { @@ -2584,7 +2584,7 @@ if ($action == 'create' && $user->rights->commande->creer) $somethingshown = $formfile->show_documents('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 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/commande/contact.php b/htdocs/commande/contact.php index c72e040e61c..53fcd5d9a57 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -156,7 +156,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 "
'.$langs->trans('Ref').''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'.$langs->trans('Company').''.$object->thirdparty->getNomUrl(1).'
'; - print $form->selectyesno('billed', $billed, 1, 0, 1); + print Form::selectyesno('billed', $billed, 1, 0, 1); print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'; if ($nbprod) { - print $form->textwithtooltip('',$text_info,2,1,$text_icon,'',2); + print Form::textwithtooltip('',$text_info,2,1,$text_icon,'',2); } if ($warning) { - print $form->textwithtooltip('', $langs->trans('NotEnoughForAllOrders').'
'.$text_warning, 2, 1, img_picto('', 'error'),'',2); + print Form::textwithtooltip('', $langs->trans('NotEnoughForAllOrders').'
'.$text_warning, 2, 1, img_picto('', 'error'),'',2); } print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "
'; print ''; print ''; - $desc=$html->textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1); + $desc=Form::textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1); print $desc; print '
'; // Date invoice print ''.$langs->trans('Date').''; - $html->select_date('','','','','',"add",1,1); + Form::selectDate('','','','','',"add",1,1); print ''; // Payment term print ''.$langs->trans('PaymentConditionsShort').''; @@ -469,7 +469,7 @@ if ($action == 'create' && !$error) print ''; include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; $liste=ModelePDFFactures::liste_modeles($db); - print $html->selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF); + print Form::selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF); print ""; // Public note @@ -575,8 +575,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $num = $db->num_rows($resql); print load_fiche_titre($title); $i = 0; - $period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1); - $periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); + $period=Form::selectDate($date_start,'date_start',0,0,1,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',0,0,1,'',1,0,1); + $periodely=Form::selectDate($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.Form::selectDate($date_endy,'date_end_dely',0,0,1,'',1,0,1); if (! empty($socid)) { diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 1f0f763bfd1..670a0c25917 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -266,7 +266,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/bank/account.php b/htdocs/compta/bank/account.php index b1bf6cd4270..7919f074d41 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -341,7 +341,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); print ''; // Label @@ -404,7 +404,7 @@ if ($id > 0 || ! empty($ref)) if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteTransaction'); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); } @@ -466,7 +466,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - $form->select_date($dateop,'op',0,0,0,'transaction'); + Form::selectDate($dateop,'op',0,0,0,'transaction'); print ''; print ''; $form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1); @@ -521,9 +521,9 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - $period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('From').' '.Form::selectDate($req_stdt,'req_stdt',0,0,1,null,1,1,1); $period_filter .= ' '; - $period_filter .= $langs->trans('to').' '.$form->select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('to').' '.Form::selectDate($req_enddt,'req_enddt',0,0,1,null,1,1,1); print ''; print ''.$period_filter.''; @@ -539,7 +539,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ' '; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 7b53d775cb6..97edaf5446f 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -150,7 +150,7 @@ if ($_GET["account"]) { if (! preg_match('/,/', $id)) { - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); } else { diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index b33b0438552..df40028bae8 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -302,7 +302,7 @@ if ($action == 'create') // Status print ''.$langs->trans("Status").''; print ''; - print $form->selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); + print Form::selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); print ''; // Country @@ -365,7 +365,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; print ''; - $form->select_date('', 're', 0, 0, 0, 'formsoc'); + Form::selectDate('', 're', 0, 0, 0, 'formsoc'); print ''; print ''.$langs->trans("BalanceMinimalAllowed").''; @@ -558,7 +558,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); } @@ -569,7 +569,7 @@ else // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($account, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($account, 'ref', $linkback, 1, 'ref'); print ''; // Label @@ -861,7 +861,7 @@ else // Status print ''.$langs->trans("Status").''; print ''; - print $form->selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); + print Form::selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); print ''; // Country diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 3b6957df40f..151257a6535 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -179,7 +179,7 @@ if ($id > 0 || !empty($ref)) { // Ref print '' . $langs->trans("Ref") . ''; print ''; - print $form->showrefnav($object, 'ref', '', 1, 'ref'); + print Form::showrefnav($object, 'ref', '', 1, 'ref'); print ''; // Label @@ -200,7 +200,7 @@ if ($id > 0 || !empty($ref)) { * Confirmation suppression fichier */ if ($action == 'delete') { - $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), + $ret = $formForm::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 0764c87f5ab..fb8a823b96e 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -770,7 +770,7 @@ if ($account) if ($_GET["option"]!='all') { $morehtml=''.$langs->trans("ShowAllAccounts").''; - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); } else { diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index a17614238be..502fdf7d36c 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -259,7 +259,7 @@ if ($result) // Confirmations if ($action == 'delete_categ') { - print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); + print Form::formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); } @@ -276,7 +276,7 @@ if ($result) // Ref print ''.$langs->trans("Ref").""; print ''; - print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); + print Form::showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); print ''; print ''; @@ -451,7 +451,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; - print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); + print Form::selectDate($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); print ''; } else @@ -467,7 +467,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; - print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); + print Form::selectDate($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); if (! $objp->rappro) { print '   '; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 8ef53f26203..9cf6b3fe2af 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -131,7 +131,7 @@ if (empty($num)) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); print ''; // Label diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index f86ac81aa76..47a24e91666 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -191,9 +191,9 @@ if ($resql) $moreforfilter = ''; $moreforfilter.='
'; $moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' '; - $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= Form::selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= ' - '; - $moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= $langs->trans('EndDate') . ' ' . Form::selectDate($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= '
'; if ($moreforfilter) @@ -238,7 +238,7 @@ if ($resql) print ''; print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index db7f37cb3e5..a60c470993d 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -97,7 +97,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); print ''; // Label diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 146ed4759c4..403574b04d0 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -177,7 +177,7 @@ $form->select_comptes($account_to,'account_to',0,'',1); print "\n"; print ""; -$form->select_date((! empty($dateo)?$dateo:''),'','','','','add'); +Form::selectDate((! empty($dateo)?$dateo:''),'','','','','add'); print "\n"; print ''; print ''; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 934c970accf..930684a2e69 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -262,7 +262,7 @@ if ($action == 'create') print ""; print ''.$langs->trans("Date").''; - print $form->select_date($datec?$datec:-1,'','','','','add',1,1,1); + print Form::selectDate($datec?$datec:-1,'','','','','add',1,1,1); print ''; // Km @@ -358,7 +358,7 @@ else if ($id) // Date print ''.$langs->trans("Date").''; - print $form->select_date($object->date,'',0,0,0,'update',1,0,1); + print Form::selectDate($object->date,'',0,0,0,'update',1,0,1); print ''; // Km @@ -416,7 +416,7 @@ else if ($id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); } @@ -429,16 +429,16 @@ else if ($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 ''; $form->load_cache_types_fees(); // Type print ''; - print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print Form::editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; - print $form->editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print Form::editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; // Who @@ -450,16 +450,16 @@ else if ($id) // Date print ''; - print $form->editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print Form::editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print ''; - print $form->editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print Form::editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print ''; // Km/Price print ''; - print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print Form::editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ''; - print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print Form::editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ""; // Where diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index b6b1cbfa277..80f49fec401 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/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/deplacement/list.php b/htdocs/compta/deplacement/list.php index 497de98fa72..8767ca97961 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -165,7 +165,7 @@ if ($resql) // print ''; print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 216988b6a7a..cbef490948b 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -249,7 +249,7 @@ print ''; print ''.$langs->trans("Year").''; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; arsort($arrayyears); -print $form->selectarray('year',$arrayyears,$year,0); +print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7298eb18135..b6469da3168 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2169,7 +2169,7 @@ if ($action == 'create') // Standard invoice print '
'; $tmp=' '; - $desc = $form->textwithpicto($tmp.$langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($tmp.$langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3); print $desc; print '
'; @@ -2186,7 +2186,7 @@ if ($action == 'create') }); '; - $desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); print ''; @@ -2194,7 +2194,7 @@ if ($action == 'create') { print ''; print ''; // Payment term @@ -2390,7 +2390,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; @@ -2409,7 +2409,7 @@ if ($action == 'create') print '"; // Multicurrency @@ -2548,12 +2548,12 @@ if ($action == 'create') print ''; print '
'; print $desc; print ''; $arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount'); - print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1); + print Form::selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1); print '' . $langs->trans('Value') . ':'; } @@ -2210,7 +2210,7 @@ if ($action == 'create') // First situation invoice print '
'; $tmp=' '; - $desc = $form->textwithpicto($tmp.$langs->trans("InvoiceFirstSituationAsk"), $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($tmp.$langs->trans("InvoiceFirstSituationAsk"), $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); print $desc; print '
'; @@ -2224,7 +2224,7 @@ if ($action == 'create') $text .= ''; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceSituationDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceSituationDesc"), 1, 'help', '', 0, 3); print $desc; print ''; } @@ -2253,7 +2253,7 @@ if ($action == 'create') $text .= ''; } $text .= ''; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); print $desc; print ''; } @@ -2263,7 +2263,7 @@ if ($action == 'create') $tmp=' '; $text = $tmp.$langs->trans("InvoiceReplacement") . ' '; $text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); print $desc; print ''; } @@ -2305,7 +2305,7 @@ if ($action == 'create') $text .= ''; } $text .= ''; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); print $desc; print '
'; @@ -2321,7 +2321,7 @@ if ($action == 'create') $tmp=' '; $text = $tmp.$langs->trans("InvoiceAvoir") . ' '; $text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); print $desc; print '
' . "\n"; } @@ -2354,7 +2354,7 @@ if ($action == 'create') // Date invoice print '
' . $langs->trans('Date') . ''; $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); + print Form::selectDate($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); print '
'; print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); print '
'; include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php'; $liste = ModelePDFFactures::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->FACTURE_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->FACTURE_ADDON_PDF); print "
'; print $langs->trans('From') . ' '; print ''; - print $form->select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print Form::selectDate('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '
'; print $langs->trans('to') . ' '; print ''; - print $form->select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print Form::selectDate('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '
'; print ''; } @@ -2664,7 +2664,7 @@ else if ($id > 0 || ! empty($ref)) // Confirmation de la conversion de l'avoir en reduc if ($action == 'converttoreduc') { $text = $langs->trans('ConfirmConvertToReduc'); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); } // Confirmation to delete invoice @@ -2692,9 +2692,9 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' // => 1), array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction")))); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); } else { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); } } @@ -2758,7 +2758,7 @@ else if ($id > 0 || ! empty($ref)) { $text .= '
' . img_warning() . ' ' . $langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); } // Confirm back to draft status @@ -2795,12 +2795,12 @@ else if ($id > 0 || ! empty($ref)) array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $value)); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); } // Confirmation du classement paye if ($action == 'paid' && $resteapayer <= 0) { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } if ($action == 'paid' && $resteapayer > 0) { // Code @@ -2817,9 +2817,9 @@ else if ($id > 0 || ! empty($ref)) $i ++; // Texte $i = 0; - $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); + $close [$i] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); $i ++; - $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); + $close [$i] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); $i ++; // arrayreasons[code]=reason foreach ($close as $key => $val) { @@ -2829,7 +2829,7 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); } // Confirmation du classement abandonne @@ -2851,8 +2851,8 @@ else if ($id > 0 || ! empty($ref)) $close [1] ['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); $close [2] ['label'] = $langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); // Texte - $close [1] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $object->ref), $close [1] ['label'], 1); - $close [2] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close [2] ['label'], 1); + $close [1] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $object->ref), $close [1] ['label'], 1); + $close [2] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close [2] ['label'], 1); // arrayreasons $arrayreasons [$close [1] ['code']] = $close [1] ['reason']; $arrayreasons [$close [2] ['code']] = $close [2] ['reason']; @@ -2860,13 +2860,13 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); } } // Confirmation de la suppression d'une ligne produit if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); } // Clone confirmation @@ -2878,7 +2878,7 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) @@ -2910,7 +2910,7 @@ else if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer @@ -3026,7 +3026,7 @@ else if ($id > 0 || ! empty($ref)) } else { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); $text2 = $langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text, $text2); + print Form::textwithpicto($text, $text2); } } } else { @@ -3050,7 +3050,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->statut != 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { if ($object->statut == 0 && $object->type != Facture::TYPE_DEPOSIT) { $text = $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)); - print $form->textwithpicto($text, $langs->trans("CreditNoteDepositUse")); + print Form::textwithpicto($text, $langs->trans("CreditNoteDepositUse")); } else { print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)) . '.'; } @@ -3091,7 +3091,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); + Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'daytext'); } @@ -3342,21 +3342,21 @@ else if ($id > 0 || ! empty($ref)) // Paye partiellement 'escompte' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') { print ''; - print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); + print Form::textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; $resteapayeraffiche = 0; } // Paye partiellement ou Abandon 'badcustomer' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer') { print ''; - print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); + print Form::textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; // $resteapayeraffiche=0; } // Paye partiellement ou Abandon 'product_returned' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned') { print ''; - print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); + print Form::textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; $resteapayeraffiche = 0; } @@ -3366,7 +3366,7 @@ else if ($id > 0 || ! empty($ref)) $text = $langs->trans("HelpAbandonOther"); if ($object->close_note) $text .= '

' . $langs->trans("Reason") . ':' . $object->close_note; - print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1); + print Form::textwithpicto($langs->trans("Abandoned") . ':', $text, - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; $resteapayeraffiche = 0; } @@ -3454,7 +3454,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editpaymentterm') { - $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); + Form::formDate($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); } else { print dol_print_date($object->date_lim_reglement, 'daytext'); if ($object->hasDelay()) { @@ -3701,7 +3701,7 @@ else if ($id > 0 || ! empty($ref)) 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 { @@ -4046,7 +4046,7 @@ else if ($id > 0 || ! empty($ref)) $somethingshown = $formfile->numoffiles; // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object,array('order')); diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 1172769e95a..b94a686e891 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer @@ -177,7 +177,7 @@ if ($id > 0 || ! empty($ref)) { $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); $text2=$langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text,$text2); + print Form::textwithpicto($text,$text2); } } } @@ -206,7 +206,7 @@ if ($id > 0 || ! empty($ref)) if ($object->statut == Facture::STATUS_DRAFT && $object->type != Facture::TYPE_DEPOSIT) { $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); - print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); + print Form::textwithpicto($text,$langs->trans("CreditNoteDepositUse")); } else { diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index b07a8f8c2d4..e6e474883f4 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index e4f9846309a..18e0fac540a 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index e833c0629b3..b11f395a25f 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -342,14 +342,14 @@ if ($action == 'create') print ''; // Frequency - print ""; // First date of execution for cron print ""; // Number max of generation @@ -360,7 +360,7 @@ if ($action == 'create') // Auto validate the invoice print ""; print "
".$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')).""; - print " ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')); + print "
".Form::textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')).""; + print " ".Form::selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')); print "
".$langs->trans('NextDateToExecution').""; $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); - print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); + print Form::selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); print "
".$langs->trans("StatusOfGeneratedInvoices").""; $select = array('0'=>$langs->trans('BillStatusDraft'),'1'=>$langs->trans('BillStatusValidated')); - print $form->selectarray('auto_validate', $select, GETPOST('auto_validate')); + print Form::selectarray('auto_validate', $select, GETPOST('auto_validate')); print "
"; @@ -449,7 +449,7 @@ if ($action == 'create') $text=$product_static->getNomUrl(1); $text.= ' - '.(! empty($objp->custom_label)?$objp->custom_label:$objp->product_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($db->jdate($objp->date_start), $db->jdate($objp->date_end)); @@ -471,7 +471,7 @@ if ($action == 'create') if (! empty($objp->custom_label)) { $text.= ' '.$objp->custom_label.''; - print $form->textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i); + print Form::textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i); } else { @@ -609,7 +609,7 @@ else if ($result < 0) { dol_print_error('', $discount->error); }*/ - print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); print ''; @@ -669,9 +669,9 @@ else print ''; - print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); print ''; - print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); + print Form::editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); print ''; print ''; @@ -749,7 +749,7 @@ else print ''; print ''; print ''; print ''; print '
'; - print " ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), ($object->unit_frequency?$object->unit_frequency:'m')); + print " ".Form::selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), ($object->unit_frequency?$object->unit_frequency:'m')); print '
'; @@ -771,7 +771,7 @@ else print ''; if ($action == 'date_when' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print Form::editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } else { @@ -780,7 +780,7 @@ else print ''; if ($action == 'date_when' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print Form::editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } print ''; print ''; @@ -789,7 +789,7 @@ else print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); } else { @@ -798,7 +798,7 @@ else print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); + print Form::editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); } else { @@ -810,14 +810,14 @@ else // Status of generated invoices print ''; if ($action == 'auto_validate' || $object->frequency > 0) - print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); else print $langs->trans("StatusOfGeneratedInvoices"); print ''; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); + print Form::editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); } print ''; print ''; @@ -897,7 +897,7 @@ else $text=$product_static->getNomUrl(1); $text.= ' - '.(! empty($object->lines[$i]->label)?$object->lines[$i]->label:$object->lines[$i]->product_label); $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($object->lines[$i]->desc)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end); @@ -918,7 +918,7 @@ else if (! empty($object->lines[$i]->label)) { $text.= ' '.$object->lines[$i]->label.''; - print $form->textwithtooltip($text,dol_htmlentitiesbr($object->lines[$i]->desc),3,'','',$i); + print Form::textwithtooltip($text,dol_htmlentitiesbr($object->lines[$i]->desc),3,'','',$i); } else { @@ -983,7 +983,7 @@ else print ''; // ancre // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); print '
'; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d227d127f69..a1479d3c875 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -719,7 +719,7 @@ if ($resql) if ($show_files) $param.='&show_files=' .$show_files; $param.=(! empty($option)?"&option=".$option:""); - $massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); + $massactionbutton=Form::selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); $i = 0; print '
'."\n"; @@ -860,7 +860,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.='
'; } $parameters=array(); @@ -921,10 +921,10 @@ if ($resql) print ''; print ''; $liststatus=array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); - print $form->selectarray('search_status', $liststatus, $search_status, 1); + print Form::selectarray('search_status', $liststatus, $search_status, 1); print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); + $searchpitco=Form::showFilterAndCheckAddButtons(1, 'checkforselect', 1); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 3562a235963..7d2cd530955 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 00254b7440f..bf08a1cc299 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -167,7 +167,7 @@ if ($object->id > 0) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ""; // Ref customer @@ -252,7 +252,7 @@ if ($object->id > 0) { $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); $text2=$langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text,$text2); + print Form::textwithpicto($text,$text2); } } } @@ -272,7 +272,7 @@ if ($object->id > 0) if ($object->statut == Facture::STATUS_DRAFT && $object->type != Facture::TYPE_DEPOSIT) { $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); - print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); + print Form::textwithpicto($text,$langs->trans("CreditNoteDepositUse")); } else print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'.'; } @@ -300,7 +300,7 @@ if ($object->id > 0) { if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); + Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); } else { @@ -351,7 +351,7 @@ if ($object->id > 0) { if ($action == 'editpaymentterm') { - $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); + Form::formDate($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); } else { diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 14f8c8d18f6..41bd70d4c12 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -240,7 +240,7 @@ print '
'; 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..bd219b171a7 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..68df0cd964e 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..04d05d670ed 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::selectDate($datep,"datep",'','','','add'); print ''; print ''.$langs->trans("DateValue").''; - print $form->select_date($datev,"datev",'','','','add'); + print Form::selectDate($datev,"datev",'','','','add'); print ''; // Label diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index ac30e529839..2e39dc6058e 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..5fea79227f5 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..5715d3c711b 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::selectDate($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..a785094807f 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::selectDate($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 '
'; print ''; print ''; - $form->select_date($object->date_bordereau,'datecreate_','','','',"setdate"); + Form::selectDate($object->date_bordereau,'datecreate_','','','',"setdate"); print ''; 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..83c86cb528e 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::selectDate($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 ''; print ''; // Date diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 9dd841e0add..e9b99050350 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 ''; print ''; print ''; /* print ''; print ''; print ''; print '
'.$langs->trans('Ref').''; -print $form->showrefnav($paiement,'id','',1,'rowid','id'); +print Form::showrefnav($paiement,'id','',1,'rowid','id'); print '
'.$langs->trans("NotifyTransmision").'
'.$langs->trans("TransData").''; - print $form->select_date('','','','','',"userfile",1,1); + print Form::selectDate('','','','','',"userfile",1,1); print '
'.$langs->trans("TransMetod").''; - print $form->selectarray("methode",$bon->methodes_trans); + print Form::selectarray("methode",$bon->methodes_trans); print '
'.$langs->trans("File").''; print ''; @@ -237,7 +237,7 @@ if ($id > 0) print '
'.$langs->trans("NotifyCredit").'
'.$langs->trans('CreditDate').''; - print $form->select_date('','','','','',"infocredit",1,1); + print Form::selectDate('','','','','',"infocredit",1,1); print '
'; print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice"); diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index d43ba27ef26..96c81bdad53 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::selectDate('','','','','',"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..dd69ee71d6e 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",'
','').')'; - $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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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",'','').')'; - //$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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($date_end,'date_end',1,1,0,'',1,0,1); + $period=Form::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..eea7746dbeb 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::selectDate((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::selectDate((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::selectDate($datesp,"datesp",'','','','add'); print ''; // Date end period print ''; print fieldLabel('DateEndPeriod','dateep',1).''; - print $form->select_date($dateep,"dateep",'','','','add'); + print Form::selectDate($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..ba1e97f0db9 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::selectDate(! 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::selectDate(! 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::selectDate($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::selectDate($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..81bc7e53382 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::selectDate($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::selectDate($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..5ff08743dcf 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..54a59926f5b 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..d6b40e44389 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..10130dfd9ad 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::selectDate($datep,"datep",'','','','add',1,1); print ''; print ''.$langs->trans("DateValue").''; - print $form->select_date($datev,"datev",'','','','add',1,1); + print Form::selectDate($datev,"datev",'','','','add',1,1); print ''; // Label diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index b0d7a9bce30..6e59b44514a 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..8fbf0d89093 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..7f4157fceea 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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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::selectDate($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::selectDate($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..a90ed4db0eb 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 ''; - 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 ''; $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::selectDate($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::selectDate('','birthday',0,0,1,"perso", 1, 0, 1); } print ''; @@ -873,7 +873,7 @@ else if (! empty($conf->mailing->enabled)) { print ''; - 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 ''; $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 ''; } // Extra fields @@ -587,7 +587,7 @@ if ($result) if (! empty($arrayfields['p.statut']['checked'])) { print ''; } print ''; print ''; 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 '"; } else { print ''; print ''; print ''; } print ''; print ''; print ''; print ''; print ''; print ''; @@ -1346,9 +1346,9 @@ else // Date print ''; print ''; print ''; /* print ''; @@ -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 ''; 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 '
'; $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 ''; - 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 ''; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 8bebb6f0cfb..c9ca56cdbb1 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::selectDate($object->birthday,'birthday',0,0,1,"perso", 1,0,1); print ''.$langs->trans("Alert").': '; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index c8903d8d363..2d0de53b783 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1148,7 +1148,7 @@ if ($action == 'create') print '
'.$langs->trans("Date").''; - $form->select_date($datecontrat,'',0,0,'',"contrat"); + Form::selectDate($datecontrat,'',0,0,'',"contrat"); print "
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); 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 $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 $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 $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 '
'.$langs->trans("Date").'
'; 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::selectDate($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::selectDate($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); 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::selectDate($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::selectDate($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::selectDate($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..a5b951c0d6e 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::selectDate($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::selectDate($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..2de07969918 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -694,7 +694,7 @@ class ExtraFields $showtime = in_array($type,array('datetime')) ? 1 : 0; - // Do not show current date when field not required (see select_date() method) + // Do not show current date when field not required (see selectDate() method) if (!$required && $value == '') $value = '-1'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.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::selectDate($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..2c8026ae435 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::selectDate($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::selectDate($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::selectDate($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"; @@ -3635,9 +3614,9 @@ class Form * @param int $displaymin Display minutes selector * @param int $nooutput 1=No print output, return string * @return void - * @see select_date + * @see selectDate */ - function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) + public static function formDate($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) { global $langs; @@ -3650,7 +3629,7 @@ class Form $ret.=''; $ret.=''; $ret.=''; $ret.=''; $ret.='
'; - $ret.=$this->select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1); + $ret.=self::selectDate($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1); $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') { @@ -4272,12 +4252,12 @@ class Form * @param int $nooutput Do not output html string but return it * @param int $disabled Disable input fields * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 - * @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field. + * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field. * @param datetime $adddateof Add a link "Date of invoice" using the following date. * @return mixed Nothing or string if nooutput is 1 - * @see form_date + * @see formDate */ - 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 selectDate($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 12c759a67d6..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 '
'; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a952159b874..4587d58c760 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -9,7 +9,7 @@ * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> - * Copyright (C) 2015 Marcos García + * Copyright (C) 2015-2016 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ * @param Translate $outputlangs Output lang to use to autodetect output format if setup not done * @return array Array('width'=>w,'height'=>h,'unit'=>u); */ -function pdf_getFormat($outputlangs='') +function pdf_getFormat(Translate $outputlangs = null) { global $conf,$db; @@ -77,7 +77,7 @@ function pdf_getFormat($outputlangs='') * @param string $format Array(width,height). Keep empty to use default setup. * @param string $metric Unit of format ('mm') * @param string $pagetype 'P' or 'l' - * @return TPDF PDF object + * @return TCPDF PDF object */ function pdf_getInstance($format='',$metric='mm',$pagetype='P') { @@ -230,7 +230,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P') * @param Translate $outputlangs Output langs object * @return string Name of font to use */ -function pdf_getPDFFont($outputlangs) +function pdf_getPDFFont(Translate $outputlangs) { global $conf; @@ -253,7 +253,7 @@ function pdf_getPDFFont($outputlangs) * @param Translate $outputlangs Output langs object * @return int Size of font to use */ -function pdf_getPDFFontSize($outputlangs) +function pdf_getPDFFontSize(Translate $outputlangs) { $size=10; // By default, for FPDI or ISO language on TCPDF if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower) @@ -295,9 +295,10 @@ function pdf_getHeightForLogo($logo, $url = false) * * @param TCPDF $pdf PDF initialized object * @param string $htmlcontent HTML Contect + * @return int * @see getStringHeight */ -function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent) +function pdfGetHeightForHtmlContent(TCPDF $pdf, $htmlcontent) { // store current object $pdf->startTransaction(); @@ -377,7 +378,7 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includeali * @param Object $object Object we want to build document for * @return string String with full address */ -function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) +function pdf_build_address(Translate $outputlangs, Societe $sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) { global $conf, $hookmanager; @@ -530,12 +531,12 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target /** * Show header of page for PDF generation * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param Translate $outputlangs Object lang for output * @param int $page_height Height of page * @return void */ -function pdf_pagehead(&$pdf,$outputlangs,$page_height) +function pdf_pagehead(TCPDF $pdf, Translate $outputlangs,$page_height) { global $conf; @@ -551,7 +552,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) /** * Add a draft watermark on PDF files * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param Translate $outputlangs Object lang * @param int $h Height of PDF * @param int $w Width of PDF @@ -559,7 +560,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) * @param string $text Text to show * @return void */ -function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) +function pdf_watermark(TCPDF $pdf, Translate $outputlangs, $h, $w, $unit, $text) { // Print Draft Watermark if ($unit=='pt') $k=1; @@ -591,7 +592,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) /** * Show bank informations for PDF generation * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param Translate $outputlangs Object lang * @param int $curx X * @param int $cury Y @@ -600,7 +601,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) * @param int $default_font_size Default font size * @return float The Y PDF position */ -function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default_font_size=10) +function pdf_bank(TCPDF $pdf, Translate $outputlangs,$curx,$cury, Account $account,$onlynumber=0,$default_font_size=10) { global $mysoc, $conf; @@ -783,19 +784,19 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default /** * Show footer of page for PDF generation * - * @param PDF $pdf The PDF factory + * @param TCPDF $pdf The PDF factory * @param Translate $outputlangs Object lang for output * @param string $paramfreetext Constant name of free text * @param Societe $fromcompany Object company * @param int $marge_basse Margin bottom we use for the autobreak * @param int $marge_gauche Margin left (no more used) * @param int $page_hauteur Page height (no more used) - * @param Object $object Object shown in PDF + * @param object $object Object shown in PDF * @param int $showdetails Show company details into footer. This param seems to not be used by standard version. (1=Show address, 2=Show managers, 3=Both) * @param int $hidefreetext 1=Hide free text, 0=Show free text * @return int Return height of bottom margin including footer text */ -function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) +function pdf_pagefoot(TCPDF $pdf, Translate $outputlangs,$paramfreetext, Societe $fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) { global $conf,$user; @@ -1015,7 +1016,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass /** * Show linked objects for PDF generation * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param object $object Object * @param Translate $outputlangs Object lang * @param int $posx X @@ -1026,7 +1027,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass * @param string $default_font_size Font size * @return float The Y PDF position */ -function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) +function pdf_writeLinkedObjects(TCPDF $pdf,$object, Translate $outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) { $linkedobjects = pdf_getLinkedObjects($object,$outputlangs); if (! empty($linkedobjects)) @@ -1052,8 +1053,8 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al /** * Output line description into PDF * - * @param PDF $pdf PDF object - * @param Object $object Object + * @param TCPDF $pdf PDF object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object lang for output * @param int $w Width @@ -1065,7 +1066,7 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al * @param int $issupplierline Is it a line for a supplier object ? * @return string */ -function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_writelinedesc(TCPDF $pdf,$object,$i, Translate $outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) { global $db, $conf, $langs, $hookmanager; @@ -1095,7 +1096,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide /** * Return line description translated in outputlangs and encoded into htmlentities and with
* - * @param Object $object Object + * @param object $object Object * @param int $i Current line number (0 = first line, 1 = second line, ...) * @param Translate $outputlangs Object langs for output * @param int $hideref Hide reference @@ -1103,7 +1104,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide * @param int $issupplierline Is it a line for a supplier object ? * @return string String with line */ -function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_getlinedesc($object,$i, Translate $outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) { global $db, $conf, $langs; @@ -1282,13 +1283,13 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl /** * Return line num * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinenum($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1315,13 +1316,13 @@ function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) /** * Return line product ref * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1347,13 +1348,13 @@ function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) /** * Return line ref_supplier * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref_supplier($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1379,13 +1380,13 @@ function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) /** * Return line vat rate * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinevatrate($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1412,13 +1413,13 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0) /** * Return line unit price excluding tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupexcltax($object,$i, Translate $outputlangs,$hidedetails=0) { global $conf, $hookmanager; @@ -1452,13 +1453,13 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) /** * Return line unit price including tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string */ -function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupwithtax($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1485,13 +1486,13 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) /** * Return line quantity * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1519,13 +1520,13 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) /** * Return line quantity asked * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_asked($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1553,13 +1554,13 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) /** * Return line quantity shipped * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_shipped($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1587,13 +1588,13 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) /** * Return line keep to ship quantity * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_keeptoship($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1621,14 +1622,14 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0) /** * Return line unit * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @param HookManager $hookmanager Hook manager instance * @return void */ -function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = false) +function pdf_getlineunit($object, $i, Translate $outputlangs, $hidedetails = 0, $hookmanager = false) { global $langs; @@ -1664,13 +1665,13 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag /** * Return line remise percent * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineremisepercent($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1700,14 +1701,14 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0) /** * Return line percent * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @param HookManager $hookmanager Hook manager instance * @return string */ -function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null) +function pdf_getlineprogress($object, $i, Translate $outputlangs, $hidedetails = 0, HookManager $hookmanager = null) { $reshook=0; $result=''; @@ -1733,13 +1734,13 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm /** * Return line total excluding tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string Return total of line excl tax */ -function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalexcltax($object,$i, Translate $outputlangs,$hidedetails=0) { global $conf, $hookmanager; @@ -1777,13 +1778,13 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) /** * Return line total including tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string Return total of line incl tax */ -function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalwithtax($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1814,12 +1815,12 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) /** * Return total quantity of products and/or services * - * @param Object $object Object + * @param object $object Object * @param string $type Type * @param Translate $outputlangs Object langs for output * @return integer */ -function pdf_getTotalQty($object,$type,$outputlangs) +function pdf_getTotalQty($object,$type, Translate $outputlangs) { global $hookmanager; @@ -1866,7 +1867,7 @@ function pdf_getTotalQty($object,$type,$outputlangs) * @param Translate $outputlangs Object lang for output * @return array Linked objects */ -function pdf_getLinkedObjects($object,$outputlangs) +function pdf_getLinkedObjects($object, Translate $outputlangs) { global $hookmanager; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 92229a72d23..5239c06346f 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::selectDate($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 0c154e031d8..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,19 +322,24 @@ 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__); --- HRM - Expense reports +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__); 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', 2102__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/list.php?leftmenu=tripsandexpenses', 'List', 1, 'trips', '$user->rights->deplacement->lire', '', 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->deplacement->enabled', __HANDLER__, 'left', 2103__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses', 'Statistics', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__); - +-- HRM - Expense reports +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->expensereport->enabled', __HANDLER__, 'left', 5300__+MAX_llx_menu__, 'hrm', 'expensereport', 15__+MAX_llx_menu__, '/expensereport/index.php?leftmenu=expensereport', 'TripsAndExpenses', 0, 'trips', '$user->rights->expensereport->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->expensereport->enabled', __HANDLER__, 'left', 5301__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/card.php?action=create&leftmenu=expensereport', 'New', 1, 'trips', '$user->rights->expensereport->creer', '', 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->expensereport->enabled', __HANDLER__, 'left', 5302__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/list.php?leftmenu=expensereport', 'List', 1, 'trips', '$user->rights->expensereport->lire', '', 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->expensereport->enabled', __HANDLER__, 'left', 5303__+MAX_llx_menu__, 'hrm', '', 5302__+MAX_llx_menu__, '/expensereport/list.php?search_status=2&leftmenu=expensereport', 'ListToApprove', 2, 'trips', '$user->rights->expensereport->approve', '', 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->expensereport->enabled', __HANDLER__, 'left', 5304__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/stats/index.php?leftmenu=expensereport', 'Statistics', 1, 'trips', '$user->rights->expensereport->lire', '', 0, 2, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index bcbcf3b154e..018b0b4346b 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1233,6 +1233,17 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->deplacement->lire); $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire); } + + // Expense report + if (! empty($conf->expensereport->enabled)) + { + $langs->load("trips"); + $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport'); + $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->expensereport->creer); + $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->expensereport->lire); + $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve); + $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire); + } } 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.= '
'; $texte.= ' - textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?> + trans("ExtrafieldParamHelpselect"),1,0)?> + trans("ExtrafieldParamHelpsellist"),1,0)?> + trans("ExtrafieldParamHelpchkbxlst"),1,0)?> + trans("ExtrafieldParamHelplink"),1,0)?> diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index f12f90d6206..b9d9f1ecfd4 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -152,10 +152,10 @@ else - textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?> + trans("ExtrafieldParamHelpselect"),1,0)?> + trans("ExtrafieldParamHelpsellist"),1,0)?> + trans("ExtrafieldParamHelpchkbxlst"),1,0)?> + trans("ExtrafieldParamHelplink"),1,0)?> diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index a983bf7f36e..3a162aa0901 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -29,7 +29,7 @@ if (empty($relativepathwithnofile)) $relativepathwithnofile=''; if ($action == 'delete') { $langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles - $ret = $form->form_confirm( + $ret = $formForm::formconfirm( $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param)?'':$param), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index c68aa599310..8812a3dd708 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -69,13 +69,13 @@ else $typeofdata='textarea:12:100';
-
>editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?>
-
editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
+
>
+
societe_id)) { ?>
-
>editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?>
-
editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
+
>
+
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 39de2604a0d..98c028b5735 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -382,16 +382,16 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da if (! empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; - $form->select_date($date_start,"date_start",$usehm,$usehm,1,"addproduct"); + Form::selectDate($date_start,"date_start",$usehm,$usehm,1,"addproduct"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date($date_end,"date_end",$usehm,$usehm,1,"addproduct"); + Form::selectDate($date_end,"date_end",$usehm,$usehm,1,"addproduct"); } else { echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; - echo $form->select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); + echo Form::selectDate($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); echo ' '.$langs->trans('to').' '; - echo $form->select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); + echo Form::selectDate($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); }; 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 { @@ -1155,11 +1155,11 @@ else // Type - Size print ''.fieldLabel('ThirdPartyType','typent_id').''."\n"; $sortparam=(empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. - print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam); + print Form::selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam); 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 ''; @@ -1186,22 +1186,22 @@ else if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { print ''.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; - print $form->selectyesno('localtax1assuj_value',0,1); + print Form::selectyesno('localtax1assuj_value',0,1); print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; - print $form->selectyesno('localtax2assuj_value',0,1); + print Form::selectyesno('localtax2assuj_value',0,1); print ''; } elseif($mysoc->localtax1_assuj=="1") { print ''.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; - print $form->selectyesno('localtax1assuj_value',0,1); + print Form::selectyesno('localtax1assuj_value',0,1); print ''; } elseif($mysoc->localtax2_assuj=="1") { print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; - print $form->selectyesno('localtax2assuj_value',0,1); + print Form::selectyesno('localtax2assuj_value',0,1); print ''; } @@ -1242,7 +1242,7 @@ else if ($object->prospect || $object->client) { print '' . fieldLabel('CustomersCategoriesShort', 'custcats') . ''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); - print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, + print Form::multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%"); print ""; } @@ -1251,7 +1251,7 @@ else if ($object->fournisseur) { print '' . fieldLabel('SuppliersCategoriesShort', 'suppcats') . ''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1); - print $form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, + print Form::multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, null, "90%"); print ""; } @@ -1550,7 +1550,7 @@ else } print ''; $s=$modCodeClient->getToolTip($langs,$object,0); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print ''; print ''; @@ -1560,7 +1560,7 @@ else { print ''; print ''.fieldLabel('Supplier','fournisseur',1).''; - print $form->selectyesno("fournisseur",$object->fournisseur,1); + print Form::selectyesno("fournisseur",$object->fournisseur,1); print ''; print ''.fieldLabel('SupplierCode','supplier_code').''; @@ -1583,7 +1583,7 @@ else } print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print ''; print ''; @@ -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..3dfa958dd3f 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::selectDate($syear."-".$smonth."-".$sday, 'liv_', '', '', '', "addask"); } else { - $form->select_date(-1, 'liv_', '', '', '', "addask", 1, 1); + Form::selectDate(-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 '
'; print ''; print ''; - $form->select_date($object->date_livraison, 'liv_', '', '', '', "editdate_livraison"); + Form::selectDate($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 ''; 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 ''; 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 ''; 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 '
'.$langs->trans("Ref").''; -print $form->showrefnav($fgroup,'id','',$canreadperms); +print Form::showrefnav($fgroup,'id','',$canreadperms); print '
'.$langs->trans("Ref").''; - 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 $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 ''; -$searchpitco=$form->showFilterAndCheckAddButtons(0); +$searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'; print ''; @@ -326,13 +326,13 @@ if ($result) { print ''; } if (! empty($arrayfields['u.employee']['checked'])) { print ''; } if (! empty($arrayfields['u.accountancy_code']['checked'])) @@ -391,12 +391,12 @@ if ($result) { // Status print ''; } // Action column 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 '
'; $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 ''; - print $form->selectyesno('search_employee', $search_employee, 1, false, 1); + print Form::selectyesno('search_employee', $search_employee, 1, false, 1); 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 ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; - print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup")); + print Form::textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup")); print ''; diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index 05236aabf7e..a559d9ef53d 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::selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $description = $langs->trans("DescThirdPartyReport"); $builddate = time();