From 87cd6e1e40fcb8b794a99109c51c3ee3da4ff4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 19 Mar 2016 23:56:25 +0100 Subject: [PATCH] Corrected non-static usages of Form::selectarray function --- dev/skeletons/skeleton_list.php | 2 +- htdocs/accountancy/admin/export.php | 4 ++-- htdocs/accountancy/admin/fiscalyear_card.php | 4 ++-- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/adherents/admin/adherent.php | 4 ++-- htdocs/adherents/admin/public.php | 2 +- .../actions_adherentcard_common.class.php | 2 +- htdocs/adherents/card.php | 8 ++++---- htdocs/adherents/cartes/carte.php | 6 +++--- htdocs/adherents/list.php | 2 +- htdocs/admin/agenda_other.php | 2 +- htdocs/admin/boxes.php | 2 +- htdocs/admin/company.php | 4 ++-- htdocs/admin/dict.php | 10 +++++----- htdocs/admin/ihm.php | 2 +- htdocs/admin/ldap.php | 12 ++++++------ htdocs/admin/mails.php | 2 +- htdocs/admin/modules.php | 4 ++-- htdocs/admin/multicurrency.php | 2 +- htdocs/admin/prelevement.php | 4 ++-- htdocs/admin/sms.php | 2 +- htdocs/barcode/printsheet.php | 2 +- htdocs/bookmarks/card.php | 4 ++-- htdocs/comm/action/card.php | 2 +- htdocs/comm/propal.php | 4 ++-- htdocs/comm/propal/list.php | 2 +- htdocs/comm/propal/stats/index.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/commande/list.php | 4 ++-- htdocs/commande/orderstoinvoice.php | 2 +- htdocs/commande/stats/index.php | 2 +- htdocs/compta/bank/card.php | 4 ++-- htdocs/compta/deplacement/stats/index.php | 2 +- htdocs/compta/facture.php | 4 ++-- htdocs/compta/facture/fiche-rec.php | 6 +++--- htdocs/compta/facture/list.php | 4 ++-- htdocs/compta/facture/stats/index.php | 4 ++-- htdocs/compta/prelevement/card.php | 2 +- htdocs/compta/prelevement/ligne.php | 4 ++-- htdocs/compta/ventilation/card.php | 2 +- htdocs/compta/ventilation/fournisseur/card.php | 2 +- .../actions_contactcard_common.class.php | 2 +- htdocs/contact/card.php | 4 ++-- htdocs/contact/list.php | 4 ++-- htdocs/contrat/list.php | 2 +- htdocs/contrat/services.php | 6 +++--- htdocs/core/class/conf.class.php | 13 ++++++++++++- htdocs/core/class/html.form.class.php | 6 +++--- htdocs/core/class/html.formactions.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/core/class/html.formmail.class.php | 10 +++++----- htdocs/core/class/html.formorder.class.php | 2 +- htdocs/core/class/html.formsms.class.php | 2 +- htdocs/core/lib/admin.lib.php | 2 +- htdocs/core/lib/company.lib.php | 2 +- .../doc/doc_generic_proposal_odt.modules.php | 6 +++--- ...c_generic_supplier_proposal_odt.modules.php | 6 +++--- htdocs/core/tpl/admin_extrafields_add.tpl.php | 2 +- htdocs/cron/list.php | 2 +- htdocs/don/stats/index.php | 2 +- htdocs/expedition/card.php | 6 +++--- htdocs/expedition/list.php | 2 +- htdocs/expedition/stats/index.php | 2 +- htdocs/expensereport/stats/index.php | 2 +- htdocs/fichinter/card.php | 2 +- htdocs/fichinter/list.php | 2 +- htdocs/fichinter/stats/index.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/commande/orderstoinvoice.php | 2 +- htdocs/fourn/facture/list.php | 2 +- htdocs/holiday/card.php | 10 +++++----- htdocs/holiday/document.php | 4 ++-- htdocs/hrm/establishment/card.php | 4 ++-- htdocs/opensurvey/list.php | 2 +- htdocs/opensurvey/results.php | 10 +++++----- htdocs/opensurvey/wizard/choix_autre.php | 2 +- htdocs/paypal/admin/paypal.php | 4 ++-- htdocs/product/admin/dynamic_prices.php | 4 ++-- htdocs/product/admin/product.php | 4 ++-- .../product/actions_card_product.class.php | 10 +++++----- .../canvas/product/tpl/card_create.tpl.php | 4 ++-- .../canvas/product/tpl/card_edit.tpl.php | 4 ++-- .../service/actions_card_service.class.php | 8 ++++---- .../canvas/service/tpl/card_create.tpl.php | 4 ++-- .../canvas/service/tpl/card_edit.tpl.php | 4 ++-- htdocs/product/card.php | 18 +++++++++--------- htdocs/product/dynamic_price/editor.php | 2 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/list.php | 4 ++-- htdocs/product/price.php | 2 +- htdocs/product/stock/list.php | 2 +- htdocs/projet/admin/project.php | 2 +- htdocs/projet/card.php | 4 ++-- htdocs/projet/list.php | 4 ++-- htdocs/projet/stats/index.php | 2 +- htdocs/projet/tasks/list.php | 2 +- htdocs/public/members/new.php | 6 +++--- htdocs/public/opensurvey/studs.php | 8 ++++---- htdocs/public/test/test_arrays.php | 8 ++++---- htdocs/public/test/test_forms.php | 6 +++--- htdocs/societe/admin/societe.php | 4 ++-- .../company/actions_card_company.class.php | 4 ++-- htdocs/societe/consumption.php | 2 +- htdocs/societe/list.php | 6 +++--- htdocs/societe/notify/card.php | 6 +++--- htdocs/societe/soc.php | 12 ++++++------ htdocs/supplier_proposal/card.php | 4 ++-- htdocs/user/card.php | 6 +++--- htdocs/user/hierarchy.php | 2 +- htdocs/user/index.php | 4 ++-- 110 files changed, 227 insertions(+), 216 deletions(-) diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 2321b76aac8..2571afcce86 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -365,7 +365,7 @@ if ($resql) { // Status print ''; - print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); + print Form::selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); print ''; }*/ // Action column 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 ''; $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 ''; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index e04cc7132f0..25e49c76745 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -174,7 +174,7 @@ if ($action == 'create') { print ''; print '' . $langs->trans("Statut") . ''; print ''; - print $form->selectarray('statut', $statut2label, GETPOST('statut')); + print Form::selectarray('statut', $statut2label, GETPOST('statut')); print ''; print ''; @@ -226,7 +226,7 @@ if ($action == 'create') { // Statut print '' . $langs->trans("Statut") . ''; - print $form->selectarray('statut', $statut2label, $object->statut); + print Form::selectarray('statut', $statut2label, $object->statut); print ''; print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index b77bc5446af..e49c5536979 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -254,7 +254,7 @@ if ($action == 'create') { print ''; print '' . $langs->trans("Codejournal") . ''; - print '' . $html->selectarray('code_journal', $code_journal_array) . ''; + print '' . Form::selectarray('code_journal', $code_journal_array) . ''; print ''; print ''; diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 8e265eb70f7..564cc4edaf5 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -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 ''; -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 ''; @@ -197,7 +197,7 @@ if ($conf->facture->enabled) if (! empty($conf->banque->enabled)) { 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 ''; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 6f5d1de5c87..c55469459a9 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -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/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 8d629175902..fd1bc79926e 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') diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index f17ca46299f..71ae89ddc19 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 ''.$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 "\n"; // Company @@ -1054,7 +1054,7 @@ else $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); 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 ""; // Photo @@ -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 { 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/list.php b/htdocs/adherents/list.php index aea09f73124..403cc3971f3 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -270,7 +270,7 @@ if ($resql) 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 ''; 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 ''.$langs->trans("AGENDA_DEFAULT_VIEW").''."\n"; print ' '."\n"; print ''."\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 ''."\n"; print ''; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 9e09bf87b1d..71de81958b9 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 ''; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 849916222dd..6fa5a6c0e7b 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"; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 8ee8b791303..91dcaf41131 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -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") @@ -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/ihm.php b/htdocs/admin/ihm.php index 51d0a6174c8..331ff97a6ff 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -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 ''; 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/mails.php b/htdocs/admin/mails.php index 52324dc1678..b2769dc8e2f 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -357,7 +357,7 @@ 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 { diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 8cc02613f6c..d862b80d6a8 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -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.='
'; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index b1ad347d8b7..7ff0a5fb358 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -212,7 +212,7 @@ 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/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 "\n"; print ''; - print $form->selectarray('user',$internalusers);// select_dolusers(0,'user',0); + print Form::selectarray('user',$internalusers);// select_dolusers(0,'user',0); print ''; print ''; - print $form->selectarray('action',$actions);// select_dolusers(0,'user',0); + print Form::selectarray('action',$actions);// select_dolusers(0,'user',0); print ''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 05fe548daff..b1d8cd480a2 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -187,7 +187,7 @@ if ($action == 'edit') // Method $var=!$var; 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 ''; 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 ''.$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").''; print ''.$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/comm/action/card.php b/htdocs/comm/action/card.php index 19633aa13d7..fa12c1c6b3b 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -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").': '; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index b12e8004bc4..3a2a28c984d 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1452,7 +1452,7 @@ if ($action == 'create') print '' . $langs->trans("DefaultModel") . ''; print ''; $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 ""; // 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); } 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/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 ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index da8b9012b14..7759002fdfd 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1602,7 +1602,7 @@ if ($action == 'create' && $user->rights->commande->creer) 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 ""; // Multicurrency diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 91a602c31a6..1a66ccf9f21 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,7 +398,7 @@ 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)) { diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index ebb9bedca2c..e94daeca65a 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -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 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/card.php b/htdocs/compta/bank/card.php index b33b0438552..420fc2e4687 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 @@ -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/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..88ec64f0a7b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2194,7 +2194,7 @@ if ($action == 'create') { 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 ''; print '' . $langs->trans('Value') . ':'; } @@ -2409,7 +2409,7 @@ if ($action == 'create') 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 ""; // Multicurrency diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index e833c0629b3..9aa6aca1663 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -343,7 +343,7 @@ if ($action == 'create') // Frequency 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::selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')); print ""; // First date of execution for cron @@ -360,7 +360,7 @@ if ($action == 'create') // Auto validate the invoice 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 ""; 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 '
'; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d227d127f69..982dbeb421e 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -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,7 +921,7 @@ 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); 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/prelevement/card.php b/htdocs/compta/prelevement/card.php index 9dd841e0add..e229a3a5d75 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -217,7 +217,7 @@ if ($id > 0) print $form->select_date('','','','','',"userfile",1,1); print ''; print ''.$langs->trans("TransMetod").''; - print $form->selectarray("methode",$bon->methodes_trans); + print Form::selectarray("methode",$bon->methodes_trans); print ''; /* print ''.$langs->trans("File").''; print ''; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index d43ba27ef26..c62c8c1c283 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -205,13 +205,13 @@ if ($id) //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/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..9d4543f702a 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') diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index fca007bfd1f..fc6196370d3 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -655,7 +655,7 @@ 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 @@ -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 diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index cee89d0970f..1dfd6acb8bc 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -553,7 +553,7 @@ if ($result) { print ''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('search_priv',$selectarray,$search_priv,1); + print Form::selectarray('search_priv',$selectarray,$search_priv,1); print ''; } // Extra fields @@ -587,7 +587,7 @@ if ($result) if (! empty($arrayfields['p.statut']['checked'])) { print ''; - print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print Form::selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print ''; } print ''; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index df6e0007023..505775be4df 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.='
'; } diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 2f1c3697058..589b2944e21 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -216,14 +216,14 @@ 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 ''; 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); @@ -236,7 +236,7 @@ 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); 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/html.form.class.php b/htdocs/core/class/html.form.class.php index d06677d97af..8e88fd31c99 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -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)) { @@ -3249,7 +3249,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') @@ -4650,7 +4650,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; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 0316fb461cf..cf46547b9d5 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -277,7 +277,7 @@ class FormActions } 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..2cd001bcf8b 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.= ''; @@ -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"; @@ -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"; @@ -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); } } 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.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 35736b56228..2ba92da0916 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -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..8026f6104c2 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 ''; } 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/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index f651c56e028..a4158bd686b 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -161,19 +161,19 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte.= ''; $texte.= ''.$langs->trans("DefaultModelPropalCreate").''; $texte.= ''; - $texte.= $form->selectarray('value2',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); + $texte.= Form::selectarray('value2',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelPropalToBill").''; $texte.= ''; - $texte.= $form->selectarray('value3',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); + $texte.= Form::selectarray('value3',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelPropalClosed").''; $texte.= ''; - $texte.= $form->selectarray('value4',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); + $texte.= Form::selectarray('value4',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); $texte.= ""; $texte.= ''; } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index ab906617b07..2a37b0c6b87 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -161,19 +161,19 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $texte.= ''; $texte.= ''.$langs->trans("DefaultModelSupplierProposalCreate").''; $texte.= ''; - $texte.= $form->selectarray('value2',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); + $texte.= Form::selectarray('value2',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelSupplierProposalToBill").''; $texte.= ''; - $texte.= $form->selectarray('value3',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); + $texte.= Form::selectarray('value3',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelSupplierProposalClosed").''; $texte.= ''; - $texte.= $form->selectarray('value4',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); + $texte.= Form::selectarray('value4',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); $texte.= ""; $texte.= ''; } diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 25b86cdc0bf..8bf6ac5f8a1 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -85,7 +85,7 @@ trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>) trans("Type"); ?> -selectarray('type',$type2label,GETPOST('type')); ?> + trans("Size"); ?> diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index eb365dbd5b8..9b08e68297d 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -230,7 +230,7 @@ print ' '; print ' '; print ' '; print ''; -print $form->selectarray('status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Enabled"), '-2'=>$langs->trans("EnabledAndDisabled"), '2'=>$langs->trans("Archived")), $status, 1); +print Form::selectarray('status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Enabled"), '-2'=>$langs->trans("EnabledAndDisabled"), '2'=>$langs->trans("Archived")), $status, 1); print ''; print ''; print ''; diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 7da3fadcc6e..81da7484b71 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -252,7 +252,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/expedition/card.php b/htdocs/expedition/card.php index 4c71256baf3..1e3c08bd5fa 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -680,7 +680,7 @@ if ($action == 'create') print "".$langs->trans("DeliveryMethod").""; print ''; $expe->fetch_delivery_methods(); - print $form->selectarray("shipping_method_id",$expe->meths,GETPOST('shipping_method_id','int'),1,0,0,"",1); + print Form::selectarray("shipping_method_id",$expe->meths,GETPOST('shipping_method_id','int'),1,0,0,"",1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print "\n"; @@ -714,7 +714,7 @@ if ($action == 'create') print ''; include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; $liste = ModelePdfExpedition::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); print "\n"; print ""; @@ -1455,7 +1455,7 @@ else if ($id || $ref) print ''; print ''; $object->fetch_delivery_methods(); - print $form->selectarray("shipping_method_id",$object->meths,$object->shipping_method_id,1,0,0,"",1); + print Form::selectarray("shipping_method_id",$object->meths,$object->shipping_method_id,1,0,0,"",1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''; print ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 288a1b92f37..4b08afabb21 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -216,7 +216,7 @@ if ($resql) } // Status print ''; - print $form->selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')),$viewstatut,1); + print Form::selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')),$viewstatut,1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index cc5e770d02a..c7c7a561787 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -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/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index 6c515192f78..905a3c45291 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -231,7 +231,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/fichinter/card.php b/htdocs/fichinter/card.php index 71fec224137..19dfd0f3fc2 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1107,7 +1107,7 @@ if ($action == 'create') print ''.$langs->trans("DefaultModel").''; print ''; $liste=ModelePDFFicheinter::liste_modeles($db); - print $form->selectarray('model',$liste,$conf->global->FICHEINTER_ADDON_PDF); + print Form::selectarray('model',$liste,$conf->global->FICHEINTER_ADDON_PDF); print ""; // Public note diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index d86c2b86274..c72a2081e36 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -198,7 +198,7 @@ if ($result) } print ''; $liststatus=$interventionstatic->statuts_short; - print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); + print Form::selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 5cdd7923cbd..428f55bc5cd 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -254,7 +254,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/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 6c7d3ef1b35..2da648e01cd 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -3016,7 +3016,7 @@ elseif (! empty($object->id)) $liv['nev'] = $langs->trans("NeverReceived"); $liv['can'] = $langs->trans("Canceled"); - print $form->selectarray("type",$liv); + print Form::selectarray("type",$liv); print ''; print ''.$langs->trans("Comment").''; diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 3f75bca3a35..a4d08a2ac75 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -364,7 +364,7 @@ if ($action == 'create' && !$error) { print '' . $langs->trans('Model') . ''; print ''; $liste = ModelePDFSuppliersInvoices::liste_modeles($db); - print $html->selectarray('model', $liste, $conf->global->INVOICE_SUPPLIER_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->INVOICE_SUPPLIER_ADDON_PDF); print ""; // Public note diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index dafe95e419d..34d8a0e13e4 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -338,7 +338,7 @@ if ($resql) print ''; print ''; $liststatus=array('0'=>$langs->trans("Draft"),'1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid")); - print $form->selectarray('filtre', $liststatus, $search_status, 1); + print Form::selectarray('filtre', $liststatus, $search_status, 1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 8cae9592033..eb7604cc2af 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -812,7 +812,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create $labeltoshow .= ($val['delay'] > 0 ? ' ('.$langs->trans("NoticePeriod").': '.$val['delay'].' '.$langs->trans("days").')':''); $arraytypeleaves[$val['rowid']]=$labeltoshow; } - print $form->selectarray('type', $arraytypeleaves, (GETPOST('type')?GETPOST('type'):''), 1); + print Form::selectarray('type', $arraytypeleaves, (GETPOST('type')?GETPOST('type'):''), 1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''; print ''; @@ -829,7 +829,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create $form->select_date($tmpdate,'date_debut_'); } print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):'morning')); + print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):'morning')); print ''; print ''; @@ -845,7 +845,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create $form->select_date($tmpdate,'date_fin_'); } print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):'afternoon')); + print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):'afternoon')); print ''; print ''; @@ -1037,7 +1037,7 @@ else print ''; $form->select_date($cp->date_debut,'date_debut_'); print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); + print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); print ''; print ''; } @@ -1059,7 +1059,7 @@ else print ''; $form->select_date($cp->date_fin,'date_fin_'); print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); + print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); print ''; print ''; } diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index 63d07cebddf..e06b74217a6 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -153,7 +153,7 @@ if ($object->id) print ''; $form->select_date($object->date_debut,'date_debut_'); print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); + print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); print ''; print ''; } @@ -175,7 +175,7 @@ if ($object->id) print ''; $form->select_date($object->date_fin,'date_fin_'); print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); + print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); print ''; print ''; } diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index fb6f41f4f39..e548b3d2403 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -224,7 +224,7 @@ if ($action == 'create') print ''; print ''.fieldLabel('Status','status',1).''; print ''; - print $form->selectarray('status',$status2label,GETPOST('status')); + print Form::selectarray('status',$status2label,GETPOST('status')); print ''; print ''; @@ -296,7 +296,7 @@ else if ($id) // Status print ''.fieldLabel('Status','status',1).''; - print $form->selectarray('status',$status2label,$object->status); + print Form::selectarray('status',$status2label,$object->status); print ''; print ''; diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index b440b5ee43e..5ab76133748 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -106,7 +106,7 @@ print ''; print ''; print ''; $arraystatus=array(''=>' ','expired'=>$langs->trans("Expired"),'opened'=>$langs->trans("Opened")); -print ''. $form->selectarray('status', $arraystatus, $status).''; +print ''. Form::selectarray('status', $arraystatus, $status).''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 5c14a20de23..d51a308e679 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -527,7 +527,7 @@ if (GETPOST('ajoutsujet')) print $langs->trans("AddNewColumn") .':

