Explorar o código

Corrected non-static usages of Form::selectarray function

Marcos García de La Fuente %!s(int64=9) %!d(string=hai) anos
pai
achega
87cd6e1e40
Modificáronse 100 ficheiros con 202 adicións e 191 borrados
  1. 1 1
      dev/skeletons/skeleton_list.php
  2. 2 2
      htdocs/accountancy/admin/export.php
  3. 2 2
      htdocs/accountancy/admin/fiscalyear_card.php
  4. 1 1
      htdocs/accountancy/bookkeeping/card.php
  5. 2 2
      htdocs/adherents/admin/adherent.php
  6. 1 1
      htdocs/adherents/admin/public.php
  7. 1 1
      htdocs/adherents/canvas/actions_adherentcard_common.class.php
  8. 4 4
      htdocs/adherents/card.php
  9. 3 3
      htdocs/adherents/cartes/carte.php
  10. 1 1
      htdocs/adherents/list.php
  11. 1 1
      htdocs/admin/agenda_other.php
  12. 1 1
      htdocs/admin/boxes.php
  13. 2 2
      htdocs/admin/company.php
  14. 5 5
      htdocs/admin/dict.php
  15. 1 1
      htdocs/admin/ihm.php
  16. 6 6
      htdocs/admin/ldap.php
  17. 1 1
      htdocs/admin/mails.php
  18. 2 2
      htdocs/admin/modules.php
  19. 1 1
      htdocs/admin/multicurrency.php
  20. 2 2
      htdocs/admin/prelevement.php
  21. 1 1
      htdocs/admin/sms.php
  22. 1 1
      htdocs/barcode/printsheet.php
  23. 2 2
      htdocs/bookmarks/card.php
  24. 1 1
      htdocs/comm/action/card.php
  25. 2 2
      htdocs/comm/propal.php
  26. 1 1
      htdocs/comm/propal/list.php
  27. 1 1
      htdocs/comm/propal/stats/index.php
  28. 1 1
      htdocs/commande/card.php
  29. 2 2
      htdocs/commande/list.php
  30. 1 1
      htdocs/commande/orderstoinvoice.php
  31. 1 1
      htdocs/commande/stats/index.php
  32. 2 2
      htdocs/compta/bank/card.php
  33. 1 1
      htdocs/compta/deplacement/stats/index.php
  34. 2 2
      htdocs/compta/facture.php
  35. 3 3
      htdocs/compta/facture/fiche-rec.php
  36. 2 2
      htdocs/compta/facture/list.php
  37. 2 2
      htdocs/compta/facture/stats/index.php
  38. 1 1
      htdocs/compta/prelevement/card.php
  39. 2 2
      htdocs/compta/prelevement/ligne.php
  40. 1 1
      htdocs/compta/ventilation/card.php
  41. 1 1
      htdocs/compta/ventilation/fournisseur/card.php
  42. 1 1
      htdocs/contact/canvas/actions_contactcard_common.class.php
  43. 2 2
      htdocs/contact/card.php
  44. 2 2
      htdocs/contact/list.php
  45. 1 1
      htdocs/contrat/list.php
  46. 3 3
      htdocs/contrat/services.php
  47. 12 1
      htdocs/core/class/conf.class.php
  48. 3 3
      htdocs/core/class/html.form.class.php
  49. 1 1
      htdocs/core/class/html.formactions.class.php
  50. 1 1
      htdocs/core/class/html.formfile.class.php
  51. 5 5
      htdocs/core/class/html.formmail.class.php
  52. 1 1
      htdocs/core/class/html.formorder.class.php
  53. 1 1
      htdocs/core/class/html.formsms.class.php
  54. 1 1
      htdocs/core/lib/admin.lib.php
  55. 1 1
      htdocs/core/lib/company.lib.php
  56. 3 3
      htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
  57. 3 3
      htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
  58. 1 1
      htdocs/core/tpl/admin_extrafields_add.tpl.php
  59. 1 1
      htdocs/cron/list.php
  60. 1 1
      htdocs/don/stats/index.php
  61. 3 3
      htdocs/expedition/card.php
  62. 1 1
      htdocs/expedition/list.php
  63. 1 1
      htdocs/expedition/stats/index.php
  64. 1 1
      htdocs/expensereport/stats/index.php
  65. 1 1
      htdocs/fichinter/card.php
  66. 1 1
      htdocs/fichinter/list.php
  67. 1 1
      htdocs/fichinter/stats/index.php
  68. 1 1
      htdocs/fourn/commande/card.php
  69. 1 1
      htdocs/fourn/commande/orderstoinvoice.php
  70. 1 1
      htdocs/fourn/facture/list.php
  71. 5 5
      htdocs/holiday/card.php
  72. 2 2
      htdocs/holiday/document.php
  73. 2 2
      htdocs/hrm/establishment/card.php
  74. 1 1
      htdocs/opensurvey/list.php
  75. 5 5
      htdocs/opensurvey/results.php
  76. 1 1
      htdocs/opensurvey/wizard/choix_autre.php
  77. 2 2
      htdocs/paypal/admin/paypal.php
  78. 2 2
      htdocs/product/admin/dynamic_prices.php
  79. 2 2
      htdocs/product/admin/product.php
  80. 5 5
      htdocs/product/canvas/product/actions_card_product.class.php
  81. 2 2
      htdocs/product/canvas/product/tpl/card_create.tpl.php
  82. 2 2
      htdocs/product/canvas/product/tpl/card_edit.tpl.php
  83. 4 4
      htdocs/product/canvas/service/actions_card_service.class.php
  84. 2 2
      htdocs/product/canvas/service/tpl/card_create.tpl.php
  85. 2 2
      htdocs/product/canvas/service/tpl/card_edit.tpl.php
  86. 9 9
      htdocs/product/card.php
  87. 1 1
      htdocs/product/dynamic_price/editor.php
  88. 1 1
      htdocs/product/fournisseurs.php
  89. 2 2
      htdocs/product/list.php
  90. 1 1
      htdocs/product/price.php
  91. 1 1
      htdocs/product/stock/list.php
  92. 1 1
      htdocs/projet/admin/project.php
  93. 2 2
      htdocs/projet/card.php
  94. 2 2
      htdocs/projet/list.php
  95. 1 1
      htdocs/projet/stats/index.php
  96. 1 1
      htdocs/projet/tasks/list.php
  97. 3 3
      htdocs/public/members/new.php
  98. 4 4
      htdocs/public/opensurvey/studs.php
  99. 4 4
      htdocs/public/test/test_arrays.php
  100. 3 3
      htdocs/public/test/test_forms.php

