diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 2321b76aac8905ce366c25924b61a5062b51e753..2571afcce86872a5416981285b047b88e6342f6e 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 1a32c22e12f48f4c83e1cc1fa2081a2db5eb7295..368e2a84523a204382c884b1b3dba20dd75c651e 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 e04cc7132f05ca526196937ace90e366b332f75d..25e49c76745dc54472a5715c2fc2a4c2cea80095 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 b77bc5446af874e1dbeabc8ea01c7de1974b558f..e49c5536979d73b7087ec418f32a643718e134e6 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 8e265eb70f7bac6ecd1ccf5c7b9d12f138010368..564cc4edaf568ddd68ff1e5d59b2a46d10502e7a 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 6f5d1de5c87108ce43fec1e1521546e35bcb6f3c..c55469459a93222659203479174275efed997ce4 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 8d62917590296137afb8a1ffb012be1deda24655..fd1bc79926e72e190a8e4048e19eea8f95c05c93 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 f17ca46299f45be17e4b0043d8a20ecdae5b3d52..71ae89ddc19d28c61f02f060f6863787b30d7034 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 b5e4efaec16ea4ab19ea20a3068f7762da733c52..abbbc574d69a4ed0d530184d42d9ad3d7decc7c2 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 aea09f731244b32631e8304dc3af38aaa845fd99..403cc3971f317dbb4584016a5f8ea62e8d9b3eb6 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 b9051f6f33a80631a777055c26ece6178739b165..3d3722269f87770b5804cb446c20f5c2a2323f05 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 9e09bf87b1dfead16be59da1143e46c38b27d2c5..71de81958b9042a2f78d2f9b0a11ac3e23001eef 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 849916222dd568fd7cd2cd38f4cf9c1bf76faf18..6fa5a6c0e7bc698e6f96120b32b9cd7429ffd6bc 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 8ee8b791303202b21f8e90d6fb62b68e02260dad..91dcaf41131c41622628df4780b161de589c68a9 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 51d0a6174c855470f6a81d6bbb3232b3450c04e7..331ff97a6ffc7f28d3c33a00480b242e29cce626 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 92c4d20670b63316cfbe71a9b8a8b931f3498acf..f019fdde8c0c859ab225a3043415ab20f3cbba34 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 52324dc167882c42f8c5623bde24fbfc28a829d1..b2769dc8e2f3e27dc7bd4f9f36cbecedede10905 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 8cc02613f6c705442407837df5979aa86f81596c..d862b80d6a8027363a29fd1f1f66775cc45faf88 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 b1ad347d8b71728930dba2e909400bce2d1f02ff..7ff0a5fb358f48b109e4013e68a5e8dc1106a816 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 410851b640bc7b6799657d2f40fed9da9fd84005..d962b57f1bfaa458dbd94828699beade6ef82652 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 05fe548daffff4f2ab65ef2d87c30015480bf0df..b1d8cd480a25ac6fe0bdcd200596527d7191751f 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 01e969fc927717822ec571e69c5d8e144bac5507..9b50200b7f7265dd33361ca7a0e6de0a9a3abd78 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 67e01bcb773497d11867e633e16c6b142fc371cb..9acfed7c9d88252155c2d1403e07dc7bf25da503 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 19633aa13d723371323657b1150103380b977016..fa12c1c6b3b0c071296c0a0b280a6710e1c6579f 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 b12e8004bc4fc6045b1715186e50d6c54db4fd73..3a2a28c984d302c22affe6e38c5fa4d4af37ecd3 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 74ac2fdd7ea0f2d8baadd9e9243ba4d93c25fb91..a363730ecaa52c940f756ceb85d4258504fad08d 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 2c93f874baa4fe2ba2fef4594de4e5b9be440169..ac5606aa2cdfcd6aaeffa7bb1f0797a54f881af0 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 da8b9012b146e56b109ae6965e024b8439daeaa9..7759002fdfd092c5b8317d2994c78825593fdeb3 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 91a602c31a6060856493712aa8765a2185d3cbdf..1a66ccf9f2105ef94fd836b541bd856d93709093 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 ebb9bedca2c1eb29770b36403294a238565bd653..e94daeca65aa779e706e5a7c68c8fae1fbde73fb 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 1f0f763bfd13243733b1257a0c255572f5b43898..670a0c259175163e92c7cdefb2f4f3cbe060f045 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 b33b0438552f177d6ce54da859156ba1a0fd212f..420fc2e468763263a9bac6f1703aade84ade97c0 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 216988b6a7a0c74fb919241c5dc0b48f38be9778..cbef490948b117814b6fc83d5a1123879a5228af 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 7298eb1813551fa6e3a749d190faa374770f146a..88ec64f0a7b34e78294bc5ea695cbceaa62fb69f 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 e833c0629b3d7060fa3ecd3cd5cfe5afcb267e60..9aa6aca166315a7662b4f0f90a2b250323958a1e 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 d227d127f6938dd7a76a6fa0434ecb8f7fc11367..982dbeb421e23dacaad0fc74c10ca29c1f8fc0eb 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 14f8c8d18f6664c7966c5414a1d65863271e991c..41bd70d4c120c1aee000bbfb342bd6a905c85458 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 9dd841e0addc157cdc07e99b7fcb2c4d56c7b272..e229a3a5d75a96f773e7f478b32920bb5ead263e 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 d43ba27ef2665da439ba2ff81c80f1f4d1c71e33..c62c8c1c28358afeb66637e651c8efbdc176abae 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 59ed7fe9cde2536c6d8768d454be60fbbb11f5a8..1dc2925bd57f583b1e387ed8e140febefc824bd6 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 dc376de7c06a417b6f1b5e7ecb04d6b52272c054..0542bd7c68bc6b3a8649c282e26bc35041176c72 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 3d6b792d99b54c73a43d35ef492b66b10ff7dceb..9d4543f702a4656eef8bb0b1f8ee891ab2297d32 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 fca007bfd1feee229e4a93cd9f608f0cf13ded5f..fc6196370d3f5d0ac245a14743264c63c01fb20c 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 cee89d0970f1f41ebe98b0a14039e6d25b919632..1dfd6acb8bc0877c8f69b9884105db70a0cb01f0 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 df6e0007023870695de9de6899c58bc77bd1ebad..505775be4dfbf8216a402ebb937fa677f59982f2 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 2f1c36970588ce6d3e3fa422854e49c16ae9a5da..589b2944e2128dff3f8451c782be78eebc189c5f 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 0b55e2cc81479f88cd02fe960fc1e7e1354cea87..4431b8c3336612ed86ef7590a419d7fb7d55c344 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 d06677d97af6ef6699dbd3962c897cf2b46b944f..8e88fd31c99bebf2f15124104c3af931a8f6c0b6 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 0316fb461cf898ceadadaf59b46d125d70365e72..cf46547b9d5478b03d1e29c082151a6765438674 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 339ba9c6b5e8d4057395db411d467fc2227ed33f..a70c6f3f40c77eaadea1f399add02f1ce77e3214 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 9d540a37bb66c0714681914defc2698a026cbbcd..2cd001bcf8ba853a2f252d468810c99b90adabf8 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 4ecbef60b58449513449ad5cc0c1a7b7ff1949fc..593d38e2296283f07afe0cf76c3c495353be8d47 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 35736b56228b8e40aea665e84f266da433dda7ea..2ba92da0916302b1587b2698f330deded78ee770 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 5c6b9613c17e4fa2dfeb76135bb3c59507a5942e..8026f6104c200d84c4b428c88e4c95b7c56c6f22 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 7e3b5ea2810d9a5306b8d6fdc243521d409e123a..ee7a711919fdcd33825932e60af1f1d4b5c16f82 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 f651c56e0282defd0036a28c19660e8b55acbabe..a4158bd686beacf64b8c4230a01e259c5ca51368 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 ab906617b070bff203f4a50d3c5fca2567a265fd..2a37b0c6b87875b9e414bb501398a67cd328a0a5 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 25b86cdc0bf7753dc1ded1213adae1627a43f47b..8bf6ac5f8a148531f9d92d81d83f1fe0c7d77870 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 eb365dbd5b800d3299c3b997b841740e835606f7..9b08e68297d124e9a509075b9334eb3d56fafa65 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 7da3fadcc6e75edd5db469379e23d5d36d80978a..81da7484b71b3762a2da854fdeffd8b9ad3bc099 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 4c71256baf334c060d0d7457defdc4fd38eff916..1e3c08bd5fa07c571b49e2927426a428f9cec259 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 288a1b92f3799608b98858788f6c421d3090dc6b..4b08afabb21d712e12f806de109a52027ce7237f 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 cc5e770d02a34a140c77e490678161a594b1bd22..c7c7a5617877475212af6d2928cdb94203139839 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 6c515192f785a0cf7846fe6e92d3473b4edf7969..905a3c452917e637a4ae11b183b05833c13fa15f 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 71fec22413798a4152c7afedbb93e4193b3005ba..19dfd0f3fc2e996f027774fa990d185b82b36ec5 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 d86c2b86274b2817632cb53f3eec9b2e04f95566..c72a2081e36041a92ec94eb967ee7240a1f477c2 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 5cdd7923cbd90ce2aa8541bac55e128cd033e7a6..428f55bc5cd37f5fc14e58baf484ecba89bbf656 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 6c7d3ef1b3570b15f4ea5a0f544c589f196de573..2da648e01cd947cfd3537685c5b39cf3fb82fbcc 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 3f75bca3a357087024de21c2ba5201aead1e6c2b..a4d08a2ac75aee2ccab6b74218aec4d22ee65371 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 dafe95e419dd65575abf3f79f93f2ca8a7cc7437..34d8a0e13e44d7809002112c808afac1bb7cb465 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 8cae95920335802197c0a620763d7ab5af980005..eb7604cc2af1a0214597fb3ee62f9d8f05ef3cef 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 63d07cebddfacf91ba265f6636f3a4b3c49c13b2..e06b74217a668f4b2424495c27eded795b6667c3 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 fb6f41f4f3939aa76f4b18776168951660ccb69c..e548b3d240340462a82b1ad19b0ebc203d61ec64 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 b440b5ee43e7930b0e6ecd313e23f097991c9cde..5ab76133748d959ba061f58f95c44e8d0dbafb12 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 5c14a20de23cac5f722b5ea861b4d25efa3775e9..d51a308e679f935482d35d0e2b849426bafcf8c7 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 a415d6b49872f0bab83ecbdd6a4cd394d4fb5f0f..8e41b2398e18f89f2220cc424cfa45efd31ca312 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 f794989c59ebe98c0728c391c000133dcbceb06e..6e34fb836b01c246bb990aa4fa038cf00f6c2f7e 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 7c9a46d89722a2704f6a4764c2fd838488c4650f..c8230f8421e5959ebaf3133774d5396691467559 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 25e52079dc4e90761ee6da044b02934ab3d1204f..b996a66c75f732dcbc83fb4e1c592f0884460488 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 e32d31122dc7de0a86593535f3a716819c5d01b8..d91ab5a010e68493fd05fe4e6cfeae63c02cbea8 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 c5f968dee4f617e0aa0e63a0459897232d59d729..8718c1ad8133a3b7d60a80407ea99376165b367e 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 822cb03a6e021f608f85476ba6dd831add1c2b05..a5096c825548f1dd6758dd74f2873c7a169b4146 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 7bc04ecb42a5d312d08837d86b4e0d27fc297603..9cfb23bc156cef54659b9b52ef2823a587c819ba 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 39c91695f8fc7c5def3139cd147c28a546cc2fc7..52bf5bef279629c99210d238636ce1a9533655bf 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 fd403e647c6474552ccaa42ebe6f6f50d5a502f6..968dec5415a7b799e6f4ae2b193275443976d8cc 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 ef126a85b52ae4a6fe184a36d2953aa0f2abb5a8..b94d775db403e195e561affc8e8956d25e647dac 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 9b20371ea5b674a466d7832e2f44d409710bc76a..54a219c49c914567d0b7a8c9c2817cb71119a9f3 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 f5fc8c8655c43c40374717f5e9cf37628a1d1615..339aad05c34b6b11ddb4657d7042b66d515257b2 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 55413f7ed1d025dc05ce42a140fcd0bcd4c3a647..bb15fbc43275a35743bb50e78875e5b48c6528a4 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 857a6634bf6d671097efb2372a447421bfcb5107..9dfb40c8a55d2836d1bf6edb0e7a9f53f397f2f1 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 58f95625d949fff46a9da434151fd55eaf32cba6..f561c771ff2f96530c23ced9a0f8a7f30ecf32a2 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 ca351f7d1bbc55a033066739aeabf96866c0127c..30018e90294e99a471b19107b89568454991cd55 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 51b3477b2481c9b074aed027e0d18bb7e017bf97..0383d4388f152ffb8b77d3fe5eef7381439344d6 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 627bb67ff539f8c54097b25022b5a911bd44fef6..03e1cf3b34063e7b486ef48fe7b91aece264a138 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 1e099ad10a0de51ba6b2833f5cb44662c8e8c180..118f04825eacc45e7ccdc98224e0b9e47907fc78 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 d258dbb1e38933ca80962b5e39ab6e1355efcd75..e79cacd8c16b0a95338ce7b00c6defab7af2887a 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 2fb6fb61a91c23ea7fa5d59ffe51b020848a34aa..73796b22abf3401e68e650bbebfcd2beea6e8542 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 33bd1ba1373652e8a581b65a9642ff457af95b16..1497729ee2dadcba119fd0b45bf68607c828509e 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 a6e08d025246e444516a38c49ac37f2353dedbb3..3e4a0be406afd34d5f0ac5231ec783d7c0056662 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 a697b371438566949db91fe18a3adb59e73777f2..08086110cf248701308f5cdf8f894b0461a4cc44 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 e69d098ea7d16ab8e169a5287b7278c75e7a95c9..a74a2037b9469b2e85a0d23e9a253ca40ede210c 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 19f9a2fbdb80551b8b08ea96d6cef59d539819fa..e5a88340f6224e7c4e82672521679b7d169d3368 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 661483cf2a2e7cda6b9eb18d15cffd9c9ba78290..e99f10bf5a5b073c0f9483eae04d469f66ecc28b 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 c2515b897153b29b7b850cef912521424e123033..52bce8ae36c7e3e15fd763d7306c363befacf55d 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 cfbf3529bba9c199e4c46243cae4d070d7b24380..bf9fe3bfb72b91f48bcacf368d946a3214ecae4e 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 8da096519d0faf41457b48d2e899166800df419f..09fee4118880d176d0e36a9e37547a31b22fe9db 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 5411cee24b6ed90dd0be1433a87242c231453c27..b8eca021271879ffc3574a644cfcbdbaa998d1d7 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 9344572d9df8bc9c1453476d9299e875cedf0893..194974bbc40c9b02087378e0bfb71d96a3fa5629 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 66d725b320489834a1a671b15d8c0cee9d31663e..3d6b22d28de9ba7ab5849f1b6eec14e52e423de8 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 161e39a89a8b9fe6f0b643a144b86feb70063eff..87236d0e4f8e68eccf7b3fe3a5b452f93c77f5bd 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