From 87cd6e1e40fcb8b794a99109c51c3ee3da4ff4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= <marcosgdf@gmail.com> 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 '<td class="liste_titre" align="center">'; - 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 '</td>'; }*/ // 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 '</td>'; } @@ -197,7 +197,7 @@ if (! $conf->use_javascript_ajax) { } else { print '<td>'; $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 '</td>'; } 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 '<tr>'; print '<td class="fieldrequired">' . $langs->trans("Statut") . '</td>'; print '<td class="valeur">'; - print $form->selectarray('statut', $statut2label, GETPOST('statut')); + print Form::selectarray('statut', $statut2label, GETPOST('statut')); print '</td></tr>'; print '</table>'; @@ -226,7 +226,7 @@ if ($action == 'create') { // Statut print '<tr><td>' . $langs->trans("Statut") . '</td><td>'; - print $form->selectarray('statut', $statut2label, $object->statut); + print Form::selectarray('statut', $statut2label, $object->statut); print '</td></tr>'; print '</table>'; 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 '<tr>'; print '<td>' . $langs->trans("Codejournal") . '</td>'; - print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>'; + print '<td>' . Form::selectarray('code_journal', $code_journal_array) . '</td>'; print '</tr>'; print '<tr>'; 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 '<td>'; -print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0); +print Form::selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0); print '</td><td align="center" width="80">'; print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">'; print '</td>'; @@ -197,7 +197,7 @@ if ($conf->facture->enabled) if (! empty($conf->banque->enabled)) { print '<td>'; - 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 '</td><td align="center" width="80">'; print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">'; print '</td>'; 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 "</td></tr>\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 '<font class="error">'.$langs->trans("NoTypeDefinedGoToSetup").'</font>'; } @@ -817,7 +817,7 @@ else $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Moral"); print '<tr><td class="fieldrequired">'.$langs->trans("Nature")."</td><td>\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 "</td>\n"; // Company @@ -1054,7 +1054,7 @@ else $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>'; - 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 "</td>"; // Photo @@ -1075,7 +1075,7 @@ else print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>'; 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 '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc").'">'; print '</form>'; print '<br>'; @@ -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 '<br>'.$langs->trans("Login").': <input size="10" type="text" name="foruserlogin" value="'.GETPOST('foruserlogin').'">'; print '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc").'">'; print '</form>'; @@ -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 '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc").'">'; print '</form>'; print '<br>'; 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 '<td class="liste_titre">'; $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 '</td>'; print '<td class="liste_titre"> </td>'; 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 '<td>'.$langs->trans("AGENDA_DEFAULT_VIEW").'</td>'."\n"; print '<td align="center"> </td>'."\n"; print '<td align="right">'."\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 '</td></tr>'."\n"; print '</table>'; 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 '<td class="center">'; - 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 '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n"; print '</td>'; 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 '<tr><td align="left"></label for="clt1">'.$langs->trans("CalcLocaltax").'</label>: '; - print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); + print Form::selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); print '</td></tr>'; print "</table>"; print "</td></tr>\n"; @@ -650,7 +650,7 @@ if ($action == 'edit' || $action == 'updateedit') print '</td></tr>'; } print '<tr><td align="left"><label for="clt2">'.$langs->trans("CalcLocaltax").'</label>: '; - print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); + print Form::selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); print '</td></tr>'; print "</table>"; print "</td></tr>\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 '<td>'; - 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 '</td>'; } // Le type de l'element (pour les type de contact) elseif ($fieldlist[$field] == 'element') { print '<td>'; - 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 '</td>'; } // La source de l'element (pour les type de contact) elseif ($fieldlist[$field] == 'source') { print '<td>'; - 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 '</td>'; } 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 '</td>'; } // Le type de taxe locale elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type') { print '<td align="center">'; - 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 '</td>'; } 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 '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>'; $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 '</td>'; print '<td width="20"> </td>'; print '</tr>'; 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 '</td><td>'.$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 '</td><td>'.$langs->trans("LDAPDnContactActiveExample").'</td></tr>'; } @@ -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 '</td><td>'.$langs->trans("LDAPDnMemberActiveExample").'</td></tr>'; } @@ -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 '</td><td> </td></tr>'; // Version @@ -171,7 +171,7 @@ print '<tr '.$bc[$var].'><td>'.$langs->trans("Version").'</td><td>'; $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 '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>'; // Serveur primaire @@ -213,7 +213,7 @@ print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPServerUseTLS").'</td><td>'; $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 '</td><td>'.$langs->trans("LDAPServerUseTLSExample").'</td></tr>'; print '<tr class="liste_titre">'; 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') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">'; $moreforfilter.= '</div>'; $moreforfilter.='<div class="divsearchfield">'; - $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.= '</div>'; $moreforfilter.='<div class="divsearchfield">'; - $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.= '</div>'; $moreforfilter.=' '; $moreforfilter.='<div class="divsearchfield">'; 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 '<td align="right" width="400">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="set_MULTICURRENCY_MODIFY_RATE_APPLICATION">'; -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 '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; print '</td></tr>'; 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 "</tr>\n"; print '<tr class="impair"><td align="left">'; - print $form->selectarray('user',$internalusers);// select_dolusers(0,'user',0); + print Form::selectarray('user',$internalusers);// select_dolusers(0,'user',0); print '</td>'; print '<td>'; - print $form->selectarray('action',$actions);// select_dolusers(0,'user',0); + print Form::selectarray('action',$actions);// select_dolusers(0,'user',0); print '</td>'; print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>'; 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 '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>'; - 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 '<font class="error">'.$langs->trans("None").'</font>'; print '</td></tr>'; 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 '</div></div>'; // 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 '<tr><td>'.$langs->trans("BehaviourOnClick").'</td><td>'; $liste=array(0=>$langs->trans("ReplaceWindow"),1=>$langs->trans("OpenANewWindow")); - print $form->selectarray('target',$liste,1); + print Form::selectarray('target',$liste,1); print '</td><td class="hideonsmartphone">'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'</td></tr>'; print '<tr><td>'.$langs->trans("Owner").'</td><td>'; @@ -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 '<div class="repeateventBYMONTHDAY">'; print $langs->trans("DayOfMonth").': <input type="input" size="2" name="BYMONTHDAY" value="'.$selectedrecurrulebymonthday.'">'; 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 '<td>' . $langs->trans("DefaultModel") . '</td>'; print '<td colspan="2">'; $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 "</td></tr>"; // 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.='<div class="divsearchfield">'; $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.='</div>'; } 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 '<div class="fichecenter"><div class="fichethirdleft">'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 '<td colspan="2">'; 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 "</td></tr>"; // 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.='<div class="divsearchfield">'; $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.='</div>'; } $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 '</td>'; 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 '<td>'; 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 "</td></tr>"; // 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 '<div class="fichecenter"><div class="fichethirdleft">'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>'; print '<td colspan="3">'; - 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 '</td></tr>'; // Country @@ -861,7 +861,7 @@ else // Status print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>'; print '<td colspan="3">'; - 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 '</td></tr>'; // 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 '</td></tr>'; print '<tr><td>'.$langs->trans("Year").'</td><td>'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 '<td class="nowrap" style="padding-left: 5px">'; $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 '</td>'; print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>'; } @@ -2409,7 +2409,7 @@ if ($action == 'create') print '<td colspan="2">'; 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 "</td></tr>"; // 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 "<tr><td>".$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))."</td><td>"; - print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='5' /> ".$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 "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='5' /> ".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 "</td></tr>"; // First date of execution for cron @@ -360,7 +360,7 @@ if ($action == 'create') // Auto validate the invoice print "<tr><td>".$langs->trans("StatusOfGeneratedInvoices")."</td><td>"; $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 "</td></tr>"; print "</table>"; @@ -749,7 +749,7 @@ else print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">'; print '<tr><td>'; - print "<input type='text' name='frequency' value='".$object->frequency."' size='5' /> ".$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 "<input type='text' name='frequency' value='".$object->frequency."' size='5' /> ".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 '</td>'; print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; print '</tr></table></form>'; 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.='<div class="divsearchfield">'; $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.='</div>'; } $parameters=array(); @@ -921,7 +921,7 @@ if ($resql) print '<td class="liste_titre"></td>'; print '<td class="liste_titre" align="right">'; $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 '</td>'; print '<td class="liste_titre" align="center">'; $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 '<div class="fichecenter"><div class="fichethirdleft">'; print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>'; 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 '</td></tr>'; // User print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>'; @@ -251,7 +251,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 '</td></tr>'; print '<tr '.$bc[false].'><td width="20%">'.$langs->trans("TransMetod").'</td><td>'; - print $form->selectarray("methode",$bon->methodes_trans); + print Form::selectarray("methode",$bon->methodes_trans); print '</td></tr>'; /* print '<tr><td width="20%">'.$langs->trans("File").'</td><td>'; print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">'; 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 '<tr><td class="fieldrequired valid">'.$langs->trans("RefusedReason").'</td>'; print '<td class="valid">'; - print $form->selectarray("motif", $rej->motifs); + print Form::selectarray("motif", $rej->motifs); print '</td></tr>'; //Facturer print '<tr><td class="valid">'.$langs->trans("RefusedInvoicing").'</td>'; print '<td class="valid" colspan="2">'; - print $form->selectarray("facturer", $rej->facturer); + print Form::selectarray("facturer", $rej->facturer); print '</td></tr>'; print '</table><br>'; 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 '<tr><td><label for="priv">'.$langs->trans("ContactVisibility").'</label></td><td colspan="3">'; $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 '</td></tr>'; // Categories @@ -891,7 +891,7 @@ else // Visibility print '<tr><td><label for="priv">'.$langs->trans("ContactVisibility").'</label></td><td colspan="3">'; $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 '</td></tr>'; // 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 '<td class="liste_titre" align="center">'; $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 '</td>'; } // Extra fields @@ -587,7 +587,7 @@ if ($result) if (! empty($arrayfields['p.statut']['checked'])) { print '<td class="liste_titre" align="center">'; - 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 '</td>'; } print '<td class="liste_titre" align="right">'; 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.='<div class="divsearchfield">'; $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.='</div>'; } 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 '</td>'; print '<td class="liste_titre" align="center">'; $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 '</td>'; print '<td class="liste_titre" align="center">'; $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 '</td>'; print '<td class="liste_titre" align="right">'; $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.='<tr><td>'; if (! empty($input['label'])) $more.=$input['label'].'</td><td valign="top" colspan="2" align="left">'; - $more.=$this->selectarray($input['name'],$input['values'],$input['default'],1); + $more.= Form::selectarray($input['name'],$input['values'],$input['default'],1); $more.='</td></tr>'."\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.= '</th>'; } 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.= '<div style="padding: 3px 0 3px 0">'."\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.= '<input class="button" type="submit" value="'.$langs->trans('Use').'" name="modelselected" id="modelselected">'; @@ -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.= "</td></tr>\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.= "</td></tr>\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 '<input type="hidden" name="consttype" value="yesno">'; print '</td>'; } 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 '<td class="liste_titre maxwidthonsmartphone">'; - 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 '</td>'; // 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.= '<tr>'; $texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalCreate").'</td>'; $texte.= '<td colspan="">'; - $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.= "</td></tr>"; $texte.= '<tr>'; $texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalToBill").'</td>'; $texte.= '<td colspan="">'; - $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.= "</td></tr>"; $texte.= '<tr>'; $texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalClosed").'</td>'; $texte.= '<td colspan="">'; - $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.= "</td></tr>"; $texte.= '</table>'; } 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.= '<tr>'; $texte.= '<td width="60%;">'.$langs->trans("DefaultModelSupplierProposalCreate").'</td>'; $texte.= '<td colspan="">'; - $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.= "</td></tr>"; $texte.= '<tr>'; $texte.= '<td width="60%;">'.$langs->trans("DefaultModelSupplierProposalToBill").'</td>'; $texte.= '<td colspan="">'; - $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.= "</td></tr>"; $texte.= '<tr>'; $texte.= '<td width="60%;">'.$langs->trans("DefaultModelSupplierProposalClosed").'</td>'; $texte.= '<td colspan="">'; - $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.= "</td></tr>"; $texte.= '</table>'; } 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 @@ <tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><input type="text" name="attrname" id="attrname" size="10" value="<?php echo GETPOST('attrname'); ?>"> (<?php echo $langs->trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)</td></tr> <!-- Type --> <tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur"> -<?php print $form->selectarray('type',$type2label,GETPOST('type')); ?> +<?php print Form::selectarray('type',$type2label,GETPOST('type')); ?> </td></tr> <!-- Size --> <tr><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td class="valeur"><input id="size" type="text" name="size" size="5" value="<?php echo (GETPOST('size')?GETPOST('size'):''); ?>"></td></tr> 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 '<td> </td>'; print '<td> </td>'; print '<td> </td>'; print '<td class="liste_titre" align="center">'; -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 '</td><td class="liste_titre" align="right">'; print '<input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; 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 '<div class="fichecenter"><div class="fichethirdleft">'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 "<tr><td>".$langs->trans("DeliveryMethod")."</td>"; print '<td colspan="3">'; $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 "</td></tr>\n"; @@ -714,7 +714,7 @@ if ($action == 'create') print '<td colspan="3">'; 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 "</td></tr>\n"; print "</table>"; @@ -1455,7 +1455,7 @@ else if ($id || $ref) print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="setshipping_method_id">'; $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 '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; 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 '<td align="right">'; - 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 '</td>'; print '<td class="liste_titre" align="right">'; $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 '<div class="fichecenter"><div class="fichethirdleft">'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 '</td></tr>'; print '<tr><td>'.$langs->trans("Year").'</td><td>'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 '<td>'.$langs->trans("DefaultModel").'</td>'; print '<td colspan="2">'; $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 "</td></tr>"; // 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 '<td class="liste_titre" align="right">'; $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 '</td>'; print '<td class="liste_titre" align="right">'; $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 '<div class="fichecenter"><div class="fichethirdleft">'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; 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 '</td></tr>'; print '<tr><td>'.$langs->trans("Comment").'</td><td><input size="40" type="text" name="comment"></td></tr>'; 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 '<tr><td>' . $langs->trans('Model') . '</td>'; print '<td>'; $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 "</td></tr>"; // 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 '<input class="flat" type="text" size="6" name="search_amount_all_tax" value="'.$search_amount_all_tax.'">'; print '</td><td class="liste_titre" align="right">'; $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 '</td>'; print '<td class="liste_titre" align="right">'; $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 '</td>'; print '</tr>'; @@ -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 '</td>'; print '</tr>'; @@ -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 '</td>'; print '</tr>'; @@ -1037,7 +1037,7 @@ else print '<td>'; $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 '</td>'; print '</tr>'; } @@ -1059,7 +1059,7 @@ else print '<td>'; $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 '</td>'; print '</tr>'; } 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 '<td>'; $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 '</td>'; print '</tr>'; } @@ -175,7 +175,7 @@ if ($object->id) print '<td>'; $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 '</td>'; print '</tr>'; } 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 '<tr>'; print '<td>'.fieldLabel('Status','status',1).'</td>'; print '<td>'; - print $form->selectarray('status',$status2label,GETPOST('status')); + print Form::selectarray('status',$status2label,GETPOST('status')); print '</td></tr>'; print '</table>'; @@ -296,7 +296,7 @@ else if ($id) // Status print '<tr><td>'.fieldLabel('Status','status',1).'</td><td>'; - print $form->selectarray('status',$status2label,$object->status); + print Form::selectarray('status',$status2label,$object->status); print '</td></tr>'; print '</table>'; 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 '<td></td>'; print '<td></td>'; print '<td></td>'; $arraystatus=array(''=>' ','expired'=>$langs->trans("Expired"),'opened'=>$langs->trans("Opened")); -print '<td align="center">'. $form->selectarray('status', $arraystatus, $status).'</td>'; +print '<td align="center">'. Form::selectarray('status', $arraystatus, $status).'</td>'; print '<td class="liste_titre" align="right">'; $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") .':<br><br>'; print $langs->trans("Title").' <input type="text" name="nouvellecolonne" size="40"><br>'; $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); - print $langs->trans("Type").' '.$form->selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'<br><br>'; + print $langs->trans("Type").' '.Form::selectarray("typecolonne", $tmparray, GETPOST('typecolonne')).'<br><br>'; print '<input type="submit" class="button" name="ajoutercolonne" value="'.dol_escape_htmltag($langs->trans("Add")).'">'; print ' '; print '<input type="submit" class="button" name="retoursondage" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">'; @@ -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 '</td>'."\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 '</td>'."\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 '<tr><td>'. $langs->trans("TitleChoice") .' '.$j.': </td><td><input type="text" name="choix[]" size="40" maxlength="40" value="'.dol_escape_htmltag($_SESSION["choix$i"]).'" id="choix'.$i.'">'; $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 '</td></tr>'."\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 '</td></tr>'; $var=!$var; print '<tr '.$bc[$var].'><td class="fieldrequired">'; print $langs->trans("PAYPAL_SSLVERSION").'</td><td>'; -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 '</td></tr>'; // Usage Parameters @@ -170,7 +170,7 @@ print "</tr>\n"; $var=!$var; print '<tr '.$bc[$var].'><td class="fieldrequired">'; print $langs->trans("PAYPAL_API_INTEGRAL_OR_PAYPALONLY").'</td><td>'; -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 '</td></tr>'; /*$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 '</td></tr>'; //Description print '<tr>'; @@ -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 '<script type="text/javascript"> jQuery(document).ready(run); diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 25e52079dc4..b996a66c75f 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -582,7 +582,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES)) $current_rule='PRODUIT_MULTIPRIC if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) $current_rule='PRODUIT_CUSTOMER_PRICES_BY_QTY'; if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) $current_rule='PRODUIT_CUSTOMER_PRICES'; if ((!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) && (!empty($conf->global->PRODUIT_MULTIPRICES))) $current_rule='PRODUIT_CUSTOMER_PRICES_BY_QTY&PRODUIT_MULTIPRICES'; -print $form->selectarray("princingrule",$select_pricing_rules,$current_rule); +print Form::selectarray("princingrule",$select_pricing_rules,$current_rule); print '</td><td align="right" rowspan="'.$rowspan.'" class="nohover">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</td>'; @@ -627,7 +627,7 @@ else '2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",2).')', '3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",3).')', ); - print $form->selectarray("activate_usesearchtoselectproduct",$arrval,$conf->global->PRODUIT_USE_SEARCH_TO_SELECT); + print Form::selectarray("activate_usesearchtoselectproduct",$arrval,$conf->global->PRODUIT_USE_SEARCH_TO_SELECT); print '</td>'; } print '</tr>'; diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index e32d31122dc..d91ab5a010e 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -126,11 +126,11 @@ class ActionsCardProduct { // Status $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); - $this->tpl['status'] = $form->selectarray('statut',$statutarray,$this->status); + $this->tpl['status'] = Form::selectarray('statut',$statutarray,$this->status); //To Buy $statutarray=array('1' => $langs->trans("Yes"), '0' => $langs->trans("No")); - $this->tpl['tobuy'] = $form->selectarray('tobuy',$statutarray,$this->status_buy); + $this->tpl['tobuy'] = Form::selectarray('tobuy',$statutarray,$this->status_buy); $this->tpl['description'] = $this->description; $this->tpl['note'] = $this->note; @@ -179,14 +179,14 @@ class ActionsCardProduct { // Status $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); - $this->tpl['status'] = $form->selectarray('statut',$statutarray,$_POST["statut"]); + $this->tpl['status'] = Form::selectarray('statut',$statutarray,$_POST["statut"]); $statutarray=array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy")); - $this->tpl['status_buy'] = $form->selectarray('statut_buy',$statutarray,$_POST["statut_buy"]); + $this->tpl['status_buy'] = Form::selectarray('statut_buy',$statutarray,$_POST["statut_buy"]); // Finished $statutarray=array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); - $this->tpl['finished'] = $form->selectarray('finished',$statutarray,$this->object->finished); + $this->tpl['finished'] = Form::selectarray('finished',$statutarray,$this->object->finished); // Weight $this->tpl['weight'] = $this->object->weight; diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php index c5f968dee4f..8718c1ad813 100644 --- a/htdocs/product/canvas/product/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php @@ -52,12 +52,12 @@ $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSe <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td> -<td><?php echo $form->selectarray('statut',$statutarray,$object->status); ?></td> +<td><?php echo Form::selectarray('statut',$statutarray,$object->status); ?></td> </tr> <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td> -<td><?php echo $form->selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> +<td><?php echo Form::selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> </tr> <?php if (! empty($conf->stock->enabled)) { ?> diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php index 822cb03a6e0..a5096c82554 100644 --- a/htdocs/product/canvas/product/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_edit.tpl.php @@ -52,12 +52,12 @@ dol_htmloutput_errors($object->error,$object->errors); <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td> -<td><?php echo $form->selectarray('statut',$statutarray,$object->status); ?></td> +<td><?php echo Form::selectarray('statut',$statutarray,$object->status); ?></td> </tr> <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td> -<td><?php echo $form->selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> +<td><?php echo Form::selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> </tr> <?php if (! empty($conf->stock->enabled)) { ?> diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 7bc04ecb42a..9cfb23bc156 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -125,11 +125,11 @@ class ActionsCardService { // Status $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); - $this->tpl['status'] = $form->selectarray('statut',$statutarray,$this->status); + $this->tpl['status'] = Form::selectarray('statut',$statutarray,$this->status); //To Buy $statutarray=array('1' => $langs->trans("Yes"), '0' => $langs->trans("No")); - $this->tpl['tobuy'] = $form->selectarray('tobuy',$statutarray,$this->status_buy); + $this->tpl['tobuy'] = Form::selectarray('tobuy',$statutarray,$this->status_buy); $this->tpl['description'] = $this->description; $this->tpl['note'] = $this->note; @@ -181,10 +181,10 @@ class ActionsCardService { // Status $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); - $this->tpl['status'] = $form->selectarray('statut',$statutarray,$_POST["statut"]); + $this->tpl['status'] = Form::selectarray('statut',$statutarray,$_POST["statut"]); $statutarray=array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy")); - $this->tpl['status_buy'] = $form->selectarray('statut_buy',$statutarray,$_POST["statut_buy"]); + $this->tpl['status_buy'] = Form::selectarray('statut_buy',$statutarray,$_POST["statut_buy"]); // Duration unit // TODO creer fonction diff --git a/htdocs/product/canvas/service/tpl/card_create.tpl.php b/htdocs/product/canvas/service/tpl/card_create.tpl.php index 39c91695f8f..52bf5bef279 100644 --- a/htdocs/product/canvas/service/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_create.tpl.php @@ -50,12 +50,12 @@ $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSe <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td> -<td><?php echo $form->selectarray('statut',$statutarray,$object->status); ?></td> +<td><?php echo Form::selectarray('statut',$statutarray,$object->status); ?></td> </tr> <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td> -<td><?php echo $form->selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> +<td><?php echo Form::selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> </tr> <tr><td><?php echo $langs->trans("Duration"); ?></td> diff --git a/htdocs/product/canvas/service/tpl/card_edit.tpl.php b/htdocs/product/canvas/service/tpl/card_edit.tpl.php index fd403e647c6..968dec5415a 100644 --- a/htdocs/product/canvas/service/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_edit.tpl.php @@ -49,12 +49,12 @@ dol_htmloutput_errors($object->error,$object->errors); <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td> -<td><?php echo $form->selectarray('statut',$statutarray,$object->status); ?></td> +<td><?php echo Form::selectarray('statut',$statutarray,$object->status); ?></td> </tr> <tr> <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td> -<td><?php echo $form->selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> +<td><?php echo Form::selectarray('statut_buy',$statutarray,$object->status_tobuy); ?></td> </tr> <tr><td><?php echo $langs->trans("Duration"); ?></td> diff --git a/htdocs/product/card.php b/htdocs/product/card.php index ef126a85b52..b94d775db40 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -876,13 +876,13 @@ else // On sell print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">'; $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); - print $form->selectarray('statut',$statutarray,GETPOST('statut')); + print Form::selectarray('statut',$statutarray,GETPOST('statut')); print '</td></tr>'; // To buy print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">'; $statutarray=array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy")); - print $form->selectarray('statut_buy',$statutarray,GETPOST('statut_buy')); + print Form::selectarray('statut_buy',$statutarray,GETPOST('statut_buy')); print '</td></tr>'; // Batch number management @@ -890,7 +890,7 @@ else { print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">'; $statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch")); - print $form->selectarray('status_batch',$statutarray,GETPOST('status_batch')); + print Form::selectarray('status_batch',$statutarray,GETPOST('status_batch')); print '</td></tr>'; } @@ -953,7 +953,7 @@ else { print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">'; $statutarray=array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); - print $form->selectarray('finished',$statutarray,GETPOST('finished'),1); + print Form::selectarray('finished',$statutarray,GETPOST('finished'),1); print '</td></tr>'; } @@ -1187,7 +1187,7 @@ else if ($conf->productbatch->enabled) { print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">'; $statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch")); - print $form->selectarray('status_batch',$statutarray,$object->status_batch); + print Form::selectarray('status_batch',$statutarray,$object->status_batch); print '</td></tr>'; } @@ -1255,7 +1255,7 @@ else { print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">'; $statutarray=array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); - print $form->selectarray('finished',$statutarray,$object->finished); + print Form::selectarray('finished',$statutarray,$object->finished); print '</td></tr>'; } @@ -1802,7 +1802,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $var=!$var; $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftProposals").'</td><td colspan="2">'; - $html .= $form->selectarray("propalid", $otherprop, 0, 1); + $html .= Form::selectarray("propalid", $otherprop, 0, 1); $html .= '</td></tr>'; } else @@ -1828,7 +1828,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $var=!$var; $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftOrders").'</td><td colspan="2">'; - $html .= $form->selectarray("commandeid", $othercom, 0, 1); + $html .= Form::selectarray("commandeid", $othercom, 0, 1); $html .= '</td></tr>'; } else @@ -1854,7 +1854,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $var=!$var; $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftInvoices").'</td><td colspan="2">'; - $html .= $form->selectarray("factureid", $otherinvoice, 0, 1); + $html .= Form::selectarray("factureid", $otherinvoice, 0, 1); $html .= '</td></tr>'; } else diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index 9b20371ea5b..54a219c49c9 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -178,7 +178,7 @@ $price_expression_list = array(0 => $langs->trans("New")); //Put the new as firs foreach ($price_expression->list_price_expression() as $entry) { $price_expression_list[$entry->id] = $entry->title; } -print $form->selectarray('expression_selection', $price_expression_list, $eid); +print Form::selectarray('expression_selection', $price_expression_list, $eid); print '</td></tr>'; // Title input diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index f5fc8c8655c..339aad05c34 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -459,7 +459,7 @@ if ($id > 0 || $ref) $price_expression_list[$entry->id] = $entry->title; } $price_expression_preselection = GETPOST('eid') ? GETPOST('eid') : ($object->fk_supplier_price_expression ? $object->fk_supplier_price_expression : '0'); - print $form->selectarray('eid', $price_expression_list, $price_expression_preselection); + print Form::selectarray('eid', $price_expression_list, $price_expression_preselection); print ' <div id="expression_editor" class="button">'.$langs->trans("PriceExpressionEditor").'</div>'; print '</td></tr>'; // This code hides the numeric price input if is not selected, loads the editor page if editor button is pressed diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 55413f7ed1d..bb15fbc4327 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -541,13 +541,13 @@ else if (! empty($arrayfields['p.tosell']['checked'])) { print '<td class="liste_titre" align="center">'; - print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1); + print Form::selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1); print '</td >'; } if (! empty($arrayfields['p.tobuy']['checked'])) { print '<td class="liste_titre" align="center">'; - print $form->selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1); + print Form::selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1); print '</td>'; } print '<td class="liste_titre" align="right">'; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 857a6634bf6..9dfb40c8a55 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -991,7 +991,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) $price_expression_list[$entry->id] = $entry->title; } $price_expression_preselection = GETPOST('eid') ? GETPOST('eid') : ($object->fk_price_expression ? $object->fk_price_expression : '0'); - print $form->selectarray('eid', $price_expression_list, $price_expression_preselection); + print Form::selectarray('eid', $price_expression_list, $price_expression_preselection); print ' <div id="expression_editor" class="button">'.$langs->trans("PriceExpressionEditor").'</div>'; print '</td></tr>'; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 58f95625d94..f561c771ff2 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -153,7 +153,7 @@ if ($result) print '</td>'; print '<td class="liste_titre" align="right">'; - print $form->selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1); + print Form::selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1); print '</td>'; print '<td class="liste_titre" align="right">'; diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index ca351f7d1bb..30018e90294 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -928,7 +928,7 @@ else '2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",2).')', '3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",3).')', ); - print $form->selectarray("activate_PROJECT_USE_SEARCH_TO_SELECT",$arrval,$conf->global->PROJECT_USE_SEARCH_TO_SELECT); + print Form::selectarray("activate_PROJECT_USE_SEARCH_TO_SELECT",$arrval,$conf->global->PROJECT_USE_SEARCH_TO_SELECT); print '</td><td align="right">'; print '<input type="submit" class="button" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; print "</td>"; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 51b3477b248..0383d4388f1 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -487,7 +487,7 @@ if ($action == 'create' && $user->rights->projet->creer) // Public print '<tr><td>'.$langs->trans("Visibility").'</td><td>'; $array=array(0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject")); - print $form->selectarray('public',$array,$object->public); + print Form::selectarray('public',$array,$object->public); print '</td></tr>'; // Date start @@ -668,7 +668,7 @@ else // Visibility print '<tr><td>'.$langs->trans("Visibility").'</td><td>'; $array=array(0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject")); - print $form->selectarray('public',$array,$object->public); + print Form::selectarray('public',$array,$object->public); print '</td></tr>'; // Status diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 627bb67ff53..03e1cf3b340 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -463,7 +463,7 @@ if ($resql) { print '<td class="liste_titre">'; $array=array(''=>'',0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject")); - print $form->selectarray('search_public',$array,$search_public); + print Form::selectarray('search_public',$array,$search_public); print '</td>'; } if (! empty($arrayfields['p.opp_amount']['checked'])) @@ -511,7 +511,7 @@ if ($resql) if (! empty($arrayfields['p.fk_statut']['checked'])) { print '<td class="liste_titre nowrap" align="right">'; - print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('Draft'),'1'=>$langs->trans('Opened'),'2'=>$langs->trans('Closed')),$search_status); + print Form::selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('Draft'),'1'=>$langs->trans('Opened'),'2'=>$langs->trans('Closed')),$search_status); print '</td>'; } // Action column diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index 1e099ad10a0..118f04825ea 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -294,7 +294,7 @@ print '<tr><td>'.$langs->trans("Year").'</td><td>'; 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 '</td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '</table>'; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index d258dbb1e38..e79cacd8c16 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -442,7 +442,7 @@ if ($resql) print '<td class="liste_titre">'; $listofstatus=array(-1=>' '); foreach($projectstatic->statuts_short as $key => $val) $listofstatus[$key]=$langs->trans($val); - print $form->selectarray('search_projectstatus', $listofstatus, $search_projectstatus); + print Form::selectarray('search_projectstatus', $listofstatus, $search_projectstatus); print '</td>'; } if (! empty($arrayfields['t.ref']['checked'])) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 2fb6fb61a91..73796b22abf 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -426,7 +426,7 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) $isempty=1; if (count($listoftype)==1) { $defaulttype=$tmp[0]; $isempty=0; } print '<tr><td width="15%">'.$langs->trans("Type").' <FONT COLOR="red">*</FONT></td><td width="35%">'; - print $form->selectarray("type", $adht->liste_array(), GETPOST('type')?GETPOST('type'):$defaulttype, $isempty); + print Form::selectarray("type", $adht->liste_array(), GETPOST('type')?GETPOST('type'):$defaulttype, $isempty); print '</td></tr>'."\n"; } else @@ -441,7 +441,7 @@ $morphys["mor"] = $langs->trans("Moral"); if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) { print '<tr class="morphy"><td>'.$langs->trans('Nature').' <FONT COLOR="red">*</FONT></td><td>'."\n"; - print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1); + print Form::selectarray("morphy", $morphys, GETPOST('morphy'), 1); print '</td></tr>'."\n"; } else @@ -528,7 +528,7 @@ if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) { $arraybudget=array('50'=>'<= 100 000','100'=>'<= 200 000','200'=>'<= 500 000','300'=>'<= 1 500 000','600'=>'<= 3 000 000','1000'=>'<= 5 000 000','2000'=>'5 000 000+'); print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>'; - print $form->selectarray('budget', $arraybudget, GETPOST('budget'), 1); + print Form::selectarray('budget', $arraybudget, GETPOST('budget'), 1); print ' € or $'; print '<script type="text/javascript"> diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 33bd1ba1373..1497729ee2d 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -480,12 +480,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 '</td>'."\n"; } @@ -583,12 +583,12 @@ if ($ligneamodifier < 0 && (! isset($_SESSION['nom']))) 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, GETPOST('choix'.$i)); + print Form::selectarray("choix".$i, $arraychoice, GETPOST('choix'.$i)); } 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, GETPOST('choix'.$i)); + print Form::selectarray("choix".$i, $arraychoice, GETPOST('choix'.$i)); } print '</td>'."\n"; } diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index a6e08d02524..3e4a0be406a 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -151,25 +151,25 @@ print_barre_liste('Title of my list', 12, $_SERVER["PHP_SELF"], '', '', '', 'Tex $moreforfilter.='<div class="divsearchfield">'; $moreforfilter.=$langs->trans('This is a select list for a filter A'). ': '; $cate_arbo = array('field1'=>'value1a into the select list A','field2'=>'value2a'); -$moreforfilter.=$form->selectarray('search_aaa', $cate_arbo, '', 1); // List without js combo +$moreforfilter.=Form::selectarray('search_aaa', $cate_arbo, '', 1); // List without js combo $moreforfilter.='</div>'; $moreforfilter.='<div class="divsearchfield">'; $moreforfilter.=$langs->trans('This is a select list for a filter B'). ': '; $cate_arbo = array('field1'=>'value1b into the select list B','field2'=>'value2b'); -$moreforfilter.=$form->selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo +$moreforfilter.=Form::selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo $moreforfilter.='</div>'; $moreforfilter.='<div class="divsearchfield">'; $moreforfilter.=$langs->trans('This is a select list for a filter C'). ': '; $cate_arbo = array('field1'=>'value1c into the select list C','field2'=>'value2c'); -$moreforfilter.=$form->selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo +$moreforfilter.=Form::selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo $moreforfilter.='</div>'; $moreforfilter.='<div class="divsearchfield">'; $moreforfilter.=$langs->trans('This is a select list for a filter D'). ': '; $cate_arbo = array('field1'=>'value1d into the select list D','field2'=>'value2d'); -$moreforfilter.=$form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo +$moreforfilter.=Form::selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo $moreforfilter.='</div>'; if (! empty($moreforfilter)) diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index a697b371438..08086110cf2 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -51,16 +51,16 @@ print '<br><br>'."\n"; print "Test 4a: a select<br>\n"; $array=array(1=>'Value 1',2=>'Value 2',3=>'Value 3 ith a very long text. aze eazeae e ae aeae a e a ea ea ea e a e aea e ae aeaeaeaze.'); $selected=3; -print $form->selectarray('testselecta', $array, $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1); +print Form::selectarray('testselecta', $array, $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1); print '<br><br>'; print "Test 4b: a select<br>\n"; $array=array(1=>'Value 1',2=>'Value 2',3=>'Value 3'); $selected=3; -print $form->selectarray('testselectb', $array, $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1); +print Form::selectarray('testselectb', $array, $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1); print '<br><br>'."\n"; print "Test 4c: Select array with no js forced<br>\n"; $array=array(1=>'Value 1',2=>'Value 2',3=>'Value 3'); -print $form->selectarray('selectarray',$array); +print Form::selectarray('selectarray',$array); print '<br><br>'."\n"; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index e69d098ea7d..a74a2037b94 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -725,7 +725,7 @@ else '2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",2).')', '3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",3).')', ); - print $form->selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval, $conf->global->COMPANY_USE_SEARCH_TO_SELECT); + print Form::selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval, $conf->global->COMPANY_USE_SEARCH_TO_SELECT); print '</td><td align="right">'; print '<input type="submit" class="button" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; print "</td>"; @@ -749,7 +749,7 @@ else '2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",2).')', '3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",3).')', ); - print $form->selectarray("activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); + print Form::selectarray("activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); print '</td><td align="right">'; print '<input type="submit" class="button" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; print "</td>"; diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 19f9a2fbdb8..e5a88340f62 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -129,13 +129,13 @@ class ActionsCardCompany extends ActionsCardCommon } // Type - $this->tpl['select_companytype'] = $form->selectarray("typent_id",$formcompany->typent_array(0), $this->object->typent_id); + $this->tpl['select_companytype'] = Form::selectarray("typent_id",$formcompany->typent_array(0), $this->object->typent_id); // Juridical Status $this->tpl['select_juridicalstatus'] = $formcompany->select_juridicalstatus($this->object->forme_juridique_code,$this->object->country_code); // Workforce - $this->tpl['select_workforce'] = $form->selectarray("effectif_id",$formcompany->effectif_array(0), $this->object->effectif_id); + $this->tpl['select_workforce'] = Form::selectarray("effectif_id",$formcompany->effectif_array(0), $this->object->effectif_id); // VAT intra $s='<input type="text" class="flat" name="tva_intra" size="12" maxlength="20" value="'.$this->object->tva_intra.'">'; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 661483cf2a2..e99f10bf5a5 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -320,7 +320,7 @@ $sql.= $db->plimit($limit + 1, $offset); //print $sql; // Define type of elements -$typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), 2); +$typeElementString = Form::selectarray("type_element", $elementTypeArray, GETPOST('type_element'), 2); $button = '<input type="submit" class="button" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; $param="&sref=".$sref."&month=".$month."&year=".$year."&sprod_fulldescr=".$sprod_fulldescr."&socid=".$socid."&type_element=".$type_element; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index c2515b89715..52bce8ae36c 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -673,7 +673,7 @@ if ($resql) if (! empty($arrayfields['typent.code']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone" align="center">'; - print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); + print Form::selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); print '</td>'; } if (! empty($arrayfields['s.siren']['checked'])) @@ -768,7 +768,7 @@ if ($resql) { $arraystcomm[$val['id']]=($langs->trans("StatusProspect".$val['id']) != "StatusProspect".$val['id'] ? $langs->trans("StatusProspect".$val['id']) : $val['label']); } - print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2); + print Form::selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2); print '</td>'; } // Extra fields @@ -811,7 +811,7 @@ if ($resql) if (! empty($arrayfields['s.status']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone" align="center">'; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print Form::selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print '</td>'; } // Action column diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index cfbf3529bba..bf9fe3bfb72 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -244,14 +244,14 @@ if ($result > 0) $actions[$managedeventfornotification['rowid']]=$label; } print '<tr '.$bc[$var].'><td>'; - print $form->selectarray("contactid",$listofemails); + print Form::selectarray("contactid",$listofemails); print '</td>'; print '<td>'; - print $form->selectarray("actionid",$actions,'',1); + print Form::selectarray("actionid",$actions,'',1); print '</td>'; print '<td>'; $type=array('email'=>$langs->trans("EMail")); - print $form->selectarray("typeid",$type); + print Form::selectarray("typeid",$type); print '</td>'; print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>'; print '</tr>'; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 8da096519d0..09fee411888 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1034,7 +1034,7 @@ else // Status print '<tr><td>'.fieldLabel('Status','status').'</td><td colspan="3">'; - print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1); + print Form::selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1); print '</td></tr>'; // Barcode @@ -1155,11 +1155,11 @@ else // Type - Size print '<tr><td>'.fieldLabel('ThirdPartyType','typent_id').'</td><td>'."\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 '</td>'; print '<td>'.fieldLabel('Staff','effectif_id').'</td><td>'; - 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 '</td></tr>'; @@ -1599,7 +1599,7 @@ else // Status print '<tr><td>'.fieldLabel('Status','status').'</td><td colspan="3">'; - 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 '</td></tr>'; // Address @@ -1761,11 +1761,11 @@ else // Type - Size print '<tr><td>'.fieldLabel('ThirdPartyType','typent_id').'</td><td>'; - 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 '</td>'; print '<td>'.fieldLabel('Staff','effectif_id').'</td><td>'; - 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 '</td></tr>'; diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 5411cee24b6..b8eca021271 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1150,7 +1150,7 @@ if ($action == 'create') print '<td>' . $langs->trans("DefaultModel") . '</td>'; print '<td colspan="2">'; $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 "</td></tr>"; // 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); } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 9344572d9df..194974bbc40 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -699,7 +699,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print '<input type="hidden" name="action" value="adduserldap">'; if (is_array($liste) && count($liste)) { - print $form->selectarray('users', $liste, '', 1); + print Form::selectarray('users', $liste, '', 1); } print '</td><td align="center">'; print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Get')).'"'.(count($liste)?'':' disabled').'>'; @@ -769,7 +769,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print '<tr><td>'.$langs->trans("Gender").'</td>'; print '<td>'; $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 '</td></tr>'; // Login @@ -1849,7 +1849,7 @@ else print '<tr><td>'.$langs->trans("Gender").'</td>'; print '<td>'; $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 '</td></tr>'; // Login diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 66d725b3204..3d6b22d28de 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -150,7 +150,7 @@ print '<td> </td>'; print '<td> </td>'; // Status print '<td align="right">'; -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 '</td>'; print '<td class="liste_titre" align="right">'; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 161e39a89a8..87236d0e4f8 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -326,7 +326,7 @@ if ($result) { print '<td>'; $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 '</td>'; } if (! empty($arrayfields['u.employee']['checked'])) @@ -391,7 +391,7 @@ if ($result) { // Status print '<td class="liste_titre" align="center">'; - 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 '</td>'; } // Action column -- GitLab