'; print $langs->trans("Title").'
'; $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); - print $langs->trans("Type").' '.$form->selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'

'; + print $langs->trans("Type").' '.Form::selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'

'; print ''; print '     '; print ''; @@ -850,12 +850,12 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); - print $form->selectarray("choix".$i, $arraychoice, $car); + print Form::selectarray("choix".$i, $arraychoice, $car); } if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); - print $form->selectarray("choix".$i, $arraychoice, $car); + print Form::selectarray("choix".$i, $arraychoice, $car); } print ''."\n"; } @@ -948,12 +948,12 @@ if (empty($testligneamodifier)) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); - print $form->selectarray("choix".$i, $arraychoice); + print Form::selectarray("choix".$i, $arraychoice); } if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); - print $form->selectarray("choix".$i, $arraychoice); + print Form::selectarray("choix".$i, $arraychoice); } print ''."\n"; } diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index a415d6b4987..8e41b2398e1 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -137,7 +137,7 @@ for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) { } print ''. $langs->trans("TitleChoice") .' '.$j.': '; $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); - print '   '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]); + print '   '.$langs->trans("Type").' '.Form::selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]); print ''."\n"; } diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index f794989c59e..6e34fb836b0 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -157,7 +157,7 @@ print ''; $var=!$var; print ''; print $langs->trans("PAYPAL_SSLVERSION").''; -print $form->selectarray("PAYPAL_SSLVERSION",array('1'=> $langs->trans('TLSv1'),'6'=> $langs->trans('TLSv1.2')),$conf->global->PAYPAL_SSLVERSION); +print Form::selectarray("PAYPAL_SSLVERSION",array('1'=> $langs->trans('TLSv1'),'6'=> $langs->trans('TLSv1.2')),$conf->global->PAYPAL_SSLVERSION); print ''; // Usage Parameters @@ -170,7 +170,7 @@ print "\n"; $var=!$var; print ''; print $langs->trans("PAYPAL_API_INTEGRAL_OR_PAYPALONLY").''; -print $form->selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY",array('integral'=> $langs->trans('PaypalModeIntegral'),'paypalonly'=> $langs->trans('PaypalModeOnlyPaypal')),$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY); +print Form::selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY",array('integral'=> $langs->trans('PaypalModeIntegral'),'paypalonly'=> $langs->trans('PaypalModeOnlyPaypal')),$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY); print ''; /*$var=!$var; diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index 7c9a46d8972..c8230f8421e 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -290,7 +290,7 @@ if ($action == 'create_updater' || $action == 'edit_updater') { foreach ($price_globals->listGlobalVariables() as $entry) { $globals_list[$entry->id]=$entry->code; } - print $form->selectarray('fk_variable', $globals_list, (empty($price_updaters->fk_variable)?0:$price_updaters->fk_variable)); + print Form::selectarray('fk_variable', $globals_list, (empty($price_updaters->fk_variable)?0:$price_updaters->fk_variable)); print ''; //Description print ''; @@ -305,7 +305,7 @@ if ($action == 'create_updater' || $action == 'edit_updater') { foreach ($price_updaters->types as $val) { $type_list[$val] = $langs->trans("GlobalVariableUpdaterType".$val); } - print $form->selectarray('type', $type_list, $type); + print Form::selectarray('type', $type_list, $type); // This code submits form when type is changed print '