+ 1 - 1
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

+ 2 - 2
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>';
 }

+ 2 - 2
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>';

+ 1 - 1
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>';

+ 2 - 2
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>';

+ 1 - 1
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";
 }
 

+ 1 - 1
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')

+ 4 - 4
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
 		{

+ 3 - 3
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>';

+ 1 - 1
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">&nbsp;</td>';

+ 1 - 1
htdocs/admin/agenda_other.php

@@ -164,7 +164,7 @@ print '<td>'.$langs->trans("AGENDA_DEFAULT_VIEW").'</td>'."\n";
 print '<td align="center">&nbsp;</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>';

+ 1 - 1
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>';
 

+ 2 - 2
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";

+ 5 - 5
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')

+ 1 - 1
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">&nbsp;</td>';
 	print '</tr>';

+ 6 - 6
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>&nbsp;</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">';

+ 1 - 1
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
 	{

+ 2 - 2
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">';

+ 1 - 1
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>';

+ 2 - 2
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>';

+ 1 - 1
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>';
 

+ 1 - 1
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

+ 2 - 2
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
 	{

+ 1 - 1
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.'">';

+ 2 - 2
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);
 		}

+ 1 - 1
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))

+ 1 - 1
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>';

+ 1 - 1
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

+ 2 - 2
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))
 	{

+ 1 - 1
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

+ 1 - 1
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>';

+ 2 - 2
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

+ 1 - 1
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>';

+ 2 - 2
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

+ 3 - 3
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' />&nbsp;".$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' />&nbsp;".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' />&nbsp;".$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' />&nbsp;".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>';

+ 2 - 2
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);

+ 2 - 2
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>';

+ 1 - 1
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.'">';

+ 2 - 2
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>';
 

+ 1 - 1
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
             {

+ 1 - 1
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
 	    {

+ 1 - 1
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')

+ 2 - 2
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

+ 2 - 2
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">';

+ 1 - 1
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>';
 	}
     

+ 3 - 3
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);

+ 12 - 1
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()
+	{
+		
+	}
 }
 

+ 3 - 3
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;
 

+ 1 - 1
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) 

+ 1 - 1
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

+ 5 - 5
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.= ' &nbsp; ';
 	        	$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);
         			}
         		}
 

+ 1 - 1
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;
 	}
 

+ 1 - 1
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");
             }

+ 1 - 1
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>';
             }

+ 1 - 1
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

+ 3 - 3
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>';
 			}

+ 3 - 3
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>';
 			}

+ 1 - 1
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>

+ 1 - 1
htdocs/cron/list.php

@@ -230,7 +230,7 @@ print '<td>&nbsp;</td>';
 print '<td>&nbsp;</td>';
 print '<td>&nbsp;</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")).'">';

+ 1 - 1
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>';

+ 3 - 3
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>';

+ 1 - 1
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);

+ 1 - 1
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>';

+ 1 - 1
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>';

+ 1 - 1
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

+ 1 - 1
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);

+ 1 - 1
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>';

+ 1 - 1
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>';

+ 1 - 1
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

+ 1 - 1
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);

+ 5 - 5
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 ' &nbsp; &nbsp; ';
-        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 ' &nbsp; &nbsp; ';
-        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 ' &nbsp; &nbsp; ';
-        			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 ' &nbsp; &nbsp; ';
-        			print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday));
+        			print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday));
                     print '</td>';
                     print '</tr>';
                 }

+ 2 - 2
htdocs/holiday/document.php

@@ -153,7 +153,7 @@ if ($object->id)
     	print '<td>';
     	$form->select_date($object->date_debut,'date_debut_');
     	print ' &nbsp; &nbsp; ';
-    	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 ' &nbsp; &nbsp; ';
-    	print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday));
+    	print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday));
     	print '</td>';
     	print '</tr>';
     }

+ 2 - 2
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>';

+ 1 - 1
htdocs/opensurvey/list.php

@@ -106,7 +106,7 @@ print '<td></td>';
 print '<td></td>';
 print '<td></td>';
 $arraystatus=array(''=>'&nbsp;','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;

+ 5 - 5
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 ' &nbsp; &nbsp; ';
 		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'=>'&nbsp;','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'=>'&nbsp;','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'=>'&nbsp;','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'=>'&nbsp;','0'=>$langs->trans("Against"),'1'=>$langs->trans("For"));
-			print $form->selectarray("choix".$i, $arraychoice);
+			print Form::selectarray("choix".$i, $arraychoice);
 		}
 		print '</td>'."\n";
 	}

+ 1 - 1
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 ' &nbsp; '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]);
+	print ' &nbsp; '.$langs->trans("Type").' '.Form::selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]);
 	print '</td></tr>'."\n";
 }
 

+ 2 - 2
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;

+ 2 - 2
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);

+ 2 - 2
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>';

+ 5 - 5
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;

+ 2 - 2
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)) { ?>

+ 2 - 2
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)) { ?>

+ 4 - 4
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

+ 2 - 2
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>

+ 2 - 2
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>

+ 9 - 9
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'=>'&nbsp;', '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

+ 1 - 1
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

+ 1 - 1
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 '&nbsp; <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

+ 2 - 2
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">';

+ 1 - 1
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 '&nbsp; <div id="expression_editor" class="button">'.$langs->trans("PriceExpressionEditor").'</div>';
 			print '</td></tr>';
 

+ 1 - 1
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">';

+ 1 - 1
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>";

+ 2 - 2
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

+ 2 - 2
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

+ 1 - 1
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>';

+ 1 - 1
htdocs/projet/tasks/list.php

@@ -442,7 +442,7 @@ if ($resql)
         print '<td class="liste_titre">';
         $listofstatus=array(-1=>'&nbsp;');
         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']))

+ 3 - 3
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">

+ 4 - 4
htdocs/public/opensurvey/studs.php

@@ -480,12 +480,12 @@ while ($compteur < $num)
 				if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno')
 				{
 					$arraychoice=array('2'=>'&nbsp;','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'=>'&nbsp;','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'=>'&nbsp;','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'=>'&nbsp;','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";
 	}

+ 4 - 4
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))

+ 3 - 3
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";
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio