From 51125483aaecbd1568bcc9db1368a6db8dc74bec Mon Sep 17 00:00:00 2001 From: Michael Fenton Date: Sat, 19 Mar 2016 20:03:26 +1100 Subject: [PATCH 01/17] Update main.lang Changing 'Quadri' to Quarter.. --- htdocs/langs/en_US/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 36aa814dc57..62d6b7a6595 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -284,7 +284,7 @@ Yesterday=Yesterday Tomorrow=Tomorrow Morning=Morning Afternoon=Afternoon -Quadri=Quadri +Quadri=Quarter MonthOfDay=Month of the day HourShort=H MinuteShort=mn From 39d17c01328fca07c81e089975f751350669d454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 19 Mar 2016 20:04:55 +0100 Subject: [PATCH 02/17] Corrected PHPDoc blocks of pdf.lib.php functions and added typehinting in their parameters --- htdocs/core/lib/pdf.lib.php | 113 ++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a952159b874..4587d58c760 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -9,7 +9,7 @@ * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> - * Copyright (C) 2015 Marcos García + * Copyright (C) 2015-2016 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ * @param Translate $outputlangs Output lang to use to autodetect output format if setup not done * @return array Array('width'=>w,'height'=>h,'unit'=>u); */ -function pdf_getFormat($outputlangs='') +function pdf_getFormat(Translate $outputlangs = null) { global $conf,$db; @@ -77,7 +77,7 @@ function pdf_getFormat($outputlangs='') * @param string $format Array(width,height). Keep empty to use default setup. * @param string $metric Unit of format ('mm') * @param string $pagetype 'P' or 'l' - * @return TPDF PDF object + * @return TCPDF PDF object */ function pdf_getInstance($format='',$metric='mm',$pagetype='P') { @@ -230,7 +230,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P') * @param Translate $outputlangs Output langs object * @return string Name of font to use */ -function pdf_getPDFFont($outputlangs) +function pdf_getPDFFont(Translate $outputlangs) { global $conf; @@ -253,7 +253,7 @@ function pdf_getPDFFont($outputlangs) * @param Translate $outputlangs Output langs object * @return int Size of font to use */ -function pdf_getPDFFontSize($outputlangs) +function pdf_getPDFFontSize(Translate $outputlangs) { $size=10; // By default, for FPDI or ISO language on TCPDF if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower) @@ -295,9 +295,10 @@ function pdf_getHeightForLogo($logo, $url = false) * * @param TCPDF $pdf PDF initialized object * @param string $htmlcontent HTML Contect + * @return int * @see getStringHeight */ -function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent) +function pdfGetHeightForHtmlContent(TCPDF $pdf, $htmlcontent) { // store current object $pdf->startTransaction(); @@ -377,7 +378,7 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includeali * @param Object $object Object we want to build document for * @return string String with full address */ -function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) +function pdf_build_address(Translate $outputlangs, Societe $sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$object=null) { global $conf, $hookmanager; @@ -530,12 +531,12 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target /** * Show header of page for PDF generation * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param Translate $outputlangs Object lang for output * @param int $page_height Height of page * @return void */ -function pdf_pagehead(&$pdf,$outputlangs,$page_height) +function pdf_pagehead(TCPDF $pdf, Translate $outputlangs,$page_height) { global $conf; @@ -551,7 +552,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) /** * Add a draft watermark on PDF files * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param Translate $outputlangs Object lang * @param int $h Height of PDF * @param int $w Width of PDF @@ -559,7 +560,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height) * @param string $text Text to show * @return void */ -function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) +function pdf_watermark(TCPDF $pdf, Translate $outputlangs, $h, $w, $unit, $text) { // Print Draft Watermark if ($unit=='pt') $k=1; @@ -591,7 +592,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) /** * Show bank informations for PDF generation * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param Translate $outputlangs Object lang * @param int $curx X * @param int $cury Y @@ -600,7 +601,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) * @param int $default_font_size Default font size * @return float The Y PDF position */ -function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default_font_size=10) +function pdf_bank(TCPDF $pdf, Translate $outputlangs,$curx,$cury, Account $account,$onlynumber=0,$default_font_size=10) { global $mysoc, $conf; @@ -783,19 +784,19 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default /** * Show footer of page for PDF generation * - * @param PDF $pdf The PDF factory + * @param TCPDF $pdf The PDF factory * @param Translate $outputlangs Object lang for output * @param string $paramfreetext Constant name of free text * @param Societe $fromcompany Object company * @param int $marge_basse Margin bottom we use for the autobreak * @param int $marge_gauche Margin left (no more used) * @param int $page_hauteur Page height (no more used) - * @param Object $object Object shown in PDF + * @param object $object Object shown in PDF * @param int $showdetails Show company details into footer. This param seems to not be used by standard version. (1=Show address, 2=Show managers, 3=Both) * @param int $hidefreetext 1=Hide free text, 0=Show free text * @return int Return height of bottom margin including footer text */ -function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) +function pdf_pagefoot(TCPDF $pdf, Translate $outputlangs,$paramfreetext, Societe $fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0) { global $conf,$user; @@ -1015,7 +1016,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass /** * Show linked objects for PDF generation * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param object $object Object * @param Translate $outputlangs Object lang * @param int $posx X @@ -1026,7 +1027,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass * @param string $default_font_size Font size * @return float The Y PDF position */ -function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) +function pdf_writeLinkedObjects(TCPDF $pdf,$object, Translate $outputlangs,$posx,$posy,$w,$h,$align,$default_font_size) { $linkedobjects = pdf_getLinkedObjects($object,$outputlangs); if (! empty($linkedobjects)) @@ -1052,8 +1053,8 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al /** * Output line description into PDF * - * @param PDF $pdf PDF object - * @param Object $object Object + * @param TCPDF $pdf PDF object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object lang for output * @param int $w Width @@ -1065,7 +1066,7 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al * @param int $issupplierline Is it a line for a supplier object ? * @return string */ -function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_writelinedesc(TCPDF $pdf,$object,$i, Translate $outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0,$issupplierline=0) { global $db, $conf, $langs, $hookmanager; @@ -1095,7 +1096,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide /** * Return line description translated in outputlangs and encoded into htmlentities and with
* - * @param Object $object Object + * @param object $object Object * @param int $i Current line number (0 = first line, 1 = second line, ...) * @param Translate $outputlangs Object langs for output * @param int $hideref Hide reference @@ -1103,7 +1104,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide * @param int $issupplierline Is it a line for a supplier object ? * @return string String with line */ -function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) +function pdf_getlinedesc($object,$i, Translate $outputlangs,$hideref=0,$hidedesc=0,$issupplierline=0) { global $db, $conf, $langs; @@ -1282,13 +1283,13 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl /** * Return line num * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinenum($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1315,13 +1316,13 @@ function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0) /** * Return line product ref * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1347,13 +1348,13 @@ function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0) /** * Return line ref_supplier * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineref_supplier($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1379,13 +1380,13 @@ function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0) /** * Return line vat rate * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinevatrate($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1412,13 +1413,13 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0) /** * Return line unit price excluding tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupexcltax($object,$i, Translate $outputlangs,$hidedetails=0) { global $conf, $hookmanager; @@ -1452,13 +1453,13 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) /** * Return line unit price including tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string */ -function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineupwithtax($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1485,13 +1486,13 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) /** * Return line quantity * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1519,13 +1520,13 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0) /** * Return line quantity asked * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_asked($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1553,13 +1554,13 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0) /** * Return line quantity shipped * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_shipped($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1587,13 +1588,13 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) /** * Return line keep to ship quantity * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineqty_keeptoship($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1621,14 +1622,14 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0) /** * Return line unit * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @param HookManager $hookmanager Hook manager instance * @return void */ -function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = false) +function pdf_getlineunit($object, $i, Translate $outputlangs, $hidedetails = 0, $hookmanager = false) { global $langs; @@ -1664,13 +1665,13 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag /** * Return line remise percent * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string */ -function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlineremisepercent($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1700,14 +1701,14 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0) /** * Return line percent * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @param HookManager $hookmanager Hook manager instance * @return string */ -function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null) +function pdf_getlineprogress($object, $i, Translate $outputlangs, $hidedetails = 0, HookManager $hookmanager = null) { $reshook=0; $result=''; @@ -1733,13 +1734,13 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm /** * Return line total excluding tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @return string Return total of line excl tax */ -function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalexcltax($object,$i, Translate $outputlangs,$hidedetails=0) { global $conf, $hookmanager; @@ -1777,13 +1778,13 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) /** * Return line total including tax * - * @param Object $object Object + * @param object $object Object * @param int $i Current line number * @param Translate $outputlangs Object langs for output * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines) * @return string Return total of line incl tax */ -function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) +function pdf_getlinetotalwithtax($object,$i, Translate $outputlangs,$hidedetails=0) { global $hookmanager; @@ -1814,12 +1815,12 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) /** * Return total quantity of products and/or services * - * @param Object $object Object + * @param object $object Object * @param string $type Type * @param Translate $outputlangs Object langs for output * @return integer */ -function pdf_getTotalQty($object,$type,$outputlangs) +function pdf_getTotalQty($object,$type, Translate $outputlangs) { global $hookmanager; @@ -1866,7 +1867,7 @@ function pdf_getTotalQty($object,$type,$outputlangs) * @param Translate $outputlangs Object lang for output * @return array Linked objects */ -function pdf_getLinkedObjects($object,$outputlangs) +function pdf_getLinkedObjects($object, Translate $outputlangs) { global $hookmanager; From 57ebb7c997dad1b59fc6cd877ae2134d40f886dc Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 20 Mar 2016 07:34:48 +0100 Subject: [PATCH 03/17] NEW: Move Expense report menu from module to menu files --- htdocs/core/menus/init_menu_auguria.sql | 9 +- htdocs/core/menus/standard/eldy.lib.php | 11 ++ .../core/modules/modExpenseReport.class.php | 107 ------------------ 3 files changed, 18 insertions(+), 109 deletions(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 0c154e031d8..666c44c8ae6 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -332,9 +332,14 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); --- HRM - Expense reports +-- HRM - Trips and expenses (old module) insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2102__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/list.php?leftmenu=tripsandexpenses', 'List', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2103__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses', 'Statistics', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__); - +-- HRM - Expense reports +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5300__+MAX_llx_menu__, 'hrm', 'expensereport', 15__+MAX_llx_menu__, '/expensereport/index.php?leftmenu=expensereport', 'TripsAndExpenses', 0, 'trips', '$user->rights->expensereport->lire', '', 0, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5301__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/card.php?action=create&leftmenu=expensereport', 'New', 1, 'trips', '$user->rights->expensereport->creer', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5302__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/list.php?leftmenu=expensereport', 'List', 1, 'trips', '$user->rights->expensereport->lire', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5303__+MAX_llx_menu__, 'hrm', '', 5302__+MAX_llx_menu__, '/expensereport/list.php?search_status=2&leftmenu=expensereport', 'ListToApprove', 2, 'trips', '$user->rights->expensereport->approve', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5304__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/stats/index.php?leftmenu=expensereport', 'Statistics', 1, 'trips', '$user->rights->expensereport->lire', '', 0, 2, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index bcbcf3b154e..018b0b4346b 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1233,6 +1233,17 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->deplacement->lire); $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire); } + + // Expense report + if (! empty($conf->expensereport->enabled)) + { + $langs->load("trips"); + $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport'); + $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->expensereport->creer); + $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->expensereport->lire); + $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve); + $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire); + } } diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index c02d7942b5b..d813cae0f54 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -212,113 +212,6 @@ class modExpenseReport extends DolibarrModules $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as p ON ed.fk_projet = p.rowid'; $this->export_sql_end[$r] .=' WHERE ed.fk_expensereport = d.rowid AND d.fk_user_author = u.rowid'; $this->export_sql_end[$r] .=' AND d.entity IN ('.getEntity('expensereport',1).')'; - - - - // Main menu entries - $this->menu = array(); // List of menus to add - $r=0; - - // Example to declare a Left Menu entry: fk_mainmenu=home,fk_leftmenu=admintools - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry) - 'type'=>'left', // This is a Left menu entry - 'titre'=>'TripsAndExpenses', - 'mainmenu'=>'hrm', - 'leftmenu'=>'expensereport', - 'url'=>'/expensereport/index.php', - 'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; - - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry) - 'type'=>'left', // This is a Left menu entry - 'titre'=>'New', - 'mainmenu'=>'hrm', - 'leftmenu'=>'expensereport_detailnew', - 'url'=>'/expensereport/card.php?action=create', - 'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->expensereport->creer', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; - - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry) - 'type'=>'left', // This is a Left menu entry - 'titre'=>'List', - 'mainmenu'=>'hrm', - 'leftmenu'=>'expensereport_detaillist', - 'url'=>'/expensereport/list.php', - 'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; - - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport_detaillist', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry) - 'type'=>'left', // This is a Left menu entry - 'titre'=>'ListToApprove', - 'mainmenu'=>'hrm', - 'leftmenu'=>'expensereport_detaillist_approve', - 'url'=>'/expensereport/list.php?search_status=2', - 'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->expensereport->approve', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; - - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry) - 'type'=>'left', // This is a Left menu entry - 'titre'=>'Statistics', - 'mainmenu'=>'hrm', - 'leftmenu'=>'expensereport_detail', - 'url'=>'/expensereport/stats/index.php', - 'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; - - - // Disabled, not yet stable - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry) - 'type'=>'left', // This is a Left menu entry - 'titre'=>'ExportTripCSV', - 'mainmenu'=>'hrm', - 'leftmenu'=>'expensereport_detail', - 'url'=>'/expensereport/export_csv.php', - 'langs'=>'expensereport', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->global->DEPLACEMENT_TO_CLEAN', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; - - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry) - 'type'=>'left', // This is a Left menu entry - 'titre'=>'Synchro_Compta', - 'mainmenu'=>'hrm', - 'leftmenu'=>'expensereport_detail', - 'url'=>'/expensereport/synchro_compta.php', - 'langs'=>'expensereport', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->global->DEPLACEMENT_TO_CLEAN', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - $r++; } /** From 0b1a689a24a839c8afbb2c2d6e546daff26a21de Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 20 Mar 2016 08:08:28 +0100 Subject: [PATCH 04/17] FIX: Some typo on auguria menu --- htdocs/core/menus/init_menu_auguria.sql | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 0c154e031d8..08c0e20eeb8 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -26,7 +26,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 100__+MAX_llx_menu__, 'home', 'setup', 1__+MAX_llx_menu__, '/admin/index.php?leftmenu=setup', 'Setup', 0, 'admin', '', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 101__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/company.php?leftmenu=setup', 'MenuCompanySetup', 1, 'admin', '', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 102__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/ihm.php?leftmenu=setup', 'GUISetup', 1, 'admin', '', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup" && $conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/translation.php?leftmenu=setup', 'Translation', 1, 'admin', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 103__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/modules.php?leftmenu=setup', 'Modules', 1, 'admin', '', '', 2, 2, __ENTITY__); @@ -322,16 +322,16 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5200__+MAX_llx_menu__, 'members', 'cat', 13__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=3', 'MembersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5201__+MAX_llx_menu__, 'members', '', 5200__+MAX_llx_menu__, '/categories/card.php?action=create&type=3', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- HRM - Employee -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/index.php?&leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?&action=create', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/index.php?$leftmenu=hrm&mode=employee', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/index.php?leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?action=create&leftmenu=hrm', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/index.php?leftmenu=hrm&mode=employee', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__); -- HRM - Holiday -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?&action=request', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'holiday', 15__+MAX_llx_menu__, '/holiday/list.php?leftmenu=holiday', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?action=request&leftmenu=holiday', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?leftmenu=holiday', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=holiday', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?action=request&leftmenu=holiday', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?action=request&leftmenu=holiday', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); -- HRM - Expense reports insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__); From 87cd6e1e40fcb8b794a99109c51c3ee3da4ff4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 19 Mar 2016 23:56:25 +0100 Subject: [PATCH 05/17] Corrected non-static usages of Form::selectarray function --- dev/skeletons/skeleton_list.php | 2 +- htdocs/accountancy/admin/export.php | 4 ++-- htdocs/accountancy/admin/fiscalyear_card.php | 4 ++-- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/adherents/admin/adherent.php | 4 ++-- htdocs/adherents/admin/public.php | 2 +- .../actions_adherentcard_common.class.php | 2 +- htdocs/adherents/card.php | 8 ++++---- htdocs/adherents/cartes/carte.php | 6 +++--- htdocs/adherents/list.php | 2 +- htdocs/admin/agenda_other.php | 2 +- htdocs/admin/boxes.php | 2 +- htdocs/admin/company.php | 4 ++-- htdocs/admin/dict.php | 10 +++++----- htdocs/admin/ihm.php | 2 +- htdocs/admin/ldap.php | 12 ++++++------ htdocs/admin/mails.php | 2 +- htdocs/admin/modules.php | 4 ++-- htdocs/admin/multicurrency.php | 2 +- htdocs/admin/prelevement.php | 4 ++-- htdocs/admin/sms.php | 2 +- htdocs/barcode/printsheet.php | 2 +- htdocs/bookmarks/card.php | 4 ++-- htdocs/comm/action/card.php | 2 +- htdocs/comm/propal.php | 4 ++-- htdocs/comm/propal/list.php | 2 +- htdocs/comm/propal/stats/index.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/commande/list.php | 4 ++-- htdocs/commande/orderstoinvoice.php | 2 +- htdocs/commande/stats/index.php | 2 +- htdocs/compta/bank/card.php | 4 ++-- htdocs/compta/deplacement/stats/index.php | 2 +- htdocs/compta/facture.php | 4 ++-- htdocs/compta/facture/fiche-rec.php | 6 +++--- htdocs/compta/facture/list.php | 4 ++-- htdocs/compta/facture/stats/index.php | 4 ++-- htdocs/compta/prelevement/card.php | 2 +- htdocs/compta/prelevement/ligne.php | 4 ++-- htdocs/compta/ventilation/card.php | 2 +- htdocs/compta/ventilation/fournisseur/card.php | 2 +- .../actions_contactcard_common.class.php | 2 +- htdocs/contact/card.php | 4 ++-- htdocs/contact/list.php | 4 ++-- htdocs/contrat/list.php | 2 +- htdocs/contrat/services.php | 6 +++--- htdocs/core/class/conf.class.php | 13 ++++++++++++- htdocs/core/class/html.form.class.php | 6 +++--- htdocs/core/class/html.formactions.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/core/class/html.formmail.class.php | 10 +++++----- htdocs/core/class/html.formorder.class.php | 2 +- htdocs/core/class/html.formsms.class.php | 2 +- htdocs/core/lib/admin.lib.php | 2 +- htdocs/core/lib/company.lib.php | 2 +- .../doc/doc_generic_proposal_odt.modules.php | 6 +++--- ...c_generic_supplier_proposal_odt.modules.php | 6 +++--- htdocs/core/tpl/admin_extrafields_add.tpl.php | 2 +- htdocs/cron/list.php | 2 +- htdocs/don/stats/index.php | 2 +- htdocs/expedition/card.php | 6 +++--- htdocs/expedition/list.php | 2 +- htdocs/expedition/stats/index.php | 2 +- htdocs/expensereport/stats/index.php | 2 +- htdocs/fichinter/card.php | 2 +- htdocs/fichinter/list.php | 2 +- htdocs/fichinter/stats/index.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/commande/orderstoinvoice.php | 2 +- htdocs/fourn/facture/list.php | 2 +- htdocs/holiday/card.php | 10 +++++----- htdocs/holiday/document.php | 4 ++-- htdocs/hrm/establishment/card.php | 4 ++-- htdocs/opensurvey/list.php | 2 +- htdocs/opensurvey/results.php | 10 +++++----- htdocs/opensurvey/wizard/choix_autre.php | 2 +- htdocs/paypal/admin/paypal.php | 4 ++-- htdocs/product/admin/dynamic_prices.php | 4 ++-- htdocs/product/admin/product.php | 4 ++-- .../product/actions_card_product.class.php | 10 +++++----- .../canvas/product/tpl/card_create.tpl.php | 4 ++-- .../canvas/product/tpl/card_edit.tpl.php | 4 ++-- .../service/actions_card_service.class.php | 8 ++++---- .../canvas/service/tpl/card_create.tpl.php | 4 ++-- .../canvas/service/tpl/card_edit.tpl.php | 4 ++-- htdocs/product/card.php | 18 +++++++++--------- htdocs/product/dynamic_price/editor.php | 2 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/list.php | 4 ++-- htdocs/product/price.php | 2 +- htdocs/product/stock/list.php | 2 +- htdocs/projet/admin/project.php | 2 +- htdocs/projet/card.php | 4 ++-- htdocs/projet/list.php | 4 ++-- htdocs/projet/stats/index.php | 2 +- htdocs/projet/tasks/list.php | 2 +- htdocs/public/members/new.php | 6 +++--- htdocs/public/opensurvey/studs.php | 8 ++++---- htdocs/public/test/test_arrays.php | 8 ++++---- htdocs/public/test/test_forms.php | 6 +++--- htdocs/societe/admin/societe.php | 4 ++-- .../company/actions_card_company.class.php | 4 ++-- htdocs/societe/consumption.php | 2 +- htdocs/societe/list.php | 6 +++--- htdocs/societe/notify/card.php | 6 +++--- htdocs/societe/soc.php | 12 ++++++------ htdocs/supplier_proposal/card.php | 4 ++-- htdocs/user/card.php | 6 +++--- htdocs/user/hierarchy.php | 2 +- htdocs/user/index.php | 4 ++-- 110 files changed, 227 insertions(+), 216 deletions(-) diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 2321b76aac8..2571afcce86 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -365,7 +365,7 @@ if ($resql) { // Status print ''; - print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); + print Form::selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); print ''; }*/ // Action column diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 1a32c22e12f..368e2a84523 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -149,7 +149,7 @@ if (! $conf->use_javascript_ajax) { 'csv' => $langs->trans("csv"), 'txt' => $langs->trans("txt") ); - print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0); + print Form::selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0); print ''; } @@ -197,7 +197,7 @@ if (! $conf->use_javascript_ajax) { } else { print ''; $listmodelcsv = AccountancyExport::getType(); - print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0); + print Form::selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0); print ''; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index e04cc7132f0..25e49c76745 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -174,7 +174,7 @@ if ($action == 'create') { print ''; print '' . $langs->trans("Statut") . ''; print ''; - print $form->selectarray('statut', $statut2label, GETPOST('statut')); + print Form::selectarray('statut', $statut2label, GETPOST('statut')); print ''; print ''; @@ -226,7 +226,7 @@ if ($action == 'create') { // Statut print '' . $langs->trans("Statut") . ''; - print $form->selectarray('statut', $statut2label, $object->statut); + print Form::selectarray('statut', $statut2label, $object->statut); print ''; print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index b77bc5446af..e49c5536979 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -254,7 +254,7 @@ if ($action == 'create') { print ''; print '' . $langs->trans("Codejournal") . ''; - print '' . $html->selectarray('code_journal', $code_journal_array) . ''; + print '' . Form::selectarray('code_journal', $code_journal_array) . ''; print ''; print ''; diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 8e265eb70f7..564cc4edaf5 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -178,7 +178,7 @@ if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans(" if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly"); if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice"); print ''; -print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0); +print Form::selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0); print ''; print ''; print ''; @@ -197,7 +197,7 @@ if ($conf->facture->enabled) if (! empty($conf->banque->enabled)) { print ''; - print $form->selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0); + print Form::selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0); print ''; print ''; print ''; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 6f5d1de5c87..c55469459a9 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -189,7 +189,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) $listofval=array(); if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox'; if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal'; - print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1); + print Form::selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1); print "\n"; } diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 8d629175902..fd1bc79926e 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -313,7 +313,7 @@ abstract class ActionsAdherentCardCommon // Physical or Moral $selectarray=array('0'=>$langs->trans("Physical"),'1'=>$langs->trans("Moral")); - $this->tpl['select_morphy'] = $form->selectarray('morphy',$selectarray,$this->object->morphy,0); + $this->tpl['select_morphy'] = Form::selectarray('morphy',$selectarray,$this->object->morphy,0); } if ($action == 'view' || $action == 'edit' || $action == 'delete') diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index f17ca46299f..71ae89ddc19 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -807,7 +807,7 @@ else $listetype=$adht->liste_array(); if (count($listetype)) { - print $form->selectarray("typeid", $listetype, GETPOST('typeid','int')?GETPOST('typeid','int'):$typeid, count($listetype)>1?1:0); + print Form::selectarray("typeid", $listetype, GETPOST('typeid','int')?GETPOST('typeid','int'):$typeid, count($listetype)>1?1:0); } else { print ''.$langs->trans("NoTypeDefinedGoToSetup").''; } @@ -817,7 +817,7 @@ else $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Moral"); print ''.$langs->trans("Nature")."\n"; - print $form->selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1); + print Form::selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1); print "\n"; // Company @@ -1054,7 +1054,7 @@ else $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); print ''.$langs->trans("Nature").''; - print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy); + print Form::selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy); print ""; // Photo @@ -1075,7 +1075,7 @@ else print ''.$langs->trans("Type").''; if ($user->rights->adherent->creer) { - print $form->selectarray("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$object->typeid)); + print Form::selectarray("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$object->typeid)); } else { diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index b5e4efaec16..abbbc574d69 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -239,7 +239,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); +print Form::selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); print '
'; print ''; print '
'; @@ -255,7 +255,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); +print Form::selectarray('model',$arrayoflabels,(GETPOST('model')?GETPOST('model'):$conf->global->ADHERENT_CARD_TYPE),1,0,0); print '
'.$langs->trans("Login").': '; print '
'; print ''; @@ -272,7 +272,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); +print Form::selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); print '
'; print ''; print '
'; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index aea09f73124..403cc3971f3 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -270,7 +270,7 @@ if ($resql) print ''; $listetype=$membertypestatic->liste_array(); - print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); + print Form::selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); print ''; print ' '; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index b9051f6f33a..3d3722269f8 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -164,7 +164,7 @@ print ''.$langs->trans("AGENDA_DEFAULT_VIEW").''."\n"; print ' '."\n"; print ''."\n"; $tmplist=array('show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_list'=>$langs->trans("ViewList"), 'show_peruser'=>$langs->trans("ViewPerUser")); -print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW); +print Form::selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW); print ''."\n"; print ''; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 9e09bf87b1d..71de81958b9 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -367,7 +367,7 @@ foreach($boxtoadd as $box) // Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position print ''; - print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n"; + print Form::selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n"; print ''."\n"; print ''; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 849916222dd..6fa5a6c0e7b 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -608,7 +608,7 @@ if ($action == 'edit' || $action == 'updateedit') $opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc")); print ''.$langs->trans("CalcLocaltax").': '; - print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); + print Form::selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); print ''; print ""; print "\n"; @@ -650,7 +650,7 @@ if ($action == 'edit' || $action == 'updateedit') print ''; } print ': '; - print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); + print Form::selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); print ''; print ""; print "\n"; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 8ee8b791303..91dcaf41131 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1545,21 +1545,21 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') elseif ($fieldlist[$field] == 'type_template') { print ''; - print $form->selectarray('type_template', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray('type_template', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } // Le type de l'element (pour les type de contact) elseif ($fieldlist[$field] == 'element') { print ''; - print $form->selectarray('element', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray('element', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } // La source de l'element (pour les type de contact) elseif ($fieldlist[$field] == 'source') { print ''; - print $form->selectarray('source', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray('source', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") @@ -1615,14 +1615,14 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') 'point' => $langs->trans('SizeUnitpoint'), 'inch' => $langs->trans('SizeUnitinch') ); - print $form->selectarray('unit', $units, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 0, 0, 0); + print Form::selectarray('unit', $units, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 0, 0, 0); print ''; } // Le type de taxe locale elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type') { print ''; - print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); + print Form::selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 51d0a6174c8..331ff97a6ff 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -271,7 +271,7 @@ if ($action == 'edit') // Edit $var=!$var; print ''.$langs->trans("FirstnameNamePosition").''; $array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"),1=>$langs->trans("Lastname").' '.$langs->trans("Firstname")); - print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION',$array,(isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); + print Form::selectarray('MAIN_FIRSTNAME_NAME_POSITION',$array,(isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); print ''; print ' '; print ''; diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 92c4d20670b..f019fdde8c0 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -116,7 +116,7 @@ $arraylist=array(); $arraylist['0']=$langs->trans("No"); $arraylist['ldap2dolibarr']=$langs->trans("LDAPToDolibarr"); $arraylist['dolibarr2ldap']=$langs->trans("DolibarrToLDAP"); -print $form->selectarray('activesynchro',$arraylist,$conf->global->LDAP_SYNCHRO_ACTIVE); +print Form::selectarray('activesynchro',$arraylist,$conf->global->LDAP_SYNCHRO_ACTIVE); print ''.$langs->trans("LDAPDnSynchroActiveExample"); if ($conf->global->LDAP_SYNCHRO_ACTIVE && ! $conf->global->LDAP_USER_DN) { @@ -132,7 +132,7 @@ if (! empty($conf->societe->enabled)) $arraylist=array(); $arraylist['0']=$langs->trans("No"); $arraylist['1']=$langs->trans("DolibarrToLDAP"); - print $form->selectarray('activecontact',$arraylist,$conf->global->LDAP_CONTACT_ACTIVE); + print Form::selectarray('activecontact',$arraylist,$conf->global->LDAP_CONTACT_ACTIVE); print ''.$langs->trans("LDAPDnContactActiveExample").''; } @@ -145,7 +145,7 @@ if (! empty($conf->adherent->enabled)) $arraylist['0']=$langs->trans("No"); $arraylist['1']=$langs->trans("DolibarrToLDAP"); $arraylist['ldap2dolibarr']=$langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')'; - print $form->selectarray('activemembers',$arraylist,$conf->global->LDAP_MEMBER_ACTIVE); + print Form::selectarray('activemembers',$arraylist,$conf->global->LDAP_MEMBER_ACTIVE); print ''.$langs->trans("LDAPDnMemberActiveExample").''; } @@ -162,7 +162,7 @@ $arraylist=array(); $arraylist['activedirectory']='Active Directory'; $arraylist['openldap']='OpenLdap'; $arraylist['egroupware']='Egroupware'; -print $form->selectarray('type',$arraylist,$conf->global->LDAP_SERVER_TYPE); +print Form::selectarray('type',$arraylist,$conf->global->LDAP_SERVER_TYPE); print ' '; // Version @@ -171,7 +171,7 @@ print ''.$langs->trans("Version").''; $arraylist=array(); $arraylist['3']='Version 3'; $arraylist['2']='Version 2'; -print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION); +print Form::selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION); print ''.$langs->trans("LDAPServerProtocolVersion").''; // Serveur primaire @@ -213,7 +213,7 @@ print ''.$langs->trans("LDAPServerUseTLS").''; $arraylist=array(); $arraylist['0']=$langs->trans("No"); $arraylist['1']=$langs->trans("Yes"); -print $form->selectarray('usetls',$arraylist,$conf->global->LDAP_SERVER_USE_TLS); +print Form::selectarray('usetls',$arraylist,$conf->global->LDAP_SERVER_USE_TLS); print ''.$langs->trans("LDAPServerUseTLSExample").''; print ''; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 52324dc1678..b2769dc8e2f 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -357,7 +357,7 @@ if ($action == 'edit') // SuperAdministrator access only if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SENDMODE',$listofmethods,$conf->global->MAIN_MAIL_SENDMODE); + print Form::selectarray('MAIN_MAIL_SENDMODE',$listofmethods,$conf->global->MAIN_MAIL_SENDMODE); } else { diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 8cc02613f6c..d862b80d6a8 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -299,10 +299,10 @@ if ($mode != 'marketplace') $moreforfilter.= $langs->trans('Keyword') . ': '; $moreforfilter.= ''; $moreforfilter.='
'; - $moreforfilter.= $langs->trans('Status') . ': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1); + $moreforfilter.= $langs->trans('Status') . ': '.Form::selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1); $moreforfilter.= '
'; $moreforfilter.='
'; - $moreforfilter.= $langs->trans('Nature') . ': '.$form->selectarray('search_nature', array('standard'=>$langs->transnoentitiesnoconv("Standard"), 'external'=>$langs->transnoentitiesnoconv("External")), $search_nature, 1); + $moreforfilter.= $langs->trans('Nature') . ': '.Form::selectarray('search_nature', array('standard'=>$langs->transnoentitiesnoconv("Standard"), 'external'=>$langs->transnoentitiesnoconv("External")), $search_nature, 1); $moreforfilter.= '
'; $moreforfilter.=' '; $moreforfilter.='
'; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index b1ad347d8b7..7ff0a5fb358 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -212,7 +212,7 @@ print ''; print '
'; print ''; print ''; -print $form->selectarray('MULTICURRENCY_MODIFY_RATE_APPLICATION', array('PU_DOLIBARR' => 'PU_DOLIBARR', 'PU_CURRENCY' => 'PU_CURRENCY')); +print Form::selectarray('MULTICURRENCY_MODIFY_RATE_APPLICATION', array('PU_DOLIBARR' => 'PU_DOLIBARR', 'PU_CURRENCY' => 'PU_CURRENCY')); print ''; print '
'; print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 410851b640b..d962b57f1bf 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -238,11 +238,11 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print "\n"; print ''; - print $form->selectarray('user',$internalusers);// select_dolusers(0,'user',0); + print Form::selectarray('user',$internalusers);// select_dolusers(0,'user',0); print ''; print ''; - print $form->selectarray('action',$actions);// select_dolusers(0,'user',0); + print Form::selectarray('action',$actions);// select_dolusers(0,'user',0); print ''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 05fe548daff..b1d8cd480a2 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -187,7 +187,7 @@ if ($action == 'edit') // Method $var=!$var; print ''.$langs->trans("MAIN_SMS_SENDMODE").''; - if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); + if (count($listofmethods)) print Form::selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); else print ''.$langs->trans("None").''; print ''; diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 01e969fc927..9b50200b7f7 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -294,7 +294,7 @@ foreach(array_keys($_Avery_Labels) as $codecards) $arrayoflabels[$codecards]=$labeltoshow; $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } -print $form->selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); +print Form::selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); print '
'; // Number of stickers to print diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 67e01bcb773..9acfed7c9d8 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -163,7 +163,7 @@ if ($action == 'create') print ''.$langs->trans("BehaviourOnClick").''; $liste=array(0=>$langs->trans("ReplaceWindow"),1=>$langs->trans("OpenANewWindow")); - print $form->selectarray('target',$liste,1); + print Form::selectarray('target',$liste,1); print ''.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").''; print ''.$langs->trans("Owner").''; @@ -252,7 +252,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) if ($action == 'edit') { $liste=array(1=>$langs->trans("OpenANewWindow"),0=>$langs->trans("ReplaceWindow")); - print $form->selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$bookmark->target); + print Form::selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$bookmark->target); } else { diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 19633aa13d7..fa12c1c6b3b 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -985,7 +985,7 @@ if ($id > 0) if ($object->recurrule && preg_match('/FREQ=([A-Z]+)/i',$object->recurrule,$reg)) $selectedrecurrulefreq=$reg[1]; if ($object->recurrule && preg_match('/FREQ=MONTHLY.*BYMONTHDAY=(\d+)/i',$object->recurrule,$reg)) $selectedrecurrulebymonthday=$reg[1]; if ($object->recurrule && preg_match('/FREQ=WEEKLY.*BYDAY(\d+)/i',$object->recurrule,$reg)) $selectedrecurrulebyday=$reg[1]; - print $form->selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq); + print Form::selectarray('recurrulefreq', $arrayrecurrulefreq, $selectedrecurrulefreq); // If recurrulefreq is MONTHLY print '
'; print $langs->trans("DayOfMonth").': '; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index b12e8004bc4..3a2a28c984d 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1452,7 +1452,7 @@ if ($action == 'create') print '' . $langs->trans("DefaultModel") . ''; print ''; $liste = ModelePDFPropales::liste_modeles($db); - print $form->selectarray('model', $liste, ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF)); + print Form::selectarray('model', $liste, ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF)); print ""; // Multicurrency @@ -1579,7 +1579,7 @@ if ($action == 'create') $liste_propal [$row [0]] = $propalRefAndSocName; $i ++; } - print $form->selectarray("copie_propal", $liste_propal, 0); + print Form::selectarray("copie_propal", $liste_propal, 0); } else { dol_print_error($db); } diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 74ac2fdd7ea..a363730ecaa 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -310,7 +310,7 @@ if ($result) $moreforfilter.='
'; $moreforfilter.=$langs->trans('IncludingProductWithTag'). ': '; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); + $moreforfilter.=Form::selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); $moreforfilter.='
'; } if (! empty($moreforfilter)) diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 2c93f874baa..ac5606aa2cd 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -272,7 +272,7 @@ print '
'; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears); - print $form->selectarray('year',$arrayyears,$year,0); + print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index da8b9012b14..7759002fdfd 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1602,7 +1602,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; include_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php'; $liste = ModelePDFCommandes::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->COMMANDE_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->COMMANDE_ADDON_PDF); print ""; // Multicurrency diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 91a602c31a6..1a66ccf9f21 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -334,7 +334,7 @@ if ($resql) $moreforfilter.='
'; $moreforfilter.=$langs->trans('IncludingProductWithTag'). ': '; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); + $moreforfilter.=Form::selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); $moreforfilter.='
'; } $parameters=array(); @@ -398,7 +398,7 @@ if ($resql) '3'=>$langs->trans("StatusOrderDelivered"), '-1'=>$langs->trans("StatusOrderCanceledShort") ); - print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4); + print Form::selectarray('viewstatut', $liststatus, $viewstatut, -4); print ''; if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index ebb9bedca2c..e94daeca65a 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -469,7 +469,7 @@ if ($action == 'create' && !$error) print ''; include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; $liste=ModelePDFFactures::liste_modeles($db); - print $html->selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF); + print Form::selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF); print ""; // Public note diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 1f0f763bfd1..670a0c25917 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -266,7 +266,7 @@ print '
'; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears); - print $form->selectarray('year',$arrayyears,$year,0); + print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index b33b0438552..420fc2e4687 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -302,7 +302,7 @@ if ($action == 'create') // Status print ''.$langs->trans("Status").''; print ''; - print $form->selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); + print Form::selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); print ''; // Country @@ -861,7 +861,7 @@ else // Status print ''.$langs->trans("Status").''; print ''; - print $form->selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); + print Form::selectarray("clos", $account->status,(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); print ''; // Country diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 216988b6a7a..cbef490948b 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -249,7 +249,7 @@ print ''; print ''.$langs->trans("Year").''; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; arsort($arrayyears); -print $form->selectarray('year',$arrayyears,$year,0); +print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7298eb18135..88ec64f0a7b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2194,7 +2194,7 @@ if ($action == 'create') { print ''; $arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount'); - print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1); + print Form::selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1); print ''; print '' . $langs->trans('Value') . ':'; } @@ -2409,7 +2409,7 @@ if ($action == 'create') print ''; include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php'; $liste = ModelePDFFactures::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->FACTURE_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->FACTURE_ADDON_PDF); print ""; // Multicurrency diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index e833c0629b3..9aa6aca1663 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -343,7 +343,7 @@ if ($action == 'create') // Frequency print "".$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')).""; - print " ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')); + print " ".Form::selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')); print ""; // First date of execution for cron @@ -360,7 +360,7 @@ if ($action == 'create') // Auto validate the invoice print "".$langs->trans("StatusOfGeneratedInvoices").""; $select = array('0'=>$langs->trans('BillStatusDraft'),'1'=>$langs->trans('BillStatusValidated')); - print $form->selectarray('auto_validate', $select, GETPOST('auto_validate')); + print Form::selectarray('auto_validate', $select, GETPOST('auto_validate')); print ""; print ""; @@ -749,7 +749,7 @@ else print ''; print ''; print ''; print ''; print '
'; - print " ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), ($object->unit_frequency?$object->unit_frequency:'m')); + print " ".Form::selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), ($object->unit_frequency?$object->unit_frequency:'m')); print '
'; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d227d127f69..982dbeb421e 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -860,7 +860,7 @@ if ($resql) $moreforfilter.='
'; $moreforfilter.=$langs->trans('IncludingProductWithTag'). ': '; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); + $moreforfilter.=Form::selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); $moreforfilter.='
'; } $parameters=array(); @@ -921,7 +921,7 @@ if ($resql) print ''; print ''; $liststatus=array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); - print $form->selectarray('search_status', $liststatus, $search_status, 1); + print Form::selectarray('search_status', $liststatus, $search_status, 1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 14f8c8d18f6..41bd70d4c12 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -240,7 +240,7 @@ print '
'; print ''.$langs->trans("ThirdParty").''; if ($mode == 'customer') $filter='s.client in (1,2,3)'; if ($mode == 'supplier') $filter='s.fournisseur = 1'; - print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1); + print Form::selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1); print ''; // User print ''.$langs->trans("CreatedBy").''; @@ -251,7 +251,7 @@ print '
'; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears); - print $form->selectarray('year',$arrayyears,$year,0); + print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 9dd841e0add..e229a3a5d75 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -217,7 +217,7 @@ if ($id > 0) print $form->select_date('','','','','',"userfile",1,1); print ''; print ''.$langs->trans("TransMetod").''; - print $form->selectarray("methode",$bon->methodes_trans); + print Form::selectarray("methode",$bon->methodes_trans); print ''; /* print ''.$langs->trans("File").''; print ''; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index d43ba27ef26..c62c8c1c283 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -205,13 +205,13 @@ if ($id) //Reason print ''.$langs->trans("RefusedReason").''; print ''; - print $form->selectarray("motif", $rej->motifs); + print Form::selectarray("motif", $rej->motifs); print ''; //Facturer print ''.$langs->trans("RefusedInvoicing").''; print ''; - print $form->selectarray("facturer", $rej->facturer); + print Form::selectarray("facturer", $rej->facturer); print ''; print '
'; diff --git a/htdocs/compta/ventilation/card.php b/htdocs/compta/ventilation/card.php index 59ed7fe9cde..1dc2925bd57 100644 --- a/htdocs/compta/ventilation/card.php +++ b/htdocs/compta/ventilation/card.php @@ -129,7 +129,7 @@ if($_GET["id"]) if($objp->fk_code_ventilation == 0) { - print $form->selectarray("codeventil",$cgs, $objp->fk_code_ventilation); + print Form::selectarray("codeventil",$cgs, $objp->fk_code_ventilation); } else { diff --git a/htdocs/compta/ventilation/fournisseur/card.php b/htdocs/compta/ventilation/fournisseur/card.php index dc376de7c06..0542bd7c68b 100644 --- a/htdocs/compta/ventilation/fournisseur/card.php +++ b/htdocs/compta/ventilation/fournisseur/card.php @@ -113,7 +113,7 @@ if($_GET["id"]) if($objp->fk_code_ventilation == 0) { - print $form->selectarray("codeventil",$cgs, $objp->fk_code_ventilation); + print Form::selectarray("codeventil",$cgs, $objp->fk_code_ventilation); } else { diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 3d6b792d99b..9d4543f702a 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -309,7 +309,7 @@ abstract class ActionsContactCardCommon // Public or private $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - $this->tpl['select_visibility'] = $form->selectarray('priv',$selectarray,$this->object->priv,0); + $this->tpl['select_visibility'] = Form::selectarray('priv',$selectarray,$this->object->priv,0); } if ($action == 'view' || $action == 'edit' || $action == 'delete') diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index fca007bfd1f..fc6196370d3 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -655,7 +655,7 @@ else // Visibility print ''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0); + print Form::selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0); print ''; // Categories @@ -891,7 +891,7 @@ else // Visibility print ''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('priv',$selectarray,$object->priv,0); + print Form::selectarray('priv',$selectarray,$object->priv,0); print ''; // Note Public diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index cee89d0970f..1dfd6acb8bc 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -553,7 +553,7 @@ if ($result) { print ''; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('search_priv',$selectarray,$search_priv,1); + print Form::selectarray('search_priv',$selectarray,$search_priv,1); print ''; } // Extra fields @@ -587,7 +587,7 @@ if ($result) if (! empty($arrayfields['p.statut']['checked'])) { print ''; - print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print Form::selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print ''; } print ''; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index df6e0007023..505775be4df 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -217,7 +217,7 @@ if ($resql) $moreforfilter.='
'; $moreforfilter.=$langs->trans('IncludingProductWithTag'). ': '; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); + $moreforfilter.=Form::selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); $moreforfilter.='
'; } diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 2f1c3697058..589b2944e21 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -216,14 +216,14 @@ if ($resql) print ''; print ''; $arrayofoperators=array('<'=>'<','>'=>'>'); - print $form->selectarray('filter_op1',$arrayofoperators,$filter_op1,1); + print Form::selectarray('filter_op1',$arrayofoperators,$filter_op1,1); print ' '; $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); print $form->select_date($filter_date1,'op1',0,0,1,'',1,0,1); print ''; print ''; $arrayofoperators=array('<'=>'<','>'=>'>'); - print $form->selectarray('filter_op2',$arrayofoperators,$filter_op2,1); + print Form::selectarray('filter_op2',$arrayofoperators,$filter_op2,1); print ' '; $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1); @@ -236,7 +236,7 @@ if ($resql) '4&filter=expired'=>$langs->trans("ServiceStatusLate"), '5'=>$langs->trans("ServiceStatusClosed") ); - print $form->selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1); + print Form::selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 0b55e2cc814..4431b8c3336 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -30,7 +30,8 @@ /** * Class to stock current configuration */ -class Conf +class +Conf { /** \public */ //! To store properties found in conf file @@ -582,5 +583,15 @@ class Conf if (empty($conf->loghandlers[$handler])) $this->loghandlers[$handler]=$loghandlerinstance; } } + + public function setConstant() + { + + } + + public function getConstant() + { + + } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d06677d97af..8e88fd31c99 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -185,7 +185,7 @@ class Form $tmp=explode(':',$val); $arraylist[$tmp[0]]=$tmp[1]; } - $ret.=$this->selectarray($htmlname,$arraylist,$value); + $ret.= Form::selectarray($htmlname,$arraylist,$value); } else if (preg_match('/^ckeditor/',$typeofdata)) { @@ -3249,7 +3249,7 @@ class Form { $more.=''; if (! empty($input['label'])) $more.=$input['label'].''; - $more.=$this->selectarray($input['name'],$input['values'],$input['default'],1); + $more.= Form::selectarray($input['name'],$input['values'],$input['default'],1); $more.=''."\n"; } else if ($input['type'] == 'checkbox') @@ -4650,7 +4650,7 @@ class Form * @return string HTML select string. * @see multiselectarray */ - static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='') + public static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='') { global $conf, $langs; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 0316fb461cf..cf46547b9d5 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -277,7 +277,7 @@ class FormActions } else { - print $form->selectarray($htmlname, $arraylist, $selected); + print Form::selectarray($htmlname, $arraylist, $selected); } if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 339ba9c6b5e..a70c6f3f40c 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -512,7 +512,7 @@ class FormFile $arraykeys=array_keys($modellist); $modelselected=$arraykeys[0]; } - $out.= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', ''); + $out.= Form::selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', ''); $out.= ''; } else diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 9d540a37bb6..2cd001bcf8b 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -313,7 +313,7 @@ class FormMail extends Form if (count($modelmail_array)>0) { $out.= '
'."\n"; - $out.= $langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1); + $out.= $langs->trans('SelectMailModel').': '.Form::selectarray('modelmailselected', $modelmail_array, 0, 1); if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); $out.= '   '; $out.= ''; @@ -477,7 +477,7 @@ class FormMail extends Form if (! empty($this->withto) && is_array($this->withto)) { if (! empty($this->withtofree)) $out.= " ".$langs->trans("or")." "; - $out.= $form->selectarray("receiver", $this->withto, GETPOST("receiver"), 1); + $out.= Form::selectarray("receiver", $this->withto, GETPOST("receiver"), 1); } if (isset($this->withtosocid) && $this->withtosocid > 0) // deprecated. TODO Remove this. Instead, fill withto with array before calling method. { @@ -489,7 +489,7 @@ class FormMail extends Form $liste[$key]=$value; } if ($this->withtofree) $out.= " ".$langs->trans("or")." "; - $out.= $form->selectarray("receiver", $liste, GETPOST("receiver"), 1); + $out.= Form::selectarray("receiver", $liste, GETPOST("receiver"), 1); } } $out.= "\n"; @@ -511,7 +511,7 @@ class FormMail extends Form if (! empty($this->withtocc) && is_array($this->withtocc)) { $out.= " ".$langs->trans("or")." "; - $out.= $form->selectarray("receivercc", $this->withtocc, GETPOST("receivercc"), 1); + $out.= Form::selectarray("receivercc", $this->withtocc, GETPOST("receivercc"), 1); } } $out.= "\n"; @@ -533,7 +533,7 @@ class FormMail extends Form if (! empty($this->withtoccc) && is_array($this->withtoccc)) { $out.= " ".$langs->trans("or")." "; - $out.= $form->selectarray("receiverccc", $this->withtoccc, GETPOST("receiverccc"), 1); + $out.= Form::selectarray("receiverccc", $this->withtoccc, GETPOST("receiverccc"), 1); } } diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index 4ecbef60b58..593d38e2296 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -138,7 +138,7 @@ class FormOrder return -1; } - print $form->selectarray($htmlname,$listofmethods,$selected,$addempty); + print Form::selectarray($htmlname,$listofmethods,$selected,$addempty); return 1; } diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 35736b56228..2ba92da0916 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -262,7 +262,7 @@ function limitChars(textarea, limit, infodiv) } print " ".$langs->trans("or")." "; //var_dump($_REQUEST);exit; - print $form->selectarray("receiver", $liste, GETPOST("receiver"), 1); + print Form::selectarray("receiver", $liste, GETPOST("receiver"), 1); } print ' '.$langs->trans("SmsInfoNumero"); } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 5c6b9613c17..8026f6104c2 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1156,7 +1156,7 @@ function form_constantes($tableau,$strictw3c=0) { $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } - print $form->selectarray('constvalue'.(empty($strictw3c)?'':'[]'),$arrayoflabels,($obj->value?$obj->value:'CARD'),1,0,0); + print Form::selectarray('constvalue'.(empty($strictw3c)?'':'[]'),$arrayoflabels,($obj->value?$obj->value:'CARD'),1,0,0); print ''; print ''; } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 7e3b5ea2810..ee7a711919f 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -677,7 +677,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') // Status print ''; - print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status); + print Form::selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status); print ''; // Add to agenda diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index f651c56e028..a4158bd686b 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -161,19 +161,19 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte.= ''; $texte.= ''.$langs->trans("DefaultModelPropalCreate").''; $texte.= ''; - $texte.= $form->selectarray('value2',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); + $texte.= Form::selectarray('value2',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelPropalToBill").''; $texte.= ''; - $texte.= $form->selectarray('value3',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); + $texte.= Form::selectarray('value3',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelPropalClosed").''; $texte.= ''; - $texte.= $form->selectarray('value4',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); + $texte.= Form::selectarray('value4',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); $texte.= ""; $texte.= ''; } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index ab906617b07..2a37b0c6b87 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -161,19 +161,19 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $texte.= ''; $texte.= ''.$langs->trans("DefaultModelSupplierProposalCreate").''; $texte.= ''; - $texte.= $form->selectarray('value2',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); + $texte.= Form::selectarray('value2',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelSupplierProposalToBill").''; $texte.= ''; - $texte.= $form->selectarray('value3',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); + $texte.= Form::selectarray('value3',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); $texte.= ""; $texte.= ''; $texte.= ''.$langs->trans("DefaultModelSupplierProposalClosed").''; $texte.= ''; - $texte.= $form->selectarray('value4',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); + $texte.= Form::selectarray('value4',$liste,$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); $texte.= ""; $texte.= ''; } diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 25b86cdc0bf..8bf6ac5f8a1 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -85,7 +85,7 @@ trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>) trans("Type"); ?> -selectarray('type',$type2label,GETPOST('type')); ?> + trans("Size"); ?> diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index eb365dbd5b8..9b08e68297d 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -230,7 +230,7 @@ print ' '; print ' '; print ' '; print ''; -print $form->selectarray('status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Enabled"), '-2'=>$langs->trans("EnabledAndDisabled"), '2'=>$langs->trans("Archived")), $status, 1); +print Form::selectarray('status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Enabled"), '-2'=>$langs->trans("EnabledAndDisabled"), '2'=>$langs->trans("Archived")), $status, 1); print ''; print ''; print ''; diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 7da3fadcc6e..81da7484b71 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -252,7 +252,7 @@ print '
'; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears); - print $form->selectarray('year',$arrayyears,$year,0); + print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4c71256baf3..1e3c08bd5fa 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -680,7 +680,7 @@ if ($action == 'create') print "".$langs->trans("DeliveryMethod").""; print ''; $expe->fetch_delivery_methods(); - print $form->selectarray("shipping_method_id",$expe->meths,GETPOST('shipping_method_id','int'),1,0,0,"",1); + print Form::selectarray("shipping_method_id",$expe->meths,GETPOST('shipping_method_id','int'),1,0,0,"",1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print "\n"; @@ -714,7 +714,7 @@ if ($action == 'create') print ''; include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; $liste = ModelePdfExpedition::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); print "\n"; print ""; @@ -1455,7 +1455,7 @@ else if ($id || $ref) print ''; print ''; $object->fetch_delivery_methods(); - print $form->selectarray("shipping_method_id",$object->meths,$object->shipping_method_id,1,0,0,"",1); + print Form::selectarray("shipping_method_id",$object->meths,$object->shipping_method_id,1,0,0,"",1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''; print ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 288a1b92f37..4b08afabb21 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -216,7 +216,7 @@ if ($resql) } // Status print ''; - print $form->selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')),$viewstatut,1); + print Form::selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')),$viewstatut,1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index cc5e770d02a..c7c7a561787 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -251,7 +251,7 @@ print '
'; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears); - print $form->selectarray('year',$arrayyears,$year,0); + print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index 6c515192f78..905a3c45291 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -231,7 +231,7 @@ print ''; print ''.$langs->trans("Year").''; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; arsort($arrayyears); -print $form->selectarray('year',$arrayyears,$year,0); +print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 71fec224137..19dfd0f3fc2 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1107,7 +1107,7 @@ if ($action == 'create') print ''.$langs->trans("DefaultModel").''; print ''; $liste=ModelePDFFicheinter::liste_modeles($db); - print $form->selectarray('model',$liste,$conf->global->FICHEINTER_ADDON_PDF); + print Form::selectarray('model',$liste,$conf->global->FICHEINTER_ADDON_PDF); print ""; // Public note diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index d86c2b86274..c72a2081e36 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -198,7 +198,7 @@ if ($result) } print ''; $liststatus=$interventionstatic->statuts_short; - print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); + print Form::selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 5cdd7923cbd..428f55bc5cd 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -254,7 +254,7 @@ print '
'; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear; arsort($arrayyears); - print $form->selectarray('year',$arrayyears,$year,0); + print Form::selectarray('year',$arrayyears,$year,0); print ''; print ''; print ''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 6c7d3ef1b35..2da648e01cd 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -3016,7 +3016,7 @@ elseif (! empty($object->id)) $liv['nev'] = $langs->trans("NeverReceived"); $liv['can'] = $langs->trans("Canceled"); - print $form->selectarray("type",$liv); + print Form::selectarray("type",$liv); print ''; print ''.$langs->trans("Comment").''; diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 3f75bca3a35..a4d08a2ac75 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -364,7 +364,7 @@ if ($action == 'create' && !$error) { print '' . $langs->trans('Model') . ''; print ''; $liste = ModelePDFSuppliersInvoices::liste_modeles($db); - print $html->selectarray('model', $liste, $conf->global->INVOICE_SUPPLIER_ADDON_PDF); + print Form::selectarray('model', $liste, $conf->global->INVOICE_SUPPLIER_ADDON_PDF); print ""; // Public note diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index dafe95e419d..34d8a0e13e4 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -338,7 +338,7 @@ if ($resql) print ''; print ''; $liststatus=array('0'=>$langs->trans("Draft"),'1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid")); - print $form->selectarray('filtre', $liststatus, $search_status, 1); + print Form::selectarray('filtre', $liststatus, $search_status, 1); print ''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 8cae9592033..eb7604cc2af 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -812,7 +812,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create $labeltoshow .= ($val['delay'] > 0 ? ' ('.$langs->trans("NoticePeriod").': '.$val['delay'].' '.$langs->trans("days").')':''); $arraytypeleaves[$val['rowid']]=$labeltoshow; } - print $form->selectarray('type', $arraytypeleaves, (GETPOST('type')?GETPOST('type'):''), 1); + print Form::selectarray('type', $arraytypeleaves, (GETPOST('type')?GETPOST('type'):''), 1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''; print ''; @@ -829,7 +829,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create $form->select_date($tmpdate,'date_debut_'); } print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):'morning')); + print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):'morning')); print ''; print ''; @@ -845,7 +845,7 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create $form->select_date($tmpdate,'date_fin_'); } print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):'afternoon')); + print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):'afternoon')); print ''; print ''; @@ -1037,7 +1037,7 @@ else print ''; $form->select_date($cp->date_debut,'date_debut_'); print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); + print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); print ''; print ''; } @@ -1059,7 +1059,7 @@ else print ''; $form->select_date($cp->date_fin,'date_fin_'); print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); + print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); print ''; print ''; } diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index 63d07cebddf..e06b74217a6 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -153,7 +153,7 @@ if ($object->id) print ''; $form->select_date($object->date_debut,'date_debut_'); print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); + print Form::selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday')?GETPOST('starthalfday'):$starthalfday)); print ''; print ''; } @@ -175,7 +175,7 @@ if ($object->id) print ''; $form->select_date($object->date_fin,'date_fin_'); print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); + print Form::selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday')?GETPOST('endhalfday'):$endhalfday)); print ''; print ''; } diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index fb6f41f4f39..e548b3d2403 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -224,7 +224,7 @@ if ($action == 'create') print ''; print ''.fieldLabel('Status','status',1).''; print ''; - print $form->selectarray('status',$status2label,GETPOST('status')); + print Form::selectarray('status',$status2label,GETPOST('status')); print ''; print ''; @@ -296,7 +296,7 @@ else if ($id) // Status print ''.fieldLabel('Status','status',1).''; - print $form->selectarray('status',$status2label,$object->status); + print Form::selectarray('status',$status2label,$object->status); print ''; print ''; diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index b440b5ee43e..5ab76133748 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -106,7 +106,7 @@ print ''; print ''; print ''; $arraystatus=array(''=>' ','expired'=>$langs->trans("Expired"),'opened'=>$langs->trans("Opened")); -print ''. $form->selectarray('status', $arraystatus, $status).''; +print ''. Form::selectarray('status', $arraystatus, $status).''; print ''; $searchpitco=$form->showFilterAndCheckAddButtons(0); print $searchpitco; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 5c14a20de23..d51a308e679 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -527,7 +527,7 @@ if (GETPOST('ajoutsujet')) print $langs->trans("AddNewColumn") .':

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

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

'; print ''; print '     '; print ''; @@ -850,12 +850,12 @@ while ($compteur < $num) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); - print $form->selectarray("choix".$i, $arraychoice, $car); + print Form::selectarray("choix".$i, $arraychoice, $car); } if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); - print $form->selectarray("choix".$i, $arraychoice, $car); + print Form::selectarray("choix".$i, $arraychoice, $car); } print ''."\n"; } @@ -948,12 +948,12 @@ if (empty($testligneamodifier)) if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice=array('2'=>' ','0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")); - print $form->selectarray("choix".$i, $arraychoice); + print Form::selectarray("choix".$i, $arraychoice); } if (! empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice=array('2'=>' ','0'=>$langs->trans("Against"),'1'=>$langs->trans("For")); - print $form->selectarray("choix".$i, $arraychoice); + print Form::selectarray("choix".$i, $arraychoice); } print ''."\n"; } diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index a415d6b4987..8e41b2398e1 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -137,7 +137,7 @@ for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) { } print ''. $langs->trans("TitleChoice") .' '.$j.': '; $tmparray=array('checkbox'=>$langs->trans("CheckBox"),'yesno'=>$langs->trans("YesNoList"),'foragainst'=>$langs->trans("PourContreList")); - print '   '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]); + print '   '.$langs->trans("Type").' '.Form::selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]); print ''."\n"; } diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index f794989c59e..6e34fb836b0 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -157,7 +157,7 @@ print ''; $var=!$var; print ''; print $langs->trans("PAYPAL_SSLVERSION").''; -print $form->selectarray("PAYPAL_SSLVERSION",array('1'=> $langs->trans('TLSv1'),'6'=> $langs->trans('TLSv1.2')),$conf->global->PAYPAL_SSLVERSION); +print Form::selectarray("PAYPAL_SSLVERSION",array('1'=> $langs->trans('TLSv1'),'6'=> $langs->trans('TLSv1.2')),$conf->global->PAYPAL_SSLVERSION); print ''; // Usage Parameters @@ -170,7 +170,7 @@ print "\n"; $var=!$var; print ''; print $langs->trans("PAYPAL_API_INTEGRAL_OR_PAYPALONLY").''; -print $form->selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY",array('integral'=> $langs->trans('PaypalModeIntegral'),'paypalonly'=> $langs->trans('PaypalModeOnlyPaypal')),$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY); +print Form::selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY",array('integral'=> $langs->trans('PaypalModeIntegral'),'paypalonly'=> $langs->trans('PaypalModeOnlyPaypal')),$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY); print ''; /*$var=!$var; diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index 7c9a46d8972..c8230f8421e 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -290,7 +290,7 @@ if ($action == 'create_updater' || $action == 'edit_updater') { foreach ($price_globals->listGlobalVariables() as $entry) { $globals_list[$entry->id]=$entry->code; } - print $form->selectarray('fk_variable', $globals_list, (empty($price_updaters->fk_variable)?0:$price_updaters->fk_variable)); + print Form::selectarray('fk_variable', $globals_list, (empty($price_updaters->fk_variable)?0:$price_updaters->fk_variable)); print ''; //Description print ''; @@ -305,7 +305,7 @@ if ($action == 'create_updater' || $action == 'edit_updater') { foreach ($price_updaters->types as $val) { $type_list[$val] = $langs->trans("GlobalVariableUpdaterType".$val); } - print $form->selectarray('type', $type_list, $type); + print Form::selectarray('type', $type_list, $type); // This code submits form when type is changed print ''; print "\n"; $s.=''.$langs->trans("VATIntraCheck").''; - $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); + $s = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else { diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index acfe7de156f..1842ca8c43e 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -311,7 +311,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -457,7 +457,7 @@ foreach ($dirmodels as $reldir) print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 91dcaf41131..6a02c851631 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -920,7 +920,7 @@ if ($id) if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); } if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); } if ($fieldlist[$field]=='type') { - if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,'')); + if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=Form::textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,'')); else $valuetoshow=$langs->trans("Type"); } if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); } @@ -963,7 +963,7 @@ if ($id) { print ''; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + else if (! empty($tabhelp[$id][$value])) print Form::textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print ''; } diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 42741b49c7a..a7796bfbfa8 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -316,7 +316,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -463,7 +463,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 5c8fa9732e4..66574bac59d 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -327,7 +327,7 @@ foreach ($dirmodels as $reldir) } } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -469,7 +469,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); $htmltooltip.='
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,-1,0); + print Form::textwithpicto('',$htmltooltip,-1,0); print ''; // Preview diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index b3f1d7a5d51..74164bce35c 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -444,7 +444,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors { @@ -600,7 +600,7 @@ foreach ($dirmodels as $reldir) print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index fd34d01f620..34f25dc2044 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -338,7 +338,7 @@ foreach ($dirmodels as $reldir) } } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -479,7 +479,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); $htmltooltip.='
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,-1,0); + print Form::textwithpicto('',$htmltooltip,-1,0); print ''; // Preview diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 3806258d246..00a553cd073 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -108,12 +108,12 @@ if ($action == 'edit') $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''; $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''; $var=!$var; @@ -121,7 +121,7 @@ if ($action == 'edit') $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''; print ''; @@ -142,12 +142,12 @@ else $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_MAX_DECIMALS_UNIT.''; $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_MAX_DECIMALS_TOT.''; $var=!$var; @@ -155,7 +155,7 @@ else $var=!$var; print ''; - print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); + print Form::textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_ROUNDING_RULE_TOT.''; print ''; diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 42d7fa69ac8..7000f526a84 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -305,7 +305,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''; @@ -442,7 +442,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; // Preview diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index b2769dc8e2f..7ea89c05757 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -364,7 +364,7 @@ if ($action == 'edit') $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; if (empty($text)) $text = $langs->trans("Undefined"); $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($text,$htmltext,1,'superadmin'); + print Form::textwithpicto($text,$htmltext,1,'superadmin'); print ''; } print ''; @@ -396,7 +396,7 @@ if ($action == 'edit') { $text = ! empty($mainserver) ? $mainserver : $smtpserver; $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($text,$htmltext,1,'superadmin'); + print Form::textwithpicto($text,$htmltext,1,'superadmin'); print ''; } } @@ -429,7 +429,7 @@ if ($action == 'edit') { $text = (! empty($mainport) ? $mainport : $smtpport); $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($text,$htmltext,1,'superadmin'); + print Form::textwithpicto($text,$htmltext,1,'superadmin'); print ''; } } @@ -449,7 +449,7 @@ if ($action == 'edit') else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID,$htmltext,1,'superadmin'); + print Form::textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID,$htmltext,1,'superadmin'); print ''; } print ''; @@ -469,7 +469,7 @@ if ($action == 'edit') else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW,$htmltext,1,'superadmin'); + print Form::textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW,$htmltext,1,'superadmin'); print ''; } print ''; diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index f8b89c515aa..e4556371ffe 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -171,10 +171,10 @@ if ($action == 'edit') print ''; print ''; print ''; print ''; print ''; @@ -210,10 +210,10 @@ else print '
'.$langs->trans("Menu").''; - print $form->textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); print ''; - print $form->textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); print '
'; print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index d862b80d6a8..89a60e957d3 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -267,7 +267,7 @@ if (! empty($categ[$categidx])) { $categidx='expdev'; $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; - $head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3); + $head[$h][1] = Form::textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3); $head[$h][2] = 'expdev'; $h++; } @@ -451,7 +451,7 @@ if ($mode != 'marketplace') $text=$langs->trans("ExternalModule",$dirofmodule); if (! empty($objMod->editor_name) && $objMod->editor_name != 'dolibarr') $text.=' - '.$objMod->editor_name; if (! empty($objMod->editor_web) && $objMod->editor_web != 'www.dolibarr.org') $text.=' - '.$objMod->editor_web; - print $form->textwithpicto($version, $text, 1, 'help'); + print Form::textwithpicto($version, $text, 1, 'help'); } else print $version; print "\n"; diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index e8ac153bea7..28dbe55c31e 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -239,12 +239,12 @@ foreach($listofnotifiedevents as $notifiedevent) if (! empty($valuedet) && ! isValidEmail($valuedet,1)) $showwarning++; } if ((! empty($conf->global->$param)) && $showwarning) $s.=' '.img_warning($langs->trans("ErrorBadEMail")); - print $form->textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); + print Form::textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); print '
'; } // New entry input fields $s=''; // Do not use type="email" here, we must be able to enter a list of email with , separator. - print $form->textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); + print Form::textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").'
'.$langs->trans("YouCanAlsoUseSupervisorKeyword"),1,'help','',0,2); print ''; print '"; print ''; print ''; print "\n"; @@ -503,7 +503,7 @@ foreach ($dirmodels as $reldir) print ''; // Preview diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 1213a9b2238..5949b61d4d9 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -151,7 +151,7 @@ print ''; $var=!$var; print ''; print ''; print ''; @@ -187,7 +187,7 @@ $sessiontimeout=ini_get("session.gc_maxlifetime"); if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout; print ''; print ''; print ''; print ''; @@ -431,7 +431,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); print ''; print ''; print ''; @@ -441,7 +441,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); print ''; print ''; print "\n"; @@ -480,7 +480,7 @@ foreach ($dirmodels as $reldir) print ''; // Preview diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index f3cfcff9807..f1d7f489e01 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -225,11 +225,11 @@ foreach ($syslogModules as $moduleName) print ''; print "\n"; diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 365cfaa449d..dc9f262a159 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -114,8 +114,8 @@ else $show=1; } if ($show==0) print $paramval; - if ($show==1) print $form->textwithpicto($paramval,$text); - if ($show==2) print $form->textwithpicto($paramval,$text,1,'warning'); + if ($show==1) print Form::textwithpicto($paramval,$text); + if ($show==2) print Form::textwithpicto($paramval,$text,1,'warning'); print ''; print ''."\n"; } diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index eeea93a2fea..5df1083cd93 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -82,7 +82,7 @@ print '\n"; $var=!$var; print ''."\n"; @@ -182,7 +182,7 @@ $val=($a>=0?'+':'').$a; $val.=' ('.($a=='unknown'?'unknown':($a>=0?'+':'').($a*3600)).')'; $val.='       '.getServerTimeZoneString(); $val.='       '.$langs->trans("DaylingSavingTime").': '.($daylight==='unknown'?'unknown':($a==$c?yn($daylight):yn(0).($daylight?'     ('.$langs->trans('YesInSummer').')':''))); -print $form->textwithtooltip($val,$txt,2,1,img_info('')); +print Form::textwithtooltip($val,$txt,2,1,img_info('')); print ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php $var=!$var; print ''."\n"; @@ -202,7 +202,7 @@ if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') if ($resql) { $obj = $db->fetch_object($resql); - print $form->textwithtooltip($obj->Value,$langs->trans('TZHasNoEffect'),2,1,img_info('')); + print Form::textwithtooltip($obj->Value,$langs->trans('TZHasNoEffect'),2,1,img_info('')); } print ''."\n"; } diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 4ba759a66fa..ffe6e81af3f 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -270,7 +270,7 @@ if ($result) // More informations print ''; print "\n"; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index c313c91a7bd..6dee42be6ac 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -150,7 +150,7 @@ if ($savehandler == 'files') // ID print ''; diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index de59c9136b2..3f75499559a 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -72,7 +72,7 @@ foreach ($triggers as $trigger) $text=$trigger['info']; $text.="
\n".$langs->trans("File").":
\n".$trigger['relpath']; //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']); - print $form->textwithpicto('', $text); + print Form::textwithpicto('', $text); print ''; print ''; } diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php index de4c0472f62..f7b29607bd4 100644 --- a/htdocs/admin/websites.php +++ b/htdocs/admin/websites.php @@ -381,7 +381,7 @@ if ($id) { print ''; } diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index d1af6bdafb2..2fb95bdbf33 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -99,7 +99,7 @@ $form = new Form($db); $var=!$var; print ''; print ''; -print ''; +print ''; print ''; /*print '';*/ print ''; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 9a7d0349f41..6960a9ced33 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -826,12 +826,12 @@ else if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { $text=$langs->trans('NotEnoughPermissions'); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } } @@ -1072,7 +1072,7 @@ else if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 0c133fac6df..a992ed73fd2 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -208,7 +208,7 @@ if ($object->fetch($id) >= 0) if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 66474afea8e..7094163c9a7 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -150,7 +150,7 @@ if ($result) if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) { $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); + print Form::textwithpicto($nbemail,$text,1,'warning'); } else { diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 3a2a28c984d..3c330576f04 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1441,7 +1441,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; @@ -2064,7 +2064,7 @@ if ($action == 'create') print ''; - print ''; + print ''; print ''; @@ -2281,7 +2281,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; } diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index e94daeca65a..a482b2b480c 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -420,7 +420,7 @@ if ($action == 'create' && !$error) print ''."\n"; print '
'.$langs->trans("Menu").''; - print $form->textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("InternalUsers"),$langs->trans("InternalExternalDesc")); print ''; - print $form->textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($langs->trans("ExternalUsers"),$langs->trans("InternalExternalDesc")); print '
'; diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index fa99e2c202b..f6d7de38048 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -193,7 +193,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors { diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 3b968af09c3..c6564d3f450 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -404,7 +404,7 @@ else // Show print "
'; $text = $langs->trans("ProtectAndEncryptPdfFiles"); - $desc = $form->textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); + $desc = Form::textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); print $desc; print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index b4f1fe67e0b..54868b03c9b 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -356,7 +356,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'.$langs->trans("UMask").''; -print $form->textwithpicto('',$langs->trans("UMaskExplanation")); +print Form::textwithpicto('',$langs->trans("UMaskExplanation")); print ''; print ''; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index ac0a1e883eb..a72a00b992c 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -140,7 +140,7 @@ if (function_exists("imagecreatefrompng")) } else { - $desc = $form->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); + $desc = Form::textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); print $desc; } print '
'.$langs->trans("SessionTimeOut").''; -print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print Form::textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print ''; print ' '.strtolower($langs->trans("Seconds")); diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 6fa692f47fc..f1f9ce5964c 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -291,7 +291,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''.img_object($langs->trans("Preview"),'order').''; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 50eb9c9a322..d55b35b7960 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -307,7 +307,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; print ''.img_object($langs->trans("Preview"),'order').''; diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 41737f7a9d5..aad9bb9040b 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -190,7 +190,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors { diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 069c90ead8a..5cf09741cf1 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -333,7 +333,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; if ($module->getInfo()) { - print $form->textwithpicto('', $module->getInfo(), 1, 'help'); + print Form::textwithpicto('', $module->getInfo(), 1, 'help'); } if ($module->getWarning()) { - print $form->textwithpicto('', $module->getWarning(), 1, 'warning'); + print Form::textwithpicto('', $module->getWarning(), 1, 'warning'); } print '
'.$langs->trans("SessionId").''.$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); print ''; -print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print Form::textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print "
'.$langs->trans("CurrentTheme").''.$conf->theme.'
  => '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').'
'; $htmltext=''.$langs->trans("UserAgent").': '.($obj->user_agent?$obj->user_agent:$langs->trans("Unknown")); - print $form->textwithpicto('',$htmltext); + print Form::textwithpicto('',$htmltext); print '
'; - if ("$key" == session_id()) print $form->textwithpicto($key,$langs->trans("YourSession")); + if ("$key" == session_id()) print Form::textwithpicto($key,$langs->trans("YourSession")); else print $key; print '
'; if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; - else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + else if (! empty($tabhelp[$id][$value])) print Form::textwithpicto($valuetoshow,$tabhelp[$id][$value]); else print $valuetoshow; print '
'.$langs->trans("CategorieRecursiv").''. $form->textwithpicto('',$langs->trans("CategorieRecursivHelp"),1,'help').''. Form::textwithpicto('',$langs->trans("CategorieRecursivHelp"),1,'help').''; if ($conf->use_javascript_ajax) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 1775c14767d..e8ea62f5607 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -430,7 +430,7 @@ else if ($id || $ref) // Morphy print '
'.$langs->trans("Nature").''.$member->getmorphylib().''; - print $form->showphoto('memberphoto',$member); + print Form::showphoto('memberphoto',$member); print '
'; print $form->select_incoterms((!empty($soc->fk_incoterms) ? $soc->fk_incoterms : ''), (!empty($soc->location_incoterms)?$soc->location_incoterms:'')); print '
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 7759002fdfd..78de2c70fa7 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1583,7 +1583,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (!empty($conf->incoterm->enabled)) { print '
'; print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); print '
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 1a66ccf9f21..692d189e457 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -543,10 +543,10 @@ if ($resql) print ''; if ($nbprod) { - print $form->textwithtooltip('',$text_info,2,1,$text_icon,'',2); + print Form::textwithtooltip('',$text_info,2,1,$text_icon,'',2); } if ($warning) { - print $form->textwithtooltip('', $langs->trans('NotEnoughForAllOrders').'
'.$text_warning, 2, 1, img_picto('', 'error'),'',2); + print Form::textwithtooltip('', $langs->trans('NotEnoughForAllOrders').'
'.$text_warning, 2, 1, img_picto('', 'error'),'',2); } print '
'; print ''; print ''; - $desc=$html->textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1); + $desc=Form::textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1); print $desc; print '
'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 88ec64f0a7b..5a00c796038 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2169,7 +2169,7 @@ if ($action == 'create') // Standard invoice print '
'; $tmp=' '; - $desc = $form->textwithpicto($tmp.$langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($tmp.$langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3); print $desc; print '
'; @@ -2186,7 +2186,7 @@ if ($action == 'create') }); '; - $desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); print ''; @@ -2210,7 +2210,7 @@ if ($action == 'create') // First situation invoice print '
'; $tmp=' '; - $desc = $form->textwithpicto($tmp.$langs->trans("InvoiceFirstSituationAsk"), $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($tmp.$langs->trans("InvoiceFirstSituationAsk"), $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); print $desc; print '
'; @@ -2224,7 +2224,7 @@ if ($action == 'create') $text .= ''; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceSituationDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceSituationDesc"), 1, 'help', '', 0, 3); print $desc; print ''; } @@ -2253,7 +2253,7 @@ if ($action == 'create') $text .= ''; } $text .= ''; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); print $desc; print ''; } @@ -2263,7 +2263,7 @@ if ($action == 'create') $tmp=' '; $text = $tmp.$langs->trans("InvoiceReplacement") . ' '; $text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); print $desc; print ''; } @@ -2305,7 +2305,7 @@ if ($action == 'create') $text .= ''; } $text .= ''; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); print $desc; print '
'; @@ -2321,7 +2321,7 @@ if ($action == 'create') $tmp=' '; $text = $tmp.$langs->trans("InvoiceAvoir") . ' '; $text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; - $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); + $desc = Form::textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); print $desc; print '
' . "\n"; } @@ -2390,7 +2390,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; @@ -2817,9 +2817,9 @@ else if ($id > 0 || ! empty($ref)) $i ++; // Texte $i = 0; - $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); + $close [$i] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); $i ++; - $close [$i] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); + $close [$i] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency" . $conf->currency)), $close [$i] ['label'], 1); $i ++; // arrayreasons[code]=reason foreach ($close as $key => $val) { @@ -2851,8 +2851,8 @@ else if ($id > 0 || ! empty($ref)) $close [1] ['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); $close [2] ['label'] = $langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); // Texte - $close [1] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $object->ref), $close [1] ['label'], 1); - $close [2] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close [2] ['label'], 1); + $close [1] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $object->ref), $close [1] ['label'], 1); + $close [2] ['reason'] = Form::textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close [2] ['label'], 1); // arrayreasons $arrayreasons [$close [1] ['code']] = $close [1] ['reason']; $arrayreasons [$close [2] ['code']] = $close [2] ['reason']; @@ -3026,7 +3026,7 @@ else if ($id > 0 || ! empty($ref)) } else { $text = $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->transnoentities("Currency" . $conf->currency)); $text2 = $langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text, $text2); + print Form::textwithpicto($text, $text2); } } } else { @@ -3050,7 +3050,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->statut != 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { if ($object->statut == 0 && $object->type != Facture::TYPE_DEPOSIT) { $text = $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)); - print $form->textwithpicto($text, $langs->trans("CreditNoteDepositUse")); + print Form::textwithpicto($text, $langs->trans("CreditNoteDepositUse")); } else { print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote), $langs->transnoentities("Currency" . $conf->currency)) . '.'; } @@ -3342,21 +3342,21 @@ else if ($id > 0 || ! empty($ref)) // Paye partiellement 'escompte' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') { print ''; $resteapayeraffiche = 0; } // Paye partiellement ou Abandon 'badcustomer' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer') { print ''; // $resteapayeraffiche=0; } // Paye partiellement ou Abandon 'product_returned' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned') { print ''; $resteapayeraffiche = 0; } @@ -3366,7 +3366,7 @@ else if ($id > 0 || ! empty($ref)) $text = $langs->trans("HelpAbandonOther"); if ($object->close_note) $text .= '

' . $langs->trans("Reason") . ':' . $object->close_note; - print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1); + print Form::textwithpicto($langs->trans("Abandoned") . ':', $text, - 1); print ''; $resteapayeraffiche = 0; } @@ -3701,7 +3701,7 @@ else if ($id > 0 || ! empty($ref)) print ' diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index f12f90d6206..b9d9f1ecfd4 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -152,10 +152,10 @@ else
'; print $desc; print '
'; print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); print '
'; - print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); + print Form::textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' 
'; - print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); + print Form::textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' 
'; - print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); + print Form::textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' 
' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' 
'; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 1172769e95a..1250118f40e 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -177,7 +177,7 @@ if ($id > 0 || ! empty($ref)) { $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); $text2=$langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text,$text2); + print Form::textwithpicto($text,$text2); } } } @@ -206,7 +206,7 @@ if ($id > 0 || ! empty($ref)) if ($object->statut == Facture::STATUS_DRAFT && $object->type != Facture::TYPE_DEPOSIT) { $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); - print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); + print Form::textwithpicto($text,$langs->trans("CreditNoteDepositUse")); } else { diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 9aa6aca1663..76a991dfdd1 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -342,7 +342,7 @@ if ($action == 'create') print ''; // Frequency - print ""; @@ -449,7 +449,7 @@ if ($action == 'create') $text=$product_static->getNomUrl(1); $text.= ' - '.(! empty($objp->custom_label)?$objp->custom_label:$objp->product_label); $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($db->jdate($objp->date_start), $db->jdate($objp->date_end)); @@ -471,7 +471,7 @@ if ($action == 'create') if (! empty($objp->custom_label)) { $text.= ' '.$objp->custom_label.''; - print $form->textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i); + print Form::textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i); } else { @@ -897,7 +897,7 @@ else $text=$product_static->getNomUrl(1); $text.= ' - '.(! empty($object->lines[$i]->label)?$object->lines[$i]->label:$object->lines[$i]->product_label); $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($object->lines[$i]->desc)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end); @@ -918,7 +918,7 @@ else if (! empty($object->lines[$i]->label)) { $text.= ' '.$object->lines[$i]->label.''; - print $form->textwithtooltip($text,dol_htmlentitiesbr($object->lines[$i]->desc),3,'','',$i); + print Form::textwithtooltip($text,dol_htmlentitiesbr($object->lines[$i]->desc),3,'','',$i); } else { diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 00254b7440f..b881086657a 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -252,7 +252,7 @@ if ($object->id > 0) { $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); $text2=$langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text,$text2); + print Form::textwithpicto($text,$text2); } } } @@ -272,7 +272,7 @@ if ($object->id > 0) if ($object->statut == Facture::STATUS_DRAFT && $object->type != Facture::TYPE_DEPOSIT) { $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); - print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); + print Form::textwithpicto($text,$langs->trans("CreditNoteDepositUse")); } else print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'.'; } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index a2b55c3c034..1d2432a586f 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -980,7 +980,7 @@ else print ''; print '\n"; } @@ -432,7 +432,7 @@ class FormMail extends Form if (! empty($this->withto) || is_array($this->withto)) { $out.= '\n"; } @@ -244,7 +244,7 @@ function limitChars(textarea, limit, infodiv) print ''; print ''; print "\n"; @@ -828,8 +828,8 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ } print ''; print "\n"; @@ -1098,7 +1098,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print ''; - print ''; + print ''; } if (empty($conf->global->PROJECT_HIDE_TASKS)) { diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 8cfd5f202d5..0de36087fdd 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -256,7 +256,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='') $text=$product_static->getNomUrl(1); $text.= ' - '.$label; $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($objp->date_start,$objp->date_end); @@ -277,7 +277,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='') if (! empty($objp->label)) { $text.= ' '.$objp->label.''; - print $form->textwithtooltip($text,$objp->description,3,'','',$i); + print Form::textwithtooltip($text,$objp->description,3,'','',$i); } else { print $text.' '.nl2br($objp->description); } diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index aeb7ea4cd8f..5c3c185f83e 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -89,7 +89,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode // Mask parameter //$texte.= ''; $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; $texte.= ''; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index b6d4df5657f..ceccfdc5765 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -134,7 +134,7 @@ class doc_generic_order_odt extends ModelePDFCommandes $texthelp.='
'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'
'; $texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it - $texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1); + $texte.= Form::textwithpicto($texttitle,$texthelp,1,'help','',1); $texte.= '
'; $texte.= '
".$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')).""; + print "
".Form::textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')).""; print " ".Form::selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')); print "
'.fieldLabel('Photo','photoinput').''; if ($object->photo) { - print $form->showphoto('contact',$object); + print Form::showphoto('contact',$object); print "
\n"; } print ''; @@ -1036,7 +1036,7 @@ else $formquestion=array( array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password), - //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External'))) + //array('label' => Form::textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External'))) ); $text=$langs->trans("ConfirmCreateContact").'
'; if (! empty($conf->societe->enabled)) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 1dfd6acb8bc..c579c7faf56 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -434,7 +434,7 @@ if ($result) } $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print '
'; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index c8903d8d363..427e0962b6d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1491,7 +1491,7 @@ else $description = ''; // Already added into main visible desc } - echo $form->textwithtooltip($text,$description,3,'','',$cursorline,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); + echo Form::textwithtooltip($text,$description,3,'','',$cursorline,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); print ''; } diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 8b9102a799f..144245f8aa4 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -194,7 +194,7 @@ if (file_exists($fullpathselecteddir)) $htmltooltip.=''.$langs->trans("ECMNbOfFilesInDir").': '.((isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0)?$val['cachenbofdoc']:$langs->trans("NeedRefresh")).'
'; if ($nboffilesinsubdir > 0) $htmltooltip.=''.$langs->trans("ECMNbOfFilesInSubDir").': '.$nboffilesinsubdir; else $htmltooltip.=''.$langs->trans("ECMNbOfSubDir").': '.($nbofsubdir >= 0 ? $nbofsubdir : $langs->trans("NeedRefresh")).'
'; - print $form->textwithpicto('',$htmltooltip,1,"info"); + print Form::textwithpicto('',$htmltooltip,1,"info"); print ""; print "
\n"; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6e8af102616..acbe2391816 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -370,7 +370,7 @@ class Form /** * Show a text and picto with tooltip on text or picto. - * Can be called by an instancied $form->textwithtooltip or by a static call Form::textwithtooltip + * Can be called by an instancied Form::textwithtooltip or by a static call Form::textwithtooltip * * @param string $text Text to show * @param string $htmltext HTML content of tooltip. Must be HTML/UTF8 encoded. @@ -384,7 +384,7 @@ class Form * @return string Code html du tooltip (texte+picto) * @see Use function textwithpicto if you can. */ - function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0) + public static function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0) { global $conf; @@ -446,7 +446,7 @@ class Form * @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span * @return string HTML code of text, picto, tooltip */ - function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2) + public static function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2) { global $conf; @@ -479,7 +479,7 @@ class Form elseif ($type == 'admin') $img = img_picto($alt, 'star'); elseif ($type == 'warning') $img = img_warning($alt); - return $this->textwithtooltip($text, $htmltext, 2, $direction, $img, $extracss, $notabs, '', $noencodehtmltext); + return self::textwithtooltip($text, $htmltext, 2, $direction, $img, $extracss, $notabs, '', $noencodehtmltext); } /** @@ -3098,7 +3098,7 @@ class Form require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; $bankstatic=new Account($this->db); $bankstatic->fetch($selected); - print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code); + print self::textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code); } else { print " "; } @@ -4744,7 +4744,7 @@ class Form * @param string $acceptdelayedhtml 1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) * @return string HTML select string */ - static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0) + public static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0) { global $langs; global $delayedhtmlcontent; @@ -4935,7 +4935,7 @@ class Form * @return string HTML multiselect string * @see selectarray */ - static function multiSelectArrayWithCheckbox($htmlname, &$array, $varpage) + public static function multiSelectArrayWithCheckbox($htmlname, array &$array, $varpage) { global $user; @@ -5077,7 +5077,7 @@ class Form * @param CommonObject $object Object we want to show links to * @return int <0 if KO, >0 if OK */ - function showLinkedObjectBlock($object) + function showLinkedObjectBlock(CommonObject $object) { global $conf,$langs,$hookmanager; global $bc; @@ -5585,7 +5585,7 @@ class Form * @param int $cache 1=Accept to use image in cache * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0) + public static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0) { global $conf,$langs; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2cd001bcf8b..ff5ff6a9cc7 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -348,7 +348,7 @@ class FormMail extends Form { $help.=$key.' -> '.$langs->trans($val).'
'; } - $out.= $form->textwithpicto($langs->trans("EMailTestSubstitutionReplacedByGenericValues"), $help); + $out.= Form::textwithpicto($langs->trans("EMailTestSubstitutionReplacedByGenericValues"), $help); $out.= "
'; - if ($this->withtofree) $out.= $form->textwithpicto($langs->trans("MailTo"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients")); + if ($this->withtofree) $out.= Form::textwithpicto($langs->trans("MailTo"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients")); else $out.= $langs->trans("MailTo"); $out.= ''; if ($this->withtoreadonly) @@ -499,7 +499,7 @@ class FormMail extends Form if (! empty($this->withtocc) || is_array($this->withtocc)) { $out.= '
'; - $out.= $form->textwithpicto($langs->trans("MailCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients")); + $out.= Form::textwithpicto($langs->trans("MailCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients")); $out.= ''; if ($this->withtoccreadonly) { @@ -521,7 +521,7 @@ class FormMail extends Form if (! empty($this->withtoccc) || is_array($this->withtoccc)) { $out.= '
'; - $out.= $form->textwithpicto($langs->trans("MailCCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients")); + $out.= Form::textwithpicto($langs->trans("MailCCC"),$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients")); $out.= ''; if (! empty($this->withtocccreadonly)) { diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 7ccb382a4a3..859c0e7b586 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -91,7 +91,7 @@ class FormProjets if (class_exists('Form')) { if (empty($form)) $form=new Form($this->db); - print $form->textwithpicto('', $langs->trans("ClosedProjectsAreHidden")); + print Form::textwithpicto('', $langs->trans("ClosedProjectsAreHidden")); } } } diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 2ba92da0916..d4c95f02837 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -136,7 +136,7 @@ function limitChars(textarea, limit, infodiv) { $help.=$key.' -> '.$langs->trans($val).'
'; } - print $form->textwithpicto($langs->trans("SmsTestSubstitutionReplacedByGenericValues"),$help); + print Form::textwithpicto($langs->trans("SmsTestSubstitutionReplacedByGenericValues"),$help); print "
'; //$moretext=$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"); $moretext=''; - print $form->textwithpicto($langs->trans("SmsTo"),$moretext); + print Form::textwithpicto($langs->trans("SmsTo"),$moretext); print ''; if ($this->withtoreadonly) { diff --git a/htdocs/core/lib/ecm.lib.php b/htdocs/core/lib/ecm.lib.php index 34294f502e8..6a2fc50b3ac 100644 --- a/htdocs/core/lib/ecm.lib.php +++ b/htdocs/core/lib/ecm.lib.php @@ -40,14 +40,14 @@ function ecm_prepare_dasboard_head($object) $helptext.=$langs->trans("ECMAreaDesc2"); $head[$h][0] = DOL_URL_ROOT.'/ecm/index.php'; - $head[$h][1] = $langs->trans("ECMSectionsManual").$form->textwithpicto('', $helptext, 1, 'info', '', 0, 3); + $head[$h][1] = $langs->trans("ECMSectionsManual").Form::textwithpicto('', $helptext, 1, 'info', '', 0, 3); $head[$h][2] = 'index'; $h++; if (! empty($conf->global->ECM_AUTO_TREE_ENABLED)) { $head[$h][0] = DOL_URL_ROOT.'/ecm/index_auto.php'; - $head[$h][1] = $langs->trans("ECMSectionsAuto").$form->textwithpicto('', $helptext, 1, 'info', '', 0, 3); + $head[$h][1] = $langs->trans("ECMSectionsAuto").Form::textwithpicto('', $helptext, 1, 'info', '', 0, 3); $head[$h][2] = 'index_auto'; $h++; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d45cdf45492..1a415e0338e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -908,7 +908,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r } else { - if ($showimage) $morehtmlleft.='
'.$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'
'; + if ($showimage) $morehtmlleft.='
'.Form::showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'
'; } if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
'; if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 92229a72d23..7201b30308c 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -654,8 +654,8 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t print '
'; - if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject")); - else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou")); + if ((! $lines[$i]->public) && $disabledproject) print Form::textwithpicto('',$langs->trans("YouAreNotContactOfProject")); + else if ($disabledtask) print Form::textwithpicto('',$langs->trans("TaskIsNotAffectedToYou")); print '
'; - if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject")); - else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou")); + if ((! $lines[$i]->public) && $disabledproject) print Form::textwithpicto('',$langs->trans("YouAreNotContactOfProject")); + else if ($disabledtask) print Form::textwithpicto('',$langs->trans("TaskIsNotAffectedToYou")); print '
'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).''.Form::textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).'
'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):
'.$langs->trans("Mask").':'.$form->textwithpicto('',$tooltip,1,1).''.Form::textwithpicto('',$tooltip,1,1).' 
- textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?> + trans("ExtrafieldParamHelpselect"),1,0)?> + trans("ExtrafieldParamHelpsellist"),1,0)?> + trans("ExtrafieldParamHelpchkbxlst"),1,0)?> + trans("ExtrafieldParamHelplink"),1,0)?>
- textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?> - textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?> + trans("ExtrafieldParamHelpselect"),1,0)?> + trans("ExtrafieldParamHelpsellist"),1,0)?> + trans("ExtrafieldParamHelpchkbxlst"),1,0)?> + trans("ExtrafieldParamHelplink"),1,0)?>
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index c264bac205d..ec00f23e659 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -94,7 +94,7 @@ if (empty($usemargins)) $usemargins=0; if ($line->fk_product > 0) { - echo $form->textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); + echo Form::textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); // Show range echo get_date_range($line->date_start, $line->date_end, $format); @@ -114,7 +114,7 @@ if (empty($usemargins)) $usemargins=0; if (! empty($line->label)) { $text.= ' '.$line->label.''; - echo $form->textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); + echo Form::textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):'')); } else { if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow'); echo $text.' '.dol_htmlentitiesbr($line->description); diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 90a5dd0f2ed..e8352ef3381 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -337,7 +337,7 @@ if (($action=="create") || ($action=="edit")) print "module_name."\" /> "; print ""; print ""; - print $form->textwithpicto('',$langs->trans("CronModuleHelp"),1,'help'); + print Form::textwithpicto('',$langs->trans("CronModuleHelp"),1,'help'); print ""; print "\n"; @@ -346,7 +346,7 @@ if (($action=="create") || ($action=="edit")) print "classesname."\" /> "; print ""; print ""; - print $form->textwithpicto('',$langs->trans("CronClassFileHelp"),1,'help'); + print Form::textwithpicto('',$langs->trans("CronClassFileHelp"),1,'help'); print ""; print "\n"; @@ -355,7 +355,7 @@ if (($action=="create") || ($action=="edit")) print "objectname."\" /> "; print ""; print ""; - print $form->textwithpicto('',$langs->trans("CronObjectHelp"),1,'help'); + print Form::textwithpicto('',$langs->trans("CronObjectHelp"),1,'help'); print ""; print "\n"; @@ -364,7 +364,7 @@ if (($action=="create") || ($action=="edit")) print "methodename."\" /> "; print ""; print ""; - print $form->textwithpicto('',$langs->trans("CronMethodHelp"),1,'help'); + print Form::textwithpicto('',$langs->trans("CronMethodHelp"),1,'help'); print ""; print "\n"; @@ -373,7 +373,7 @@ if (($action=="create") || ($action=="edit")) print "params."\" /> "; print ""; print ""; - print $form->textwithpicto('',$langs->trans("CronArgsHelp"),1,'help'); + print Form::textwithpicto('',$langs->trans("CronArgsHelp"),1,'help'); print ""; print "\n"; @@ -382,7 +382,7 @@ if (($action=="create") || ($action=="edit")) print "command."\" /> "; print ""; print ""; - print $form->textwithpicto('',$langs->trans("CronCommandHelp"),1,'help'); + print Form::textwithpicto('',$langs->trans("CronCommandHelp"),1,'help'); print ""; print "\n"; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 9b08e68297d..aa6bb16fbe9 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -288,7 +288,7 @@ if ($num > 0) $texttoshow.='
'.$langs->trans('CronArgs').': '. $line->params; $texttoshow.='
'.$langs->trans('Comment').': '. $langs->trans($line->note); } - print $form->textwithpicto($text, $texttoshow, 1); + print Form::textwithpicto($text, $texttoshow, 1); print ''; print ''; diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index d699a9fc7a6..23a2f87ed4e 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -433,7 +433,7 @@ if (is_resource($handle)) $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); print ''; - print $form->textwithpicto('',$htmltooltip,-1,0); + print Form::textwithpicto('',$htmltooltip,-1,0); print ''; // Preview diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index e3fa4ece95d..4009967ac9d 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -509,7 +509,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti print img_picto_common('','treemenu/base.gif'); print ''; $txt=$langs->trans("ECMRoot").' ('.$langs->trans("ECMSectionsManual").')'; - print $form->textwithpicto($txt, $htmltooltip, 1, 'info'); + print Form::textwithpicto($txt, $htmltooltip, 1, 'info'); print ''; print ''; print ''; @@ -519,7 +519,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti print ' '; print ' '; print ''; - //print $form->textwithpicto('',$htmltooltip,1,"info"); + //print Form::textwithpicto('',$htmltooltip,1,"info"); print ''; print ''; @@ -670,7 +670,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti $htmltooltip.=''.$langs->trans("ECMNbOfFilesInDir").': '.$val['cachenbofdoc'].'
'; if ($nbofsubdir) $htmltooltip.=''.$langs->trans("ECMNbOfFilesInSubDir").': '.$nboffilesinsubdir; else $htmltooltip.=''.$langs->trans("ECMNbOfSubDir").': '.$nbofsubdir.'
'; - print $form->textwithpicto('', $htmltooltip, 1, 'info'); + print Form::textwithpicto('', $htmltooltip, 1, 'info'); print ""; print ''; diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 76ce04235e4..70ce4a87e04 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -503,7 +503,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti print img_picto_common('','treemenu/base.gif'); print ''; $txt=$langs->trans("ECMRoot").' ('.$langs->trans("ECMSectionsAuto").')'; - print $form->textwithpicto($txt, $htmltooltip, 1, 0); + print Form::textwithpicto($txt, $htmltooltip, 1, 0); print ''; print ''; print ''; @@ -549,7 +549,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti $htmltooltip=''.$langs->trans("Type").': '.$langs->trans("ECMSectionAuto").'
'; $htmltooltip.=''.$langs->trans("ECMCreationUser").': '.$langs->trans("ECMTypeAuto").'
'; $htmltooltip.=''.$langs->trans("Description").': '.$val['desc']; - print $form->textwithpicto('', $htmltooltip, 1, 'info'); + print Form::textwithpicto('', $htmltooltip, 1, 'info'); print '
'; print ''; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 1e3c08bd5fa..8108c0e33cd 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -703,7 +703,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms)?$object->location_incoterms:'')); print ''; @@ -817,7 +817,7 @@ if ($action == 'create') $text=$product_static->getNomUrl(1); $text.= ' - '.(! empty($line->label)?$line->label:$line->product_label); $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->desc)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($db->jdate($line->date_start),$db->jdate($line->date_end)); @@ -838,7 +838,7 @@ if ($action == 'create') if (! empty($line->label)) { $text.= ' '.$line->label.''; - print $form->textwithtooltip($text,$line->desc,3,'','',$i); + print Form::textwithtooltip($text,$line->desc,3,'','',$i); } else { print $text.' '.nl2br($line->desc); } @@ -1491,7 +1491,7 @@ else if ($id || $ref) print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { @@ -1589,7 +1589,7 @@ else if ($id || $ref) $text=$product_static->getNomUrl(1); $text.= ' - '.$label; $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($lines[$i]->description)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); print_date_range($lines[$i]->date_start,$lines[$i]->date_end); if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) { @@ -1605,7 +1605,7 @@ else if ($id || $ref) if (! empty($lines[$i]->label)) { $text.= ' '.$lines[$i]->label.''; - print $form->textwithtooltip($text,$lines[$i]->description,3,'','',$i); + print Form::textwithtooltip($text,$lines[$i]->description,3,'','',$i); } else { print $text.' '.nl2br($lines[$i]->description); } @@ -1657,7 +1657,7 @@ else if ($id || $ref) $detail.= $langs->trans("DetailWarehouseFormat",$entrepot->libelle,$detail_entrepot->qty_shipped).'
'; } } - print $form->textwithtooltip($langs->trans("DetailWarehouseNumber"),$detail); + print Form::textwithtooltip($langs->trans("DetailWarehouseNumber"),$detail); } print ''; } @@ -1675,7 +1675,7 @@ else if ($id || $ref) { $detail.= $langs->trans("DetailBatchFormat",$dbatch->batch,dol_print_date($dbatch->eatby,"day"),dol_print_date($dbatch->sellby,"day"),$dbatch->dluo_qty).'
'; } - print $form->textwithtooltip($langs->trans("DetailBatchNumber"),$detail); + print Form::textwithtooltip($langs->trans("DetailBatchNumber"),$detail); } else { diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 4b08afabb21..f1829830daa 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -177,7 +177,7 @@ if ($resql) } $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print ''; diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 66f9582cfc0..832f05ca803 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -554,7 +554,7 @@ if ($id > 0 || ! empty($ref)) $text.= ' - '.$label; $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description)).'
'; $description.= $product_static->show_photos($conf->product->multidir_output[$product_static->entity],1,1,0,0,0,80); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($db->jdate($objp->date_start),$db->jdate($objp->date_end)); @@ -575,7 +575,7 @@ if ($id > 0 || ! empty($ref)) if (! empty($objp->label)) { $text.= ' '.$objp->label.''; - print $form->textwithtooltip($text,$objp->description,3,'','',$i); + print Form::textwithtooltip($text,$objp->description,3,'','',$i); } else { print $text.' '.nl2br($objp->description); } diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index be9d8ab49bd..a31462cd977 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1135,7 +1135,7 @@ if ($action == 'create') if (! empty($conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR)) $defaultselectuser=$conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR; if (GETPOST('fk_user_validator') > 0) $defaultselectuser=GETPOST('fk_user_validator'); $s=$form->select_dolusers($defaultselectuser, "fk_user_validator", 1, "", 0, $include_users); - print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); + print Form::textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); print ''; print ''; if (! empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) @@ -1264,7 +1264,7 @@ else print ''; print ''; } diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index c1db488f78d..c80e7563cee 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -582,7 +582,7 @@ if ($step == 2 && $datatoexport) print ''; print ''; } @@ -591,7 +591,7 @@ if ($step == 2 && $datatoexport) // Fields not selected print ''; print ''; @@ -749,7 +749,7 @@ if ($step == 3 && $datatoexport) $htmltext.=$langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].'
'; } print ''; // Filter value @@ -760,7 +760,7 @@ if ($step == 3 && $datatoexport) if ($szInfoFiltre) // Is there an info help for this filter ? { $tmp=$objexport->build_filterField($Typefieldsarray[$code], $code, $ValueFilter); - print $form->textwithpicto($tmp, $szInfoFiltre); + print Form::textwithpicto($tmp, $szInfoFiltre); } else { @@ -918,7 +918,7 @@ if ($step == 4 && $datatoexport) { $htmltext.=$langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].'
'; } - print $form->textwithpicto($text,$htmltext); + print Form::textwithpicto($text,$htmltext); //print ' ('.$code.')'; print ''; @@ -1137,7 +1137,7 @@ if ($step == 5 && $datatoexport) print ''; $text=$objmodelexport->getDriverDescForKey($key); $label=$listeall[$key]; - print ''; + print ''; print ''."\n"; } print '
'; $include_users = $object->fetch_users_approver_expensereport(); $s=$form->select_dolusers($object->fk_user_validator,"fk_user_validator",1,"",0,$include_users); - print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); + print Form::textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); print '
'.img_left('default', 0, 'style="max-width: 20px"').''; //print $text.'-'.$htmltext."
"; - print $form->textwithpicto($text,$htmltext); + print Form::textwithpicto($text,$htmltext); //print ' ('.$code.')'; print '
'; //print $text.'-'.$htmltext."
"; - print $form->textwithpicto($text,$htmltext); + print Form::textwithpicto($text,$htmltext); //print ' ('.$code.')'; print '
'.img_right('default', 0, 'style="max-width: 20px"').''; - print $form->textwithpicto($text,$htmltext); + print Form::textwithpicto($text,$htmltext); print ''.img_picto_common($key,$objmodelexport->getPictoForKey($key)).''.$form->textwithpicto($label,$text).''.Form::textwithpicto($label,$text).''.$objmodelexport->getLibLabelForKey($key).''.$objmodelexport->getLibVersionForKey($key).'
'; diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index ca3bcea1458..98460db0a19 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -139,7 +139,7 @@ foreach($liste as $key => $val) print ''.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).''; $text=$model->getDriverDescForKey($key); $label=$liste[$key]; - print ''.$form->textwithpicto($label,$text).''; + print ''.Form::textwithpicto($label,$text).''; print ''.$model->getLibLabelForKey($key).''; print ''.$model->getLibVersionForKey($key).''; print ''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 2da648e01cd..aadbc7f663f 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1612,7 +1612,7 @@ if ($action=='create') if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms)?$object->location_incoterms:'')); print ''; @@ -2099,7 +2099,7 @@ elseif (! empty($object->id)) print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { @@ -2257,7 +2257,7 @@ elseif (! empty($object->id)) $text=$product_static->getNomUrl(1,'supplier'); $text.= ' - '.$product_static->libelle; $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($date_start,$date_end); @@ -2337,7 +2337,7 @@ elseif (! empty($object->id)) $text=$product_static->getNomUrl(1,'supplier'); $text.= ' - '.$product_static->libelle; $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description)); - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); // Show range print_date_range($date_start,$date_end); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5dad9e2f706..f76c411b0f2 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1402,7 +1402,7 @@ if ($action == 'create') print ''; print ''; print ''; - $desc=$form->textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1); + $desc=Form::textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1); print $desc; print ''."\n"; @@ -1411,7 +1411,7 @@ if ($action == 'create') print ''; print ''; print ''; - $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1); + $desc=Form::textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1); print $desc; print ''."\n"; @@ -1421,7 +1421,7 @@ if ($action == 'create') print ''; print ''; print ''; - $desc=$form->textwithpicto($langs->trans("InvoiceProForma"),$langs->transnoentities("InvoiceProFormaDesc"),1); + $desc=Form::textwithpicto($langs->trans("InvoiceProForma"),$langs->transnoentities("InvoiceProFormaDesc"),1); print $desc; print ''."\n"; } @@ -1446,7 +1446,7 @@ if ($action == 'create') $text.=''; } $text.=''; - $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); + $desc=Form::textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); print $desc; print ''; @@ -1471,7 +1471,7 @@ if ($action == 'create') $text.=''; } $text.=''; - $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1); + $desc=Form::textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1); print $desc; print ''."\n"; */ @@ -1516,7 +1516,7 @@ if ($action == 'create') if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:'')); print ''; @@ -2086,7 +2086,7 @@ else $s.=''.$langs->trans("Mode1").''; $s.=' / '; $s.=''.$langs->trans("Mode2").''; - print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc",$calculationrulenum).'
'.$langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('','help')); + print Form::textwithtooltip($s, $langs->trans("CalculationRuleDesc",$calculationrulenum).'
'.$langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('','help')); print ''; // Amount Local Taxes @@ -2168,7 +2168,7 @@ else print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 23d5a61415b..021e08d5b53 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -453,7 +453,7 @@ if ($step == 2 && $datatoimport) print ''; print ''.img_picto_common($key,$objmodelimport->getPictoForKey($key)).''; $text=$objmodelimport->getDriverDescForKey($key); - print ''.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key),$text).''; + print ''.Form::textwithpicto($objmodelimport->getDriverLabelForKey($key),$text).''; print ''.$langs->trans("DownloadEmptyExample").''; // Action button print ''; @@ -522,7 +522,7 @@ if ($step == 3 && $datatoimport) print ''.$langs->trans("SourceFileFormat").''; print ''; $text=$objmodelimport->getDriverDescForKey($format); - print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); + print Form::textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); print ''.$langs->trans("DownloadEmptyExample").''; print ''; @@ -739,7 +739,7 @@ if ($step == 4 && $datatoimport) print ''.$langs->trans("SourceFileFormat").''; print ''; $text=$objmodelimport->getDriverDescForKey($format); - print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); + print Form::textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); print ''; // Separator and enclosure @@ -940,7 +940,7 @@ if ($step == 4 && $datatoimport) } $htmltext.=$langs->trans("FieldTitle").": ".$langs->trans($newlabel)."
"; $htmltext.=$langs->trans("Table")." -> ".$langs->trans("Field").': '.$tablename." -> ".preg_replace('/^.*\./','',$code)."
"; - print $form->textwithpicto($more,$htmltext); + print Form::textwithpicto($more,$htmltext); print ''; print ''; @@ -1203,7 +1203,7 @@ if ($step == 5 && $datatoimport) print ''.$langs->trans("SourceFileFormat").''; print ''; $text=$objmodelimport->getDriverDescForKey($format); - print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); + print Form::textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); print ''; // Separator and enclosure @@ -1247,7 +1247,7 @@ if ($step == 5 && $datatoimport) else { print ''; - print $form->textwithpicto("", $langs->trans("SetThisValueTo2ToExcludeFirstLine")); + print Form::textwithpicto("", $langs->trans("SetThisValueTo2ToExcludeFirstLine")); } print ''; @@ -1264,7 +1264,7 @@ if ($step == 5 && $datatoimport) else { print ''; - print $form->textwithpicto("", $langs->trans("KeepEmptyToGoToEndOfFile")); + print Form::textwithpicto("", $langs->trans("KeepEmptyToGoToEndOfFile")); } print ''; @@ -1586,7 +1586,7 @@ if ($step == 6 && $datatoimport) print ''.$langs->trans("SourceFileFormat").''; print ''; $text=$objmodelimport->getDriverDescForKey($format); - print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); + print Form::textwithpicto($objmodelimport->getDriverLabelForKey($format),$text); print ''; // File to import diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index 98da9584308..d41b007dc74 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -123,7 +123,7 @@ foreach($liste as $key) print ''; print ''.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).''; $text=$model->getDriverDescForKey($key); - print ''.$form->textwithpicto($model->getDriverLabelForKey($key),$text).''; + print ''.Form::textwithpicto($model->getDriverLabelForKey($key),$text).''; print ''.$model->getLibLabelForKey($key).''; print ''.$model->getLibVersionForKey($key).''; print ''; diff --git a/htdocs/index.php b/htdocs/index.php index 3fa01b5cc98..f972dc8665d 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -355,7 +355,7 @@ $boxwork.='trans("DolibarrWorkBoard").''; $boxwork.=''; -$boxwork.=''; +$boxwork.=''; $boxwork.=''; //print ''; if ($showweather) $boxwork.=''; diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 8a815c31edb..34566a70e0b 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -438,7 +438,7 @@ if ($action == 'create') // Seems to no be used if (! empty($line->label)) { $text.= ' '.$line->label.''; - print $form->textwithtooltip($text,$line->description,3,'','',$i); + print Form::textwithtooltip($text,$line->description,3,'','',$i); } else { print $text.' '.nl2br($line->description); } @@ -672,7 +672,7 @@ else print ''; $help = $langs->trans("GlobalVariableUpdaterHelp".$type).'
'.$langs->trans("GlobalVariableUpdaterHelpFormat".$type).''; - print ''; print ''; @@ -510,7 +510,7 @@ if ($resql) $htmltooltip.='
'.$langs->trans("WatermarkOnDraft").': '.yn((! empty($module->option_draft_watermark)?$module->option_draft_watermark:''), 1, 1); print ''; // Preview @@ -611,7 +611,7 @@ print ''; // Utilisation formulaire Ajax sur choix produit $var=!$var; print ''; -print ''; +print ''; if (empty($conf->use_javascript_ajax)) { print ''; } @@ -1141,7 +1141,7 @@ else print ''; print "\n"; $s.=''.$langs->trans("VATIntraCheck").''; - $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); + $s = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else { @@ -1550,7 +1550,7 @@ else } print '
'.$langs->trans("Number").''.$form->textwithpicto($langs->trans("Late"),$langs->trans("LateDesc")).''.Form::textwithpicto($langs->trans("Late"),$langs->trans("LateDesc")).'   '; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { @@ -777,7 +777,7 @@ else $text.= ' - '.$label; $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($object->lines[$i]->description)); //print $description; - print $form->textwithtooltip($text,$description,3,'','',$i); + print Form::textwithtooltip($text,$description,3,'','',$i); print_date_range($object->lines[$i]->date_start,$object->lines[$i]->date_end); if (! empty($conf->global->PRODUIT_DESC_IN_FORM)) { @@ -792,7 +792,7 @@ else if (! empty($object->lines[$i]->label)) { $text.= ' '.$object->lines[$i]->label.''; - print $form->textwithtooltip($text,$object->lines[$i]->description,3,'','',$i); + print Form::textwithtooltip($text,$object->lines[$i]->description,3,'','',$i); } else { print $text.' '.nl2br($object->lines[$i]->description); } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 17611868829..ad3378f5421 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1620,7 +1620,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra { if (! is_object($form)) $form=new Form($db); $selected=-1; - $searchform.=$form->selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, '', '', 0, 1, 'vmenusearchselectcombo', 1, $langs->trans("Search"), 1); + $searchform.=Form::selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, '', '', 0, 1, 'vmenusearchselectcombo', 1, $langs->trans("Search"), 1); } else { diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index c8230f8421e..86f639b1350 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -320,7 +320,7 @@ if ($action == 'create_updater' || $action == 'edit_updater') { //Parameters print '
'.$form->textwithpicto($langs->trans("Parameters"),$help,1).''; + print ''.Form::textwithpicto($langs->trans("Parameters"),$help,1).''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor=new DolEditor('parameters',empty($price_updaters->parameters)?'':$price_updaters->parameters,'',300,'','',false,false,false,10,80); $doleditor->Create(); diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index b996a66c75f..eac5b2bd720 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -390,7 +390,7 @@ foreach ($dirproduct as $dirroot) print ''; $s=$modCodeProduct->getToolTip($langs,null,-1); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'.$form->textwithpicto($langs->trans("UseSearchToSelectProduct"),$langs->trans('UseSearchToSelectProductTooltip'),1).''.Form::textwithpicto($langs->trans("UseSearchToSelectProduct"),$langs->trans('UseSearchToSelectProductTooltip'),1).''; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 9686c4683ae..90726b669a1 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -258,7 +258,7 @@ if ($id > 0 || ! empty($ref)) // Number of parent virtual products - //print $form->textwithpicto($langs->trans("ParentProductsNumber").': '.count($prodsfather), $langs->trans('IfZeroItIsNotUsedByVirtualProduct')); + //print Form::textwithpicto($langs->trans("ParentProductsNumber").': '.count($prodsfather), $langs->trans('IfZeroItIsNotUsedByVirtualProduct')); //if (count($prodsfather) > 0) //{ @@ -305,7 +305,7 @@ if ($id > 0 || ! empty($ref)) // Number of subproducts - //print $form->textwithpicto($langs->trans("AssociatedProductsNumber").': '.(empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)?$nbofsubproducts:$nbofsubsubproducts), $langs->trans('IfZeroItIsNotAVirtualProduct')); + //print Form::textwithpicto($langs->trans("AssociatedProductsNumber").': '.(empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)?$nbofsubproducts:$nbofsubsubproducts), $langs->trans('IfZeroItIsNotAVirtualProduct')); // List of subproducts //if (count($prods_arbo) > 0) diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index 54a219c49c9..dc3ef563c16 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -197,7 +197,7 @@ foreach ($price_globals->listGlobalVariables() as $entry) { } //Price expression editor -print '
'.$form->textwithpicto($langs->trans("PriceExpressionEditor"),$help_text,1).''; +print '
'.Form::textwithpicto($langs->trans("PriceExpressionEditor"),$help_text,1).''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor=new DolEditor('expression',isset($price_expression->expression)?$price_expression->expression:'','',300,'','',false,false,false,4,80); $doleditor->Create(); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 339aad05c34..49a837e1d4c 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -312,7 +312,7 @@ if ($id > 0 || $ref) print '
'; $textdesc =$langs->trans("CostPriceDescription"); $textdesc.="
".$langs->trans("CostPriceUsage"); - $text=$form->textwithpicto($langs->trans("CostPrice"), $textdesc, 1, 'help', ''); + $text=Form::textwithpicto($langs->trans("CostPrice"), $textdesc, 1, 'help', ''); print $form->editfieldkey($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6'); print '
'; print $form->editfieldval($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6'); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index bb15fbc4327..4f12671829f 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -127,7 +127,7 @@ if (empty($conf->global->PRODUIT_MULTIPRICES)) $titlesellprice=$langs->trans("SellingPrice"); if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { - $titlesellprice=$form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer")); + $titlesellprice=Form::textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer")); } } @@ -414,7 +414,7 @@ else } $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print ''; print ''; @@ -663,7 +663,7 @@ else if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) { $htmltext=$product_fourn->display_price_product_fournisseur(1, 1, 0, 1); - print $form->textwithpicto(price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"),$htmltext); + print Form::textwithpicto(price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"),$htmltext); } else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"); } diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 9dfb40c8a55..6dcd8a7c32d 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1022,7 +1022,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) $product->fetch($id, $ref, '', 1); //Ignore the math expression when getting the price print 'global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) { print ' colspan="2"'; @@ -1121,7 +1121,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) print ''; print ''; // VAT @@ -1395,7 +1395,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // Price print ''; // Status @@ -215,7 +215,7 @@ if ($result) else { $htmltext=$langs->trans("OptionMULTIPRICESIsOn"); - print $form->textwithtooltip($langs->trans("Variable"),$htmltext); + print Form::textwithtooltip($langs->trans("Variable"),$htmltext); } print ''; print ''; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 42fadf54923..3e934ae945d 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -490,7 +490,7 @@ if ($id > 0 || $ref) $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)?$langs->trans("ReStockOnValidateOrder").'
':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)?$langs->trans("ReStockOnDispatchOrder").'
':''); print ''; print ''; print ''; @@ -563,7 +563,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) } print ''; print ''; @@ -707,7 +707,7 @@ foreach ($dirmodels as $reldir) $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); print ''; // Preview @@ -866,7 +866,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); print ''; // Preview diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 0383d4388f1..d2d6dcb1506 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -455,7 +455,7 @@ if ($action == 'create' && $user->rights->projet->creer) // Ref $suggestedref=($_POST["ref"]?$_POST["ref"]:$defaultref); print ''; // Label @@ -469,7 +469,7 @@ if ($action == 'create' && $user->rights->projet->creer) if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) { $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty"); - print $form->textwithtooltip($text.' '.img_help(),$texthelp,1); + print Form::textwithtooltip($text.' '.img_help(),$texthelp,1); } else print $text; print ' '.$langs->trans("AddThirdParty").''; @@ -649,7 +649,7 @@ else $suggestedref=$object->ref; print ''; print ''; // Label @@ -662,7 +662,7 @@ else if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; $text=$form->select_thirdparty_list($object->thirdparty->id, 'socid', $filteronlist, 1, 1); $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty"); - print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1, 0, '', '', 2); + print Form::textwithtooltip($text.' '.img_help(), $texthelp, 1, 0, '', '', 2); print ''; // Visibility diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 03e1cf3b340..af5e5a799c3 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -380,7 +380,7 @@ if ($resql) } $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print '
'; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; if ($object->price_base_type == 'TTC') { print ''; @@ -1034,7 +1034,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) // Price minimum print '
'; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print '
'; - print $form->textwithpicto($langs->trans('SellingPrice') . ' ' . $i, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($langs->trans('SellingPrice') . ' ' . $i, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print '
'; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; if ($object->price_base_type == 'TTC') { print ''; @@ -1407,7 +1407,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // Price minimum print '
'; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); if ($object->price_base_type == 'TTC') { print ''; } else { @@ -1481,7 +1481,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // Price print '
'; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; @@ -1493,7 +1493,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // Price minimum print '
'; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index f561c771ff2..60913635f7a 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -190,7 +190,7 @@ if ($result) else { $htmltext=$langs->trans("OptionMULTIPRICESIsOn"); - print $form->textwithtooltip($langs->trans("Variable"),$htmltext); + print Form::textwithtooltip($langs->trans("Variable"),$htmltext); } print '
'; - print $form->textwithtooltip($langs->trans("PhysicalStock"), $text_stock_options, 2, 1, img_picto('', 'info'), '', 2); + print Form::textwithtooltip($langs->trans("PhysicalStock"), $text_stock_options, 2, 1, img_picto('', 'info'), '', 2); print ''.$object->stock_reel; if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 30018e90294..cccc8e35505 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -459,7 +459,7 @@ foreach ($dirmodels as $reldir) } print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ''; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print '
'.$langs->trans("Ref").''; - print ' '.$form->textwithpicto('', $langs->trans("YouCanCompleteRef", $suggestedref)); + print ' '.Form::textwithpicto('', $langs->trans("YouCanCompleteRef", $suggestedref)); print '
'.$langs->trans("Ref").''; - print ' '.$form->textwithpicto('', $langs->trans("YouCanCompleteRef", $suggestedref)); + print ' '.Form::textwithpicto('', $langs->trans("YouCanCompleteRef", $suggestedref)); print '
'; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index e79cacd8c16..9e3e44f403f 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -380,7 +380,7 @@ if ($resql) } $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print '
'; diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 908ad220f72..b79acd19ea1 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -104,7 +104,7 @@ if ($id > 0) { $form = new Form($db); print ''."\n"; } // foreach($objecto->attribute_label as $key=>$value){ diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 4171bbab2e1..58aab7a6234 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -153,7 +153,7 @@ if ($result) if (isset($objp->photo) && $objp->photo != '') { print ''."\n"; } else diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index 732afa2c331..2ea576f3492 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -66,7 +66,7 @@ print '

'."\n"; print "Test 4d: a select with ajax refresh and with onchange call of url
\n"; $selected=-1; -print $form->selectArrayAjax('testselectc', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, 'style="min-width: 250px;"', '', 0, 1, '', 1); +print Form::selectArrayAjax('testselectc', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, 'style="min-width: 250px;"', '', 0, 1, '', 1); print '

'."\n"; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index a74a2037b94..cb9704fa4e5 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -364,7 +364,7 @@ foreach ($dirsociete as $dirroot) print ''; print ''; @@ -437,7 +437,7 @@ foreach ($dirsociete as $dirroot) } print ''; print "\n"; } @@ -570,7 +570,7 @@ foreach ($dirsociete as $dirroot) $htmltooltip.='
'.$langs->trans("WatermarkOnDraft").': '.yn((! empty($module->option_draft_watermark)?$module->option_draft_watermark:''), 1, 1); print ''; // Preview @@ -710,7 +710,7 @@ print ''."\n"; // Utilisation formulaire Ajax sur choix societe $var=!$var; print ""; -print ''; +print ''; if (! $conf->use_javascript_ajax) { print ''; $var=!$var; print ""; -print ''; +print ''; if (! $conf->use_javascript_ajax) { print ''; @@ -1027,7 +1027,7 @@ else print ''; print '
URL Photo'; - print $form->showphoto('memberphoto', $object, 64); + print Form::showphoto('memberphoto', $object, 64); print '
'; - print $form->showphoto('memberphoto', $objp, 64); + print Form::showphoto('memberphoto', $objp, 64); print ''; $s=$modCodeTiers->getToolTip($langs,null,-1); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print '
'; $s=$modCodeCompta->getToolTip($langs,null,-1); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print '
'; - print $form->textwithpicto('',$htmltooltip,1,0); + print Form::textwithpicto('',$htmltooltip,1,0); print ' 
'.$form->textwithpicto($langs->trans("DelaiedFullListToSelectCompany"),$langs->trans('UseSearchToSelectCompanyTooltip'),1).' '.Form::textwithpicto($langs->trans("DelaiedFullListToSelectCompany"),$langs->trans('UseSearchToSelectCompanyTooltip'),1).' '; @@ -734,7 +734,7 @@ print '
'.$form->textwithpicto($langs->trans("DelaiedFullListToSelectContact"),$langs->trans('UseSearchToSelectContactTooltip'),1).''.Form::textwithpicto($langs->trans("DelaiedFullListToSelectContact"),$langs->trans('UseSearchToSelectContactTooltip'),1).''; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 782a7f070c4..30fe69d47b3 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -451,7 +451,7 @@ abstract class ActionsCardCommon if ((!$this->object->code_client || $this->object->code_client == -1) && $modCodeClient->code_auto) $this->tpl['customercode'] = $modCodeClient->getNextValue($this->object,0); $this->tpl['ismodifiable_customercode'] = $this->object->codeclient_modifiable(); $s=$modCodeClient->getToolTip($langs,$this->object,0); - $this->tpl['help_customercode'] = $form->textwithpicto('',$s,1); + $this->tpl['help_customercode'] = Form::textwithpicto('',$s,1); if (! empty($conf->fournisseur->enabled)) { @@ -480,7 +480,7 @@ abstract class ActionsCardCommon if ((!$this->object->code_fournisseur || $this->object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) $this->tpl['suppliercode'] = $modCodeFournisseur->getNextValue($this->object,1); $this->tpl['ismodifiable_suppliercode'] = $this->object->codefournisseur_modifiable(); $s=$modCodeFournisseur->getToolTip($langs,$this->object,1); - $this->tpl['help_suppliercode'] = $form->textwithpicto('',$s,1); + $this->tpl['help_suppliercode'] = Form::textwithpicto('',$s,1); $this->object->LoadSupplierCateg(); $this->tpl['suppliercategory'] = $this->object->SupplierCategories; @@ -556,7 +556,7 @@ abstract class ActionsCardCommon $this->tpl['address'] = dol_nl2br($this->object->address); $img=picto_from_langcode($this->object->country_code); - if ($this->object->isInEEC()) $this->tpl['country'] = $form->textwithpicto(($img?$img.' ':'').$this->object->country,$langs->trans("CountryIsInEEC"),1,0); + if ($this->object->isInEEC()) $this->tpl['country'] = Form::textwithpicto(($img?$img.' ':'').$this->object->country,$langs->trans("CountryIsInEEC"),1,0); $this->tpl['country'] = ($img?$img.' ':'').$this->object->country; $this->tpl['phone'] = dol_print_phone($this->object->phone,$this->object->country_code,0,$this->object->id,'AC_TEL'); diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index e5a88340f62..1f58f3cdc99 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -146,7 +146,7 @@ class ActionsCardCompany extends ActionsCardCommon if ($conf->use_javascript_ajax) { $s.=''.$langs->trans("VATIntraCheck").''; - $this->tpl['tva_intra'] = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); + $this->tpl['tva_intra'] = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else { @@ -185,7 +185,7 @@ class ActionsCardCompany extends ActionsCardCommon if ($conf->use_javascript_ajax) { $s.=''.$langs->trans("VATIntraCheck").''; - $this->tpl['tva_intra'] = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); + $this->tpl['tva_intra'] = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else { diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index e99f10bf5a5..9f7a53644ea 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -489,7 +489,7 @@ if ($sql_select) { if ($objp->fk_product > 0) { - echo $form->textwithtooltip($text,$description,3,'','',$i,0,''); + echo Form::textwithtooltip($text,$description,3,'','',$i,0,''); // Show range echo get_date_range($objp->date_start, $objp->date_end); @@ -509,7 +509,7 @@ if ($sql_select) if (! empty($objp->label)) { $text.= ' '.$objp->label.''; - echo $form->textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i,0,''); + echo Form::textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i,0,''); } else { echo $text.' '.dol_htmlentitiesbr($objp->description); } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 52bce8ae36c..61dd88c1aa0 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -550,7 +550,7 @@ if ($resql) } $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print ''; @@ -566,12 +566,12 @@ if ($resql) if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($langs->trans("ThirdPartyType"),$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); - if (! empty($arrayfields['s.siren']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$param,'class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['s.siret']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$param,'class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$param,'class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder); - if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['s.siren']['checked'])) print_liste_field_titre(Form::textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$param,'class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['s.siret']['checked'])) print_liste_field_titre(Form::textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$param,'class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titre(Form::textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$param,'class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre(Form::textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre(Form::textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre(Form::textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder); print_liste_field_titre(''); // type of customer if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index f9b924c9240..efa75b3c535 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -257,7 +257,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Price print '
'; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; if ($object->price_base_type == 'TTC') { print ''; @@ -269,7 +269,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Price minimum print '
'; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); if ($object->price_base_type == 'TTC') { print ''; } else { @@ -336,7 +336,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Price print '
'; $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; @@ -348,7 +348,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Price minimum print '
'; $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print Form::textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; if ($prodcustprice->price_base_type == 'TTC') { print ''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 22d3c6294e1..dc20ecba074 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -935,7 +935,7 @@ else $text.=' '; $text.= $langs->trans("Individual"); $htmltext=$langs->trans("ToCreateContactWithSameName"); - print $form->textwithpicto($text, $htmltext, 1, 'help', '', 0, 3); + print Form::textwithpicto($text, $htmltext, 1, 'help', '', 0, 3); print ''; print ''; print "
\n"; @@ -1009,7 +1009,7 @@ else print ''; print '
'; $s=$modCodeClient->getToolTip($langs,$object,0); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print '
'; print '
'; $s=$modCodeFournisseur->getToolTip($langs,$object,1); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print '
'; print '
'; $s=$modCodeClient->getToolTip($langs,$object,0); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print '
'; print ''; @@ -1583,7 +1583,7 @@ else } print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1); - print $form->textwithpicto('',$s,1); + print Form::textwithpicto('',$s,1); print ''; print ''; @@ -1698,7 +1698,7 @@ else print ''; print "\n"; $s.=''.$langs->trans("VATIntraCheck").''; - $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); + $s = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else { @@ -1860,7 +1860,7 @@ else print ''; print ''.fieldLabel('Logo','photoinput').''; print ''; - if ($object->logo) print $form->showphoto('societe',$object); + if ($object->logo) print Form::showphoto('societe',$object); $caneditfield=1; if ($caneditfield) { @@ -2044,7 +2044,7 @@ else print ''; print "\n"; $s.=''.$langs->trans("VATIntraCheck").''; - $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); + $s = Form::textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); } else { @@ -2227,7 +2227,7 @@ else print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); + print Form::textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); } else { diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 95ff6365dac..5d60a701779 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -174,7 +174,7 @@ print ""; print "".$langs->trans("Parameter").""; print "".$langs->trans("Name").""; print "".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)'; -print "".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).''; +print "".Form::textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).''; print ''.$langs->trans("Color").''; print ""; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index a027395a712..0b2ed1b5fa6 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -889,7 +889,7 @@ if (($action == 'create') || ($action == 'adduserldap')) // Type print ''.$langs->trans("Type").''; print ''; - print $form->textwithpicto($langs->trans("Internal"),$langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); + print Form::textwithpicto($langs->trans("Internal"),$langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); print ''; // Address @@ -1032,7 +1032,7 @@ if (($action == 'create') || ($action == 'adduserldap')) // THM print ''; $text=$langs->trans("THM"); - print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); + print Form::textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); print ''; print ''; print ''; @@ -1042,7 +1042,7 @@ if (($action == 'create') || ($action == 'adduserldap')) // TJM print ''; $text=$langs->trans("TJM"); - print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); + print Form::textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); print ''; print ''; print ''; @@ -1324,11 +1324,11 @@ else print ''.$langs->trans("Administrator").''; if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity) { - print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin"); + print Form::textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin"); } else if ($object->admin) { - print $form->textwithpicto(yn($object->admin),$langs->trans("AdministratorDesc"),1,"admin"); + print Form::textwithpicto(yn($object->admin),$langs->trans("AdministratorDesc"),1,"admin"); } else { @@ -1339,7 +1339,7 @@ else // Type print ''; $text=$langs->trans("Type"); - print $form->textwithpicto($text, $langs->trans("InternalExternalDesc")); + print Form::textwithpicto($text, $langs->trans("InternalExternalDesc")); print ''; $type=$langs->trans("Internal"); if ($object->societe_id > 0) $type=$langs->trans("External"); @@ -1379,7 +1379,7 @@ else // THM print ''; $text=$langs->trans("THM"); - print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); + print Form::textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); print ''; print ''; print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):''); @@ -1389,7 +1389,7 @@ else // TJM print ''; $text=$langs->trans("TJM"); - print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); + print Form::textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); print ''; print ''; print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):''); @@ -1806,7 +1806,7 @@ else // Photo print ''; - print $form->showphoto('userphoto',$object,100,0,$caneditfield,'photowithmargin','small'); + print Form::showphoto('userphoto',$object,100,0,$caneditfield,'photowithmargin','small'); print ''; print ''; @@ -1879,7 +1879,7 @@ else $text=''; if ($dolibarr_main_authentication && $dolibarr_main_authentication == 'http') { - $text=$form->textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,'warning'); + $text=Form::textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,'warning'); } } else @@ -1976,7 +1976,7 @@ else $yn = yn($object->admin); print ''; print ''; - if (! empty($conf->multicompany->enabled) && empty($object->entity)) print $form->textwithpicto($yn,$langs->trans("DontDowngradeSuperAdmin"),1,'warning'); + if (! empty($conf->multicompany->enabled) && empty($object->entity)) print Form::textwithpicto($yn,$langs->trans("DontDowngradeSuperAdmin"),1,'warning'); else print $yn; } print ''; @@ -1989,7 +1989,7 @@ else { $type=$langs->trans("Internal"); if ($object->societe_id) $type=$langs->trans("External"); - print $form->textwithpicto($type,$langs->trans("InternalExternalDesc")); + print Form::textwithpicto($type,$langs->trans("InternalExternalDesc")); if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; } else @@ -2160,7 +2160,7 @@ else // THM print ''; $text=$langs->trans("THM"); - print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); + print Form::textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); print ''; print ''; print ''; @@ -2170,7 +2170,7 @@ else // TJM print ''; $text=$langs->trans("TJM"); - print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm'); + print Form::textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm'); print ''; print ''; print ''; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index cb1e9f875aa..342b21490ec 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -121,7 +121,7 @@ if ($id > 0) } else { - print '     '.$form->textwithpicto($langs->trans("KeepEmptyToUseDefault").': '.$conf->global->CLICKTODIAL_URL,$langs->trans("ClickToDialUrlDesc")); + print '     '.Form::textwithpicto($langs->trans("KeepEmptyToUseDefault").': '.$conf->global->CLICKTODIAL_URL,$langs->trans("ClickToDialUrlDesc")); } print ''; print ''; @@ -162,7 +162,7 @@ if ($id > 0) } else { - print $form->textwithpicto((empty($object->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc")); + print Form::textwithpicto((empty($object->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc")); } print ''; print ''; diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index af46fd39d21..580700b69ec 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -101,7 +101,7 @@ if ($resql) $moreforfilter=''; //$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - //$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + //$selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print ''; print ''; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 87236d0e4f8..489799437bb 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -270,7 +270,7 @@ if ($result) $moreforfilter=''; $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields=Form::multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print '
'; print ''; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index fa54a128cac..2f1b0e2e437 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -374,7 +374,7 @@ if ($result) if ($caneditperms) { print ''; } print ''; $formconfirm.= ''; $formconfirm.= ''; $formconfirm.= ''; $formconfirm.= ''."\n"; @@ -5381,7 +5381,7 @@ class Form * @param int $useempty 1=Add empty line * @return mixed See option */ - function selectyesno($htmlname,$value='',$option=0,$disabled=false,$useempty='') + public static function selectyesno($htmlname,$value='',$option=0,$disabled=false,$useempty='') { global $langs; From 5bdc3b9a1eda932ab62c429e70bf12ee474ff0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 20 Mar 2016 14:02:38 +0100 Subject: [PATCH 10/17] NEW Converted Form::selectyesno, Form::showrefnav, Form::select_date, Form::showbarcode, Form::showfilterAndCheckAddButtons, Form::editfieldkey, Form::editfieldnav, Form::editInPlace, Form::selectMassActions to static functions --- htdocs/core/class/html.form.class.php | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c589e01d561..73efb5bcdd9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -64,7 +64,7 @@ class Form * * @param DoliDB $db Database handler */ - public function __construct($db) + public function __construct(DoliDB $db) { $this->db = $db; } @@ -81,7 +81,7 @@ class Form * @param string $moreparam More param to add on a href URL * @return string HTML edit field */ - function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='') + public static function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='') { global $conf,$langs; @@ -129,7 +129,7 @@ class Form * @param string $moreparam More param to add on a href URL * @return string HTML edit field */ - function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='') + public static function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='') { global $conf,$langs,$db; @@ -141,7 +141,7 @@ class Form // When option to edit inline is activated if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;|datehourpicker/',$typeofdata)) // TODO add jquery timepicker { - $ret.=$this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg); + $ret.= self::editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg); } else { @@ -171,11 +171,11 @@ class Form } else if ($typeofdata == 'day' || $typeofdata == 'datepicker') { - $ret.=$this->select_date($value,$htmlname,0,0,1,'form'.$htmlname,1,0,1); + $ret.=self::select_date($value,$htmlname,0,0,1,'form'.$htmlname,1,0,1); } else if ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { - $ret.=$this->select_date($value,$htmlname,1,1,1,'form'.$htmlname,1,0,1); + $ret.=self::select_date($value,$htmlname,1,1,1,'form'.$htmlname,1,0,1); } else if (preg_match('/^select;/',$typeofdata)) { @@ -253,7 +253,7 @@ class Form * @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') * @return string HTML edit in place */ - private function editInPlace($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null) + private static function editInPlace($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null) { global $conf; @@ -486,10 +486,10 @@ class Form * Generate select HTML to choose massaction * * @param string $selected Selected value - * @param int $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. + * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. * @return string Select list */ - function selectMassAction($selected, $arrayofaction) + public static function selectMassAction($selected, array $arrayofaction) { global $conf,$langs,$hookmanager; @@ -3285,7 +3285,7 @@ class Form { $more.=''; $more.=''."\n"; $formquestion[] = array('name'=>$input['name'].'day'); $formquestion[] = array('name'=>$input['name'].'month'); @@ -3637,7 +3637,7 @@ class Form * @return void * @see select_date */ - function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) + public static function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) { global $langs; @@ -3650,7 +3650,7 @@ class Form $ret.=''; $ret.='
'; - print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup")); + print Form::textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup")); print ''; From ff6b187ef327ed03458611fb161658452aef738a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 20 Mar 2016 13:44:48 +0100 Subject: [PATCH 08/17] NEW Converted Form::showLinkedObjectBlock to a static function --- dev/skeletons/skeleton_card.php | 2 +- htdocs/comm/propal.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/compta/facture.php | 2 +- htdocs/compta/facture/fiche-rec.php | 2 +- htdocs/contrat/card.php | 2 +- htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/core/class/html.form.class.php | 2 +- htdocs/expedition/card.php | 2 +- htdocs/expensereport/card.php | 2 +- htdocs/fichinter/card.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/livraison/card.php | 2 +- htdocs/supplier_proposal/card.php | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php index 03f70955527..d6dc0cf58c1 100644 --- a/dev/skeletons/skeleton_card.php +++ b/dev/skeletons/skeleton_card.php @@ -322,7 +322,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete')) // Example 2 : Adding links to objects - //$somethingshown=$form->showLinkedObjectBlock($object); + //$somethingshown=Form::showLinkedObjectBlock($object); //$linktoelem = $form->showLinkToObjectBlock($object); //if ($linktoelem) print '
'.$linktoelem; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 3c330576f04..7ff42a737b4 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2350,7 +2350,7 @@ if ($action == 'create') $somethingshown = $formfile->show_documents('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 78de2c70fa7..37fdf8aa7a4 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2584,7 +2584,7 @@ if ($action == 'create' && $user->rights->commande->creer) $somethingshown = $formfile->show_documents('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements //$linktoelem = $form->showLinkToObjectBlock($object); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 5a00c796038..b70caf8b667 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -4046,7 +4046,7 @@ else if ($id > 0 || ! empty($ref)) $somethingshown = $formfile->numoffiles; // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object,array('order')); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 76a991dfdd1..e44c9e96fb4 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -983,7 +983,7 @@ else print ''; // ancre // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); print ''; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 427e0962b6d..2b5b3961066 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2015,7 +2015,7 @@ else $somethingshown = $formfile->show_documents('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a65573a7947..d44230d3eb6 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3115,13 +3115,13 @@ abstract class CommonObject * Show linked object block. * * @return int <0 if KO, >0 if OK - * @deprecated 3.8 Use instead $form->showLinkedObjectBlock($object) + * @deprecated 3.8 Use instead Form::showLinkedObjectBlock($object) * @see Form::showLinkedObjectBlock */ function showLinkedObjectBlock() { global $form; - return $form->showLinkedObjectBlock($this); + return Form::showLinkedObjectBlock($this); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index acbe2391816..4ce4d393355 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5077,7 +5077,7 @@ class Form * @param CommonObject $object Object we want to show links to * @return int <0 if KO, >0 if OK */ - function showLinkedObjectBlock(CommonObject $object) + public static function showLinkedObjectBlock(CommonObject $object) { global $conf,$langs,$hookmanager; global $bc; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 8108c0e33cd..6b75f1c5142 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1802,7 +1802,7 @@ else if ($id || $ref) $somethingshown=$formfile->show_documents('expedition',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements //$linktoelem = $form->showLinkToObjectBlock($object); diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index a31462cd977..285bed70386 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2107,7 +2107,7 @@ if ($action != 'create' && $action != 'edit' && ($id || $ref)) $result = $object->add_object_linked('fichinter', GETPOST('LinkedFichinter')); } // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements $linktoelements=array(); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 19dfd0f3fc2..4a55cad6d19 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1783,7 +1783,7 @@ else if ($id > 0 || ! empty($ref)) $somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements //$linktoelem = $form->showLinkToObjectBlock($object); diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index aadbc7f663f..95c2afe2c91 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2954,7 +2954,7 @@ elseif (! empty($object->id)) $somethingshown=$formfile->numoffiles; // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements //$linktoelem = $form->showLinkToObjectBlock($object); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f76c411b0f2..65dacd0bcb0 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2371,7 +2371,7 @@ else $somethingshown=$formfile->numoffiles; // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object,array('supplier_order')); diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 34566a70e0b..410ade379fc 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -887,7 +887,7 @@ else $shipment->fetch($object->origin_id); // Linked object block - $somethingshown = $form->showLinkedObjectBlock($shipment); + $somethingshown = Form::showLinkedObjectBlock($shipment); // Show links to link elements //$linktoelem = $form->showLinkToObjectBlock($shipment); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index b8eca021271..5dd6c7eb2b6 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1832,7 +1832,7 @@ if ($action == 'create') $somethingshown = $formfile->show_documents('supplier_proposal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); + $somethingshown = Form::showLinkedObjectBlock($object); // Show links to link elements //$linktoelem = $form->showLinkToObjectBlock($object); From 5a9e686bf9dce6b09dd6b9501f5b06bd92b30ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 20 Mar 2016 13:46:42 +0100 Subject: [PATCH 09/17] NEW Converted Form::selectyesno to a static function --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4ce4d393355..c589e01d561 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3441,7 +3441,7 @@ class Form $formconfirm.= '
'.$question.''; - $formconfirm.= $this->selectyesno("confirm",$newselectedchoice); + $formconfirm.= self::selectyesno("confirm",$newselectedchoice); $formconfirm.= '
'.$input['label'].''; - $more.=$this->select_date($input['value'],$input['name'],0,0,0,'',1,0,1); + $more.=self::select_date($input['value'],$input['name'],0,0,0,'',1,0,1); $more.='
'; $ret.=''; $ret.=''; $ret.='
'; - $ret.=$this->select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1); + $ret.=self::select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname,1,0,1); $ret.='
'; @@ -4277,7 +4277,7 @@ class Form * @return mixed Nothing or string if nooutput is 1 * @see form_date */ - function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') + public static function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') { global $conf,$langs; @@ -5479,7 +5479,7 @@ class Form * @param string $morehtmlright More html code to show before navigation arrows * @return string Portion HTML avec ref + boutons nav */ - function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='') + public static function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='') { global $langs,$conf; @@ -5545,11 +5545,11 @@ class Form /** * Return HTML code to output a barcode * - * @param Object $object Object containing data to retrieve file name + * @param object $object Object containing data to retrieve file name * @param int $width Width of photo * @return string HTML code to output barcode */ - function showbarcode(&$object,$width=100) + public static function showbarcode($object, $width = 100) { global $conf; @@ -5824,7 +5824,7 @@ class Form * @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes * @return string */ - function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0) + public static function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0) { global $conf, $langs; From a0926abd13d474b69db3c8772a2728e3c64bd88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 20 Mar 2016 14:04:58 +0100 Subject: [PATCH 11/17] NEW Converted Form::formconfirm function to a static function and removed deprecated function Form::form_confirm --- htdocs/core/class/html.form.class.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 73efb5bcdd9..86fab11b662 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3158,27 +3158,6 @@ class Form return $output; } - /** - * Show a confirmation HTML form or AJAX popup - * - * @param string $page Url of page to call if confirmation is OK - * @param string $title Title - * @param string $question Question - * @param string $action Action - * @param array $formquestion An array with forms complementary inputs - * @param string $selectedchoice "" or "no" or "yes" - * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx - * @param int $height Force height of box - * @param int $width Force width of box - * @return void - * @deprecated - * @see formconfirm() - */ - function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) - { - print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width); - } - /** * Show a confirmation HTML form or AJAX popup. * Easiest way to use this is with useajax=1. @@ -3201,7 +3180,7 @@ class Form * @param int $width Force width of bow * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form */ - function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) + public static function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) { global $langs,$conf; global $useglobalvars; From 5a046125db95729b5dd8d5f227c2e23dce4e4394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 20 Mar 2016 14:09:10 +0100 Subject: [PATCH 12/17] Missing changes from previous commits --- dev/skeletons/skeleton_card.php | 2 +- dev/skeletons/skeleton_list.php | 2 +- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 22 +++++----- htdocs/accountancy/bookkeeping/balance.php | 4 +- htdocs/accountancy/bookkeeping/card.php | 4 +- htdocs/accountancy/bookkeeping/list.php | 8 ++-- htdocs/accountancy/bookkeeping/listbyyear.php | 6 +-- htdocs/accountancy/journal/bankjournal.php | 2 +- .../accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- htdocs/accountancy/supplier/lines.php | 2 +- htdocs/adherents/admin/adherent.php | 6 +-- htdocs/adherents/admin/public.php | 6 +-- .../actions_adherentcard_common.class.php | 4 +- .../actions_adherentcard_default.class.php | 2 +- htdocs/adherents/card.php | 24 +++++----- htdocs/adherents/card_subscriptions.php | 8 ++-- htdocs/adherents/cotisations.php | 2 +- htdocs/adherents/fiche_subscription.php | 10 ++--- htdocs/adherents/list.php | 2 +- htdocs/adherents/type.php | 10 ++--- htdocs/admin/boxes.php | 2 +- htdocs/admin/clicktodial.php | 2 +- htdocs/admin/delais.php | 2 +- htdocs/admin/dict.php | 4 +- htdocs/admin/facture.php | 4 +- htdocs/admin/ihm.php | 18 ++++---- htdocs/admin/mails.php | 6 +-- htdocs/admin/menus/index.php | 2 +- htdocs/admin/multicurrency.php | 6 +-- htdocs/admin/pdf.php | 20 ++++----- htdocs/admin/propal.php | 2 +- htdocs/admin/proxy.php | 2 +- htdocs/admin/sms.php | 2 +- htdocs/admin/stock.php | 24 +++++----- htdocs/admin/tools/listevents.php | 4 +- htdocs/admin/tools/listsessions.php | 4 +- htdocs/admin/tools/purge.php | 2 +- htdocs/admin/websites.php | 2 +- htdocs/cashdesk/admin/cashdesk.php | 6 +-- htdocs/cashdesk/tpl/facturation1.tpl.php | 2 +- htdocs/categories/categorie.php | 8 ++-- htdocs/categories/photos.php | 2 +- htdocs/categories/viewcat.php | 2 +- htdocs/comm/action/card.php | 32 +++++++------- htdocs/comm/action/document.php | 2 +- htdocs/comm/action/listactions.php | 6 +-- htdocs/comm/action/pertype.php | 2 +- htdocs/comm/action/peruser.php | 2 +- htdocs/comm/address.php | 2 +- htdocs/comm/card.php | 8 ++-- htdocs/comm/mailing/card.php | 24 +++++----- htdocs/comm/mailing/cibles.php | 2 +- htdocs/comm/propal.php | 26 +++++------ htdocs/comm/propal/apercu.php | 2 +- htdocs/comm/propal/contact.php | 2 +- htdocs/comm/propal/document.php | 2 +- htdocs/comm/propal/note.php | 2 +- htdocs/comm/remx.php | 4 +- htdocs/commande/apercu.php | 2 +- htdocs/commande/card.php | 24 +++++----- htdocs/commande/contact.php | 2 +- htdocs/commande/document.php | 2 +- htdocs/commande/list.php | 4 +- htdocs/commande/note.php | 2 +- htdocs/commande/orderstoinvoice.php | 6 +-- htdocs/compta/bank/account.php | 12 ++--- htdocs/compta/bank/annuel.php | 2 +- htdocs/compta/bank/card.php | 6 +-- htdocs/compta/bank/document.php | 4 +- htdocs/compta/bank/graph.php | 2 +- htdocs/compta/bank/ligne.php | 8 ++-- htdocs/compta/bank/releve.php | 2 +- htdocs/compta/bank/search.php | 6 +-- htdocs/compta/bank/treso.php | 2 +- htdocs/compta/bank/virement.php | 2 +- htdocs/compta/deplacement/card.php | 20 ++++----- htdocs/compta/deplacement/document.php | 2 +- htdocs/compta/deplacement/list.php | 2 +- htdocs/compta/facture.php | 32 +++++++------- htdocs/compta/facture/apercu.php | 2 +- htdocs/compta/facture/contact.php | 2 +- htdocs/compta/facture/document.php | 2 +- htdocs/compta/facture/fiche-rec.php | 20 ++++----- htdocs/compta/facture/list.php | 4 +- htdocs/compta/facture/note.php | 2 +- htdocs/compta/facture/prelevement.php | 6 +-- htdocs/compta/journal/purchasesjournal.php | 2 +- htdocs/compta/journal/sellsjournal.php | 2 +- htdocs/compta/localtax/card.php | 4 +- htdocs/compta/localtax/clients.php | 4 +- htdocs/compta/localtax/quadri_detail.php | 4 +- htdocs/compta/paiement.php | 4 +- htdocs/compta/paiement/card.php | 18 ++++---- htdocs/compta/paiement/cheque/card.php | 12 ++--- htdocs/compta/paiement/cheque/list.php | 2 +- htdocs/compta/paiement/list.php | 2 +- htdocs/compta/paiement_charge.php | 2 +- htdocs/compta/payment_sc/card.php | 6 +-- htdocs/compta/prelevement/card.php | 6 +-- htdocs/compta/prelevement/ligne.php | 4 +- htdocs/compta/prelevement/list.php | 2 +- htdocs/compta/resultat/clientfourn.php | 6 +-- htdocs/compta/salaries/card.php | 10 ++--- htdocs/compta/salaries/document.php | 2 +- htdocs/compta/salaries/index.php | 2 +- htdocs/compta/sociales/charges.php | 16 +++---- htdocs/compta/sociales/document.php | 6 +-- htdocs/compta/sociales/index.php | 2 +- htdocs/compta/stats/cabyprodserv.php | 4 +- htdocs/compta/stats/cabyuser.php | 4 +- htdocs/compta/stats/casoc.php | 4 +- htdocs/compta/tva/card.php | 4 +- htdocs/compta/tva/clients.php | 4 +- htdocs/compta/tva/quadri_detail.php | 4 +- htdocs/compta/tva/quarter_report.php | 4 +- htdocs/compta/tva/reglement.php | 2 +- .../actions_contactcard_common.class.php | 4 +- .../actions_contactcard_default.class.php | 2 +- htdocs/contact/card.php | 12 ++--- htdocs/contact/perso.php | 2 +- htdocs/contrat/card.php | 44 +++++++++---------- htdocs/contrat/contact.php | 2 +- htdocs/contrat/document.php | 2 +- htdocs/contrat/list.php | 2 +- htdocs/contrat/note.php | 2 +- htdocs/contrat/services.php | 6 +-- htdocs/core/ajax/ajaxdirpreview.php | 2 +- htdocs/core/class/extrafields.class.php | 2 +- htdocs/core/class/html.form.class.php | 1 + htdocs/core/class/html.formmail.class.php | 2 +- htdocs/core/lib/admin.lib.php | 2 +- htdocs/core/lib/functions.lib.php | 4 +- htdocs/core/lib/project.lib.php | 2 +- .../core/modules/mailings/fraise.modules.php | 4 +- .../tpl/document_actions_post_headers.tpl.php | 2 +- htdocs/core/tpl/notes.tpl.php | 8 ++-- htdocs/core/tpl/objectline_create.tpl.php | 8 ++-- htdocs/core/tpl/objectline_edit.tpl.php | 4 +- htdocs/core/tpl/resource_add.tpl.php | 4 +- htdocs/core/tpl/resource_view.tpl.php | 4 +- htdocs/cron/card.php | 18 ++++---- htdocs/cron/list.php | 4 +- htdocs/don/card.php | 12 ++--- htdocs/don/document.php | 2 +- htdocs/don/list.php | 2 +- htdocs/don/payment/card.php | 6 +-- htdocs/don/payment/payment.php | 2 +- htdocs/ecm/docdir.php | 2 +- htdocs/ecm/docfile.php | 2 +- htdocs/ecm/docmine.php | 4 +- htdocs/ecm/docother.php | 2 +- htdocs/ecm/index.php | 6 +-- htdocs/ecm/index_auto.php | 4 +- htdocs/expedition/card.php | 28 ++++++------ htdocs/expedition/contact.php | 2 +- htdocs/expedition/list.php | 2 +- htdocs/expedition/note.php | 2 +- htdocs/expedition/shipment.php | 6 +-- htdocs/expensereport/card.php | 34 +++++++------- htdocs/expensereport/document.php | 2 +- htdocs/expensereport/list.php | 2 +- htdocs/expensereport/payment/card.php | 6 +-- htdocs/expensereport/payment/payment.php | 2 +- htdocs/expensereport/synchro_compta.php | 4 +- htdocs/exports/export.php | 2 +- htdocs/fichinter/apercu.php | 2 +- htdocs/fichinter/card.php | 18 ++++---- htdocs/fichinter/contact.php | 2 +- htdocs/fichinter/document.php | 2 +- htdocs/fichinter/list.php | 2 +- htdocs/fichinter/note.php | 2 +- htdocs/fourn/card.php | 4 +- htdocs/fourn/commande/card.php | 34 +++++++------- htdocs/fourn/commande/contact.php | 2 +- htdocs/fourn/commande/dispatch.php | 6 +-- htdocs/fourn/commande/document.php | 2 +- htdocs/fourn/commande/history.php | 2 +- htdocs/fourn/commande/list.php | 4 +- htdocs/fourn/commande/note.php | 2 +- htdocs/fourn/commande/orderstoinvoice.php | 6 +-- htdocs/fourn/facture/card.php | 32 +++++++------- htdocs/fourn/facture/contact.php | 6 +-- htdocs/fourn/facture/document.php | 8 ++-- htdocs/fourn/facture/impayees.php | 2 +- htdocs/fourn/facture/list.php | 2 +- htdocs/fourn/facture/note.php | 6 +-- htdocs/fourn/facture/paiement.php | 6 +-- htdocs/fourn/paiement/card.php | 18 ++++---- htdocs/ftp/admin/ftpclient.php | 4 +- htdocs/ftp/index.php | 4 +- htdocs/holiday/card.php | 24 +++++----- htdocs/holiday/document.php | 6 +-- htdocs/holiday/list.php | 2 +- htdocs/hrm/establishment/card.php | 2 +- htdocs/imports/import.php | 2 +- htdocs/livraison/card.php | 10 ++--- htdocs/loan/card.php | 14 +++--- htdocs/loan/document.php | 6 +-- htdocs/loan/note.php | 2 +- htdocs/loan/payment/card.php | 6 +-- htdocs/loan/payment/payment.php | 2 +- htdocs/margin/agentMargins.php | 4 +- htdocs/margin/checkMargins.php | 4 +- htdocs/margin/customerMargins.php | 4 +- htdocs/margin/productMargins.php | 4 +- htdocs/opensurvey/card.php | 6 +-- htdocs/opensurvey/list.php | 2 +- htdocs/opensurvey/results.php | 4 +- htdocs/opensurvey/wizard/create_survey.php | 2 +- htdocs/paypal/admin/paypal.php | 8 ++-- htdocs/product/admin/product.php | 10 ++--- .../product/actions_card_product.class.php | 10 ++--- .../product/canvas/product/tpl/list.tpl.php | 2 +- .../service/actions_card_service.class.php | 10 ++--- .../product/canvas/service/tpl/list.tpl.php | 2 +- htdocs/product/card.php | 8 ++-- htdocs/product/composition/card.php | 2 +- htdocs/product/fournisseurs.php | 4 +- htdocs/product/list.php | 4 +- htdocs/product/price.php | 2 +- htdocs/product/reassort.php | 2 +- htdocs/product/reassortlot.php | 2 +- htdocs/product/stock/card.php | 4 +- htdocs/product/stock/fiche-valo.php | 2 +- htdocs/product/stock/list.php | 2 +- htdocs/product/stock/mouvement.php | 2 +- htdocs/product/stock/product.php | 12 ++--- htdocs/product/stock/replenish.php | 2 +- htdocs/product/stock/replenishorders.php | 2 +- .../product/stock/tpl/stockcorrection.tpl.php | 4 +- .../product/stock/tpl/stocktransfer.tpl.php | 4 +- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/activity/perweek.php | 2 +- htdocs/projet/admin/project.php | 4 +- htdocs/projet/card.php | 20 ++++----- htdocs/projet/contact.php | 2 +- htdocs/projet/document.php | 2 +- htdocs/projet/element.php | 6 +-- htdocs/projet/ganttview.php | 2 +- htdocs/projet/list.php | 2 +- htdocs/projet/note.php | 2 +- htdocs/projet/tasks.php | 6 +-- htdocs/projet/tasks/contact.php | 4 +- htdocs/projet/tasks/document.php | 4 +- htdocs/projet/tasks/list.php | 2 +- htdocs/projet/tasks/note.php | 4 +- htdocs/projet/tasks/task.php | 10 ++--- htdocs/projet/tasks/time.php | 10 ++--- htdocs/public/members/new.php | 2 +- htdocs/public/test/test_arrays.php | 2 +- htdocs/public/test/test_forms.php | 6 +-- htdocs/resource/card.php | 4 +- htdocs/resource/element_resource.php | 4 +- htdocs/resource/list.php | 2 +- .../canvas/actions_card_common.class.php | 14 +++--- .../company/actions_card_company.class.php | 2 +- .../actions_card_individual.class.php | 2 +- htdocs/societe/consumption.php | 2 +- htdocs/societe/list.php | 2 +- htdocs/societe/price.php | 2 +- htdocs/societe/rib.php | 2 +- htdocs/societe/soc.php | 30 ++++++------- htdocs/supplier_proposal/card.php | 18 ++++---- htdocs/supplier_proposal/document.php | 2 +- htdocs/supplier_proposal/note.php | 2 +- htdocs/user/card.php | 18 ++++---- htdocs/user/group/card.php | 4 +- htdocs/user/group/ldap.php | 2 +- htdocs/user/group/perms.php | 2 +- htdocs/user/hierarchy.php | 2 +- htdocs/user/index.php | 4 +- .../accountancy/export-thirdpartyaccount.php | 2 +- 274 files changed, 797 insertions(+), 796 deletions(-) diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php index d6dc0cf58c1..ac7e7169fd1 100644 --- a/dev/skeletons/skeleton_card.php +++ b/dev/skeletons/skeleton_card.php @@ -288,7 +288,7 @@ if ($id && (empty($action) || $action == 'view' || $action == 'delete')) dol_fiche_head(); if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); print $formconfirm; } diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 5da8aa6c55a..48a0cc7bd2c 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -370,7 +370,7 @@ if ($resql) }*/ // Action column print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print ''."\n"; diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 3f251e0090b..9e16c81dcd5 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -62,7 +62,7 @@ if (! $sortorder) $sortorder = "ASC"; if ($action == 'delete') { - $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); print $formconfirm; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 25e49c76745..5a875cbba2a 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -162,12 +162,12 @@ if ($action == 'create') { // Date start print '' . $langs->trans("DateStart") . ''; - print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear'); + print Form::select_date(($date_start ? $date_start : ''), 'fiscalyear'); print ''; // Date end print '' . $langs->trans("DateEnd") . ''; - print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); + print Form::select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); print ''; // Statut @@ -216,12 +216,12 @@ if ($action == 'create') { // Date start print '' . $langs->trans("DateStart") . ''; - print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); + print Form::select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); print ''; // Date end print '' . $langs->trans("DateEnd") . ''; - print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); + print Form::select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); print ''; // Statut @@ -245,7 +245,7 @@ if ($action == 'create') { * Confirm delete */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); } dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); @@ -263,23 +263,23 @@ if ($action == 'create') { // Label print ''; - print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print Form::editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print ''; - print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print Form::editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print ""; // Date start print ''; - print $form->editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; - print $form->editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; // Date end print ''; - print $form->editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; - print $form->editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print Form::editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); print ''; // Statut diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 3e4b69d6624..3de3e9849e9 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -161,9 +161,9 @@ else { print '
'; print $langs->trans('DateStart') . ': '; - print $form->select_date($search_date_start, 'date_start', 0, 0, 1); + print Form::select_date($search_date_start, 'date_start', 0, 0, 1); print $langs->trans('DateEnd') . ': '; - print $form->select_date($search_date_end, 'date_end', 0, 0, 1); + print Form::select_date($search_date_end, 'date_end', 0, 0, 1); print '
'; print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index e49c5536979..3629a8453df 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -203,7 +203,7 @@ $formventilation = new FormVentilation($db); * Confirmation to delete the command */ if ($action == 'delete') { - $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); print $formconfirm; } @@ -248,7 +248,7 @@ if ($action == 'create') { print ''; print ''; print ''; print ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b507c4dfffa..01e14273461 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -340,7 +340,7 @@ else { } if ($action == 'delmouv') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); print $formconfirm; } if ($action == 'delbookkeepingyear') { @@ -361,7 +361,7 @@ else { 'default' => $delyear ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1); print $formconfirm; } @@ -394,10 +394,10 @@ else { print ''; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 564cc4edaf5..cc91fe6cad9 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -134,7 +134,7 @@ print ''; print ''; print ''; print '\n"; @@ -147,7 +147,7 @@ print ''; print ''; print ''; print '\n"; @@ -160,7 +160,7 @@ print ''; print ''; print ''; print '\n"; diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index c55469459a9..a6419883b53 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -149,7 +149,7 @@ print ''; print '\n"; // Type @@ -158,7 +158,7 @@ print ''; print '\n"; */ // Amount @@ -176,7 +176,7 @@ print ''; print '\n"; if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index fd1bc79926e..f76caaec033 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -338,7 +338,7 @@ abstract class ActionsAdherentCardCommon if ($action == 'view' || $action == 'delete') { - $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id'); + $this->tpl['showrefnav'] = Form::showrefnav($this->object,'id'); if ($this->object->socid > 0) { @@ -385,7 +385,7 @@ abstract class ActionsAdherentCardCommon array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); - $this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); + $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateAdherent"),"confirm_create_user",$formquestion,'no'); } } diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 7e0b1291998..702438a9f68 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -108,7 +108,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon // Confirm delete contact if ($action == 'delete' && $user->rights->adherent->supprimer) { - $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); + $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteAdherent"),$langs->trans("ConfirmDeleteAdherent"),"confirm_delete",'',0,1); } } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 9ce04013fbe..a926d96b2fe 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -900,12 +900,12 @@ else // Birthday print "\n"; // Public profil print "\n"; // Categories @@ -1154,12 +1154,12 @@ else // Birthday print "\n"; // Public profil print "\n"; // Categories @@ -1278,7 +1278,7 @@ else if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); } // Confirm create third party @@ -1297,7 +1297,7 @@ else // Create a form array $formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } // Confirm validate member @@ -1333,13 +1333,13 @@ else if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); } - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1,1); } // Confirm send card by mail if ($action == 'sendinfo') { - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); } // Confirm terminate @@ -1370,7 +1370,7 @@ else $formquestion=array(); if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false')); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion,'no',1); } // Confirm remove member @@ -1378,7 +1378,7 @@ else { $formquestion=array(); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); + print Form::formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); } /* @@ -1386,7 +1386,7 @@ else */ if ($action == 'add_spip') { - print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); + print Form::formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } /* @@ -1394,7 +1394,7 @@ else */ if ($action == 'del_spip') { - print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); + print Form::formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); } $rowspan=17; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 9563f29d51f..2e39e43bc66 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -929,7 +929,7 @@ if ($rowid > 0) // Create a form array $formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } @@ -974,7 +974,7 @@ if ($rowid > 0) $datefrom=$object->datevalid; } } - print $form->select_date($datefrom,'','','','',"cotisation",1,1,1); + print Form::select_date($datefrom,'','','','',"cotisation",1,1,1); print ""; // Date end subscription @@ -987,7 +987,7 @@ if ($rowid > 0) $dateto=-1; // By default, no date is suggested } print '"; if ($adht->cotisation) @@ -1088,7 +1088,7 @@ if ($rowid > 0) // Date of payment print '\n"; print ''; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index 6b980a4df1c..4fbf65d6128 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -196,7 +196,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Ref print ''; print ''; // Member @@ -207,13 +207,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') // Date start subscription print ''; print ''; // Date end subscription print ''; print ''; @@ -295,7 +295,7 @@ if ($rowid && $action != 'edit') //$formquestion['text']=''.$langs->trans("ThisWillAlsoDeleteBankRecord").''; $text=$langs->trans("ConfirmDeleteSubscription"); if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='
'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord"); - print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1); } print ''; @@ -307,7 +307,7 @@ if ($rowid && $action != 'edit') // Ref print ''; print ''; // Member diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 403cc3971f3..b6c07676bad 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -287,7 +287,7 @@ if ($resql) // Action column print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index f46b6d0268c..a8c59995bf4 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -236,11 +236,11 @@ if ($action == 'create') print ''; print ''; print ''; print ''; print ''; // Label @@ -634,11 +634,11 @@ if ($rowid > 0) print ''; print ''; print ''; print ''; if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { $var=!$var; print ''; print ''; } diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index a77fb706a71..1bba473b374 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -83,7 +83,7 @@ print "\n"; $var=!$var; print ''; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 14332ceee63..984480a3cef 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -184,7 +184,7 @@ if ($action == 'edit') $var=false; print ''; - print ''; + print ''; print '
' . $langs->trans("Docdate") . ''; - print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); + print Form::select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); print '
'; print $langs->trans('From') . ': '; - print $form->select_date($search_date_start, 'date_start', 0, 0, 1); + print Form::select_date($search_date_start, 'date_start', 0, 0, 1); print '
'; print $langs->trans('To') . ': '; - print $form->select_date($search_date_end, 'date_end', 0, 0, 1); + print Form::select_date($search_date_end, 'date_end', 0, 0, 1); print '
'; diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index 10640c1887a..7e2aec72f1e 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -176,9 +176,9 @@ print_barre_liste($langs->trans("Bookkeeping") . ' ' . dol_print_date($search_da print '
'; print '
'; print $langs->trans('DateStart') . ': '; -print $form->select_date($search_date_start, 'date_start'); +print Form::select_date($search_date_start, 'date_start'); print $langs->trans('DateEnd') . ': '; -print $form->select_date($search_date_end, 'date_end'); +print Form::select_date($search_date_end, 'date_end'); print '
'; print '
'; print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': '; @@ -220,7 +220,7 @@ print ''; -print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1); +print Form::select_date($search_doc_date, 'doc_date', 0, 0, 1); print '
'; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index f995b2684ee..aec871ac33f 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -541,7 +541,7 @@ else { $nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1); $builddate = time(); $description = $langs->trans("DescFinanceJournal") . '
'; - $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $varlink = 'id_account=' . $id_bank_account; report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 82811598188..f9c7f54308b 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -403,7 +403,7 @@ if ($action == 'export_csv') { $description .= $langs->trans("DepositsAreIncluded"); } - $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 670875ec52b..f70a7b261a0 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -418,7 +418,7 @@ if ($action == 'export_csv') { $description .= $langs->trans("DepositsAreNotIncluded"); else $description .= $langs->trans("DepositsAreIncluded"); - $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); + $period = Form::select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . Form::select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( 'action' => '' )); diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index ade361fdd51..5ced4aa5f84 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -221,7 +221,7 @@ if ($result) { print '
 '; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("AdherentLoginRequired").''; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1); print ''; print ''; print "
'.$langs->trans("AdherentMailRequired").''; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1); print ''; print ''; print "
'.$langs->trans("MemberSendInformationByMailByDefault").''; -print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); +print Form::selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1); print ''; print ''; print "
'; print $langs->trans("EnablePublicSubscriptionForm"); print ''; -print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); +print Form::selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1); print "
'; print $langs->trans("EnablePublicSubscriptionForm"); print ''; -print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); +print Form::selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); print "
'; print $langs->trans("CanEditAmount"); print ''; -print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); +print Form::selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1); print "
".$langs->trans("Birthday")."\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + Form::select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "
".$langs->trans("Public")."\n"; - print $form->selectyesno("public",$object->public,1); + print Form::selectyesno("public",$object->public,1); print "
".$langs->trans("Birthday")."\n"; - $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); + Form::select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "
".$langs->trans("Public")."\n"; - print $form->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); + print Form::selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$object->public),1); print "
'.$langs->trans("DateEndSubscription").''; - print $form->select_date($dateto,'end','','','',"cotisation",1,0,1); + print Form::select_date($dateto,'end','','','',"cotisation",1,0,1); print "
'.$langs->trans("DatePayment").''; - print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); + print Form::select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); print "
'.$langs->trans('Numero'); diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 301664fab83..5f319652182 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -200,7 +200,7 @@ if ($result) // Action column print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("Ref").''; - print $form->showrefnav($subscription, 'rowid', $linkback, 1); + print Form::showrefnav($subscription, 'rowid', $linkback, 1); print '
'.$langs->trans("DateSubscription").''; - $form->select_date($subscription->dateh,'datesub',1,1,0,'update',1); + Form::select_date($subscription->dateh,'datesub',1,1,0,'update',1); print '
'.$langs->trans("DateEndSubscription").''; - $form->select_date($subscription->datef,'datesubend',0,0,0,'update',1); + Form::select_date($subscription->datef,'datesubend',0,0,0,'update',1); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($subscription, 'rowid', $linkback, 1); + print Form::showrefnav($subscription, 'rowid', $linkback, 1); print '
'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; - print $form->selectyesno("cotisation",1,1); + print Form::selectyesno("cotisation",1,1); print '
'.$langs->trans("VoteAllowed").''; - print $form->selectyesno("vote",0,1); + print Form::selectyesno("vote",0,1); print '
'.$langs->trans("Description").''; @@ -297,7 +297,7 @@ if ($rowid > 0) // Ref print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'rowid', $linkback); + print Form::showrefnav($object, 'rowid', $linkback); print '
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; - print $form->selectyesno("cotisation",$object->cotisation,1); + print Form::selectyesno("cotisation",$object->cotisation,1); print '
'.$langs->trans("VoteAllowed").''; - print $form->selectyesno("vote",$object->vote,1); + print Form::selectyesno("vote",$object->vote,1); print '
'.$langs->trans("Description").''; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 71de81958b9..0d5fd409b49 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -472,7 +472,7 @@ print '
'.$langs->trans("EnableFileCache").''; - print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); + print Form::selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); print '
'; print $langs->trans("ClickToDialUseTelLink").''; -print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'
'; +print Form::selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'
'; print '
'; print $langs->trans("ClickToDialUseTelLinkDesc"); print '
'.$langs->trans("MAIN_DISABLE_METEO").'' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '
'.$langs->trans("MAIN_DISABLE_METEO").'' .Form::selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '
'; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 6a02c851631..bee98d607a3 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -850,7 +850,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); } //var_dump($elementList); @@ -1570,7 +1570,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm' || $fieldlist[$field] == 'deductible') { print ''; - print $form->selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); + print Form::selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1); print ''; } elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) { diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 74164bce35c..ca1ce3e324e 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -744,7 +744,7 @@ print ''; print ''; print $langs->trans("ForceInvoiceDate"); print ''; -print $form->selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); +print Form::selectyesno("forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1); print ''; print ''; print "\n"; @@ -758,7 +758,7 @@ print ''; print ''; print $langs->trans("JSOnPaimentBill"); print ''; -print $form->selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); +print Form::selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); print ''; print ''; print "\n"; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 331ff97a6ff..b6c928d5fd3 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -170,7 +170,7 @@ if ($action == 'edit') // Edit // Multilangual GUI $var=!$var; print ''.$langs->trans("EnableMultilangInterface").''; - print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); + print Form::selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1); print ''; print ' '; print ''; @@ -191,7 +191,7 @@ if ($action == 'edit') // Edit { $var=!$var; print ''.$searchformtitle[$key].''; - print $form->selectyesno($searchform[$key],$searchformconst[$key],1); + print Form::selectyesno($searchform[$key],$searchformconst[$key],1); print ''; } print ''; @@ -207,7 +207,7 @@ if ($action == 'edit') // Edit // Show logo $var=!$var; print ''.$langs->trans("EnableShowLogo").''; - print $form->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); + print Form::selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1); print ''; print ' '; print ''; @@ -227,7 +227,7 @@ if ($action == 'edit') // Edit // Disable javascript and ajax $var=!$var; print ''.$langs->trans("DisableJavascript").''; - print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); + print Form::selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1); print ''; print ' '; print ''; @@ -237,7 +237,7 @@ if ($action == 'edit') // Edit { $var=!$var; print ''.$langs->trans("UsePreviewTabs").''; - print $form->selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); + print Form::selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); print ''; print ' '; print ''; @@ -279,7 +279,7 @@ if ($action == 'edit') // Edit // Hide unauthorized button $var=!$var; print ''.$langs->trans("ButtonHideUnauthorized").''; - print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); + print Form::selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1); print ''; print ' '; print ''; @@ -287,7 +287,7 @@ if ($action == 'edit') // Edit // Hide helpcenter link on login page $var=!$var; print ''.$langs->trans("DisableLinkToHelpCenter").''; - print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); + print Form::selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); print ''; print ' '; print ''; @@ -295,7 +295,7 @@ if ($action == 'edit') // Edit // Hide wiki link on login page $var=!$var; print ''.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).''; - print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); + print Form::selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); print ''; print ' '; print ''; @@ -303,7 +303,7 @@ if ($action == 'edit') // Edit // Show bugtrack link $var=!$var; print ''.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; - print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); + print Form::selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); print ''; print ' '; print ''; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 7ea89c05757..d327c286803 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -343,7 +343,7 @@ if ($action == 'edit') // Disable $var=!$var; print ''.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; - print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); + print Form::selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); print ''; // Separator @@ -482,7 +482,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); + print Form::selectyesno('MAIN_MAIL_EMAIL_TLS',(! empty($conf->global->MAIN_MAIL_EMAIL_TLS)?$conf->global->MAIN_MAIL_EMAIL_TLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -496,7 +496,7 @@ if ($action == 'edit') { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); + print Form::selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 7da0673b196..15b47d5efe8 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -249,7 +249,7 @@ if ($action == 'delete') $result = $db->query($sql); $obj = $db->fetch_object($result); - print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); + print Form::formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete"); } diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 7ff0a5fb358..918b3d0b5d7 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -173,7 +173,7 @@ print ''; print ''; print ''; print ''; -print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); +print Form::selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); print ''; print ''; print ''; @@ -186,7 +186,7 @@ print ''; print '
'; print ''; print ''; -print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); +print Form::selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); print ''; print '
'; print ''; @@ -199,7 +199,7 @@ print ''; print '
'; print ''; print ''; -print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); +print Form::selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); print ''; print '
'; print ''; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index c6564d3f450..e65f74376bb 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -139,7 +139,7 @@ if ($action == 'edit') // Edit // Hide VAT Intra on address $var=!$var; print ''.$langs->trans("ShowVATIntaInAddress").''; - print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); + print Form::selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); print ''; // Show prof id 1 in address into pdf @@ -156,7 +156,7 @@ if ($action == 'edit') // Edit if ($pid1) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid1.''; - print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -174,7 +174,7 @@ if ($action == 'edit') // Edit if ($pid2) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid2.''; - print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -192,7 +192,7 @@ if ($action == 'edit') // Edit if ($pid3) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid3.''; - print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -210,7 +210,7 @@ if ($action == 'edit') // Edit if ($pid4) { print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid4.''; - print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); + print Form::selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); print ''; } @@ -227,31 +227,31 @@ if ($action == 'edit') // Edit // Hide any PDF informations $var=!$var; print ''.$langs->trans("HideAnyVATInformationOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); print ''; //Desc $var=!$var; print ''.$langs->trans("HideDescOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); print ''; //Ref $var=!$var; print ''.$langs->trans("HideRefOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); print ''; //Details $var=!$var; print ''.$langs->trans("HideDetailsOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); + print Form::selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); print ''; // Place customer adress to the ISO location $var=!$var; print ''.$langs->trans("PlaceCustomerAddressToIsoLocation").''; - print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); + print Form::selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 54868b03c9b..dfa084357a2 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -565,7 +565,7 @@ print ''; -print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); +print Form::selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1); print ''; print ''; print "\n"; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 1f6e45223b4..1a9eebcaf70 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -158,7 +158,7 @@ print ''; print ''.$langs->trans("MAIN_PROXY_USE").''; print ''; print ''; -print $form->selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); +print Form::selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); print ''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index b1d8cd480a2..672a94151ee 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -177,7 +177,7 @@ if ($action == 'edit') // Disable $var=!$var; print ''.$langs->trans("MAIN_DISABLE_ALL_SMS").''; - print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); + print Form::selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print ''; // Separator diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 98ff43360a8..8613c99e04a 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -150,7 +150,7 @@ if (! empty($conf->facture->enabled)) print "
"; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); print ''; print "
\n"; } @@ -170,7 +170,7 @@ if (! empty($conf->commande->enabled)) print "
"; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); print ''; print "
\n"; } @@ -192,7 +192,7 @@ if (! empty($conf->expedition->enabled)) print "
"; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); print ''; print "
\n"; } @@ -234,7 +234,7 @@ if (! empty($conf->fournisseur->enabled)) print "
"; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); print ''; print "
\n"; } @@ -255,7 +255,7 @@ if (! empty($conf->fournisseur->enabled)) print "
"; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); print ''; print "
\n"; } @@ -275,7 +275,7 @@ if (! empty($conf->fournisseur->enabled)) print "
"; print ''; print ""; - print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); + print Form::selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); print ''; print "
\n"; } @@ -314,7 +314,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "
"; print ''; print ""; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_INVOICE",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE,1); print ''; print '
'; print "\n"; @@ -329,7 +329,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "
"; print ''; print ""; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_ORDER",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER,1); print ''; print '
'; print "\n"; @@ -344,7 +344,7 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl print "
"; print ''; print ""; - print $form->selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); + print Form::selectyesno("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT",$conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT,1); print ''; print '
'; print "\n"; @@ -373,7 +373,7 @@ if ($virtualdiffersfromphysical) print "
"; print ''; print ""; - print $form->selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); + print Form::selectyesno("STOCK_USE_VIRTUAL_STOCK",$conf->global->STOCK_USE_VIRTUAL_STOCK,1); print ''; print '
'; print "\n"; @@ -399,7 +399,7 @@ print ''; print "
"; print ''; print ""; -print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); +print Form::selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); print ''; print '
'; print "\n"; @@ -419,7 +419,7 @@ if ($conf->global->PRODUIT_SOUSPRODUITS) print "
"; print ''; print ""; - print $form->selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); + print Form::selectyesno("INDEPENDANT_SUBPRODUCT_STOCK",$conf->global->INDEPENDANT_SUBPRODUCT_STOCK,1); print ''; print '
'; print "\n"; diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index ffe6e81af3f..6b22ce0dc3f 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -180,7 +180,7 @@ if ($result) if ($action == 'purge') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1); } print '
'; @@ -198,7 +198,7 @@ if ($result) // Lignes des champs de filtres print ''; - print ''.$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).$form->select_date($date_end,'date_end',0,0,0,'',1,0,1).''; + print ''.Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).Form::select_date($date_end,'date_end',0,0,0,'',1,0,1).''; print ''; print ''; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 6dee42be6ac..1b88edbb9dc 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -116,12 +116,12 @@ print '
'; if ($action == 'purge') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2); } else if ($action == 'lock') { $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1); } if ($savehandler == 'files') diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 170c37a79bf..f0e62f65998 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -108,7 +108,7 @@ if (preg_match('/^confirm/i',$choice)) { print '
'; $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); + print Form::formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); } diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php index f7b29607bd4..d2e62a5d57f 100644 --- a/htdocs/admin/websites.php +++ b/htdocs/admin/websites.php @@ -321,7 +321,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); } //var_dump($elementList); diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index de60e8b80cf..c6c7548b851 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -132,7 +132,7 @@ if (! empty($conf->stock->enabled)) print ''.$langs->trans("CashDeskDoNotDecreaseStock").''; // Force warehouse (this is not a default value) print ''; if (empty($conf->productbatch->enabled)) { - print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); + print Form::selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1); } else { @@ -166,7 +166,7 @@ if (! empty($conf->service->enabled)) print ''; print $langs->trans("CashdeskShowServices"); print ''; - print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); + print Form::selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); print "\n"; } @@ -177,7 +177,7 @@ if (! empty($conf->receiptprinter->enabled)) print ''; print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')'; print ''; - print $form->selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); + print Form::selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); print "\n"; } diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index ecb11c3e6ee..7c44898717f 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -204,7 +204,7 @@ $langs->load("cashdesk"); " onclick="javascript: verifClic('DIF');" /> trans("DateEcheance").' :'; - print $form->select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); + print Form::select_date(-1,'txtDatePaiement',0,0,0,'paymentmode',1,0,1); print '
'; ?>
diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index e8ea62f5607..ef159b7954c 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -248,7 +248,7 @@ if ($socid) print ''; print ''; // Alias names (commercial, trademark or alias names) @@ -358,7 +358,7 @@ else if ($id || $ref) // Ref print ""; print ''; print ''; @@ -418,7 +418,7 @@ else if ($id || $ref) // Ref print ''; print ''; // Login @@ -492,7 +492,7 @@ else if ($id || $ref) // Ref print ''; print ''; // Name diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index f3a84eed5d5..6560c0a6ed6 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -108,7 +108,7 @@ if ($object->id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); } print($mesg); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a1486ff344f..a72f8a803f3 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -182,7 +182,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category'); if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete'); } print '
'.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); + print Form::showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom','','&type='.$type); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($product,'ref','',1,'ref'); + print Form::showrefnav($product,'ref','',1,'ref'); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($member,'id','','1','rowid','ref','','&type='.$type); + print Form::showrefnav($member,'id','','1','rowid','ref','','&type='.$type); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'rowid'); + print Form::showrefnav($object,'rowid'); print '
'; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index fa12c1c6b3b..2b7d7bea153 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -665,9 +665,9 @@ if ($action == 'create') $datep=($datep?$datep:$object->datep); if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0); print ''; // Date end @@ -678,9 +678,9 @@ if ($action == 'create') $datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h'); } print ''; // Status @@ -893,7 +893,7 @@ if ($id > 0) // Confirmation suppression action if ($action == 'delete') { - print $form->formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); + print Form::formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); } if ($action == 'edit') @@ -955,16 +955,16 @@ if ($id > 0) // Date start print ''; // Date end print ''; $userepeatevent=0; // Dev in progress @@ -1168,7 +1168,7 @@ if ($id > 0) // Clone event if($action == 'clone') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); print $formconfirm; } @@ -1180,7 +1180,7 @@ if ($id > 0) // Ref print ''; // Type diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 992c2314446..349a94511ed 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -130,7 +130,7 @@ if ($object->id > 0) // Ref print ''; // Type diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index ed8227a1cb8..145ff7331dd 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -142,7 +142,7 @@ $form=new Form($db); $userstatic=new User($db); $nav=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $now=dol_now(); @@ -320,10 +320,10 @@ if ($resql) //print ''; } print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 28a531c6b28..a3242b8bb3d 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -261,7 +261,7 @@ $nav.=''; $nav.=''; $nav.=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 621d3ada57a..35df5053c15 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -264,7 +264,7 @@ $nav.=''; $nav.=''; $nav.=''; -$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=Form::select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index edb5042e358..18341fbeaef 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -413,7 +413,7 @@ else // Confirmation delete if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); + print Form::formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete"); } $nblines = count($object->lines); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 3988a986f67..a687b9a814d 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -255,9 +255,9 @@ if ($id > 0) print ''; print ''; print ''; } @@ -371,10 +371,10 @@ if ($id > 0) { print ''; print ''; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 6960a9ced33..d79ca327990 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -726,17 +726,17 @@ else // Confirmation de la validation du mailing if ($action == 'valid') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); } // Confirm reset else if ($action == 'reset') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); } // Confirm delete else if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1); } @@ -783,7 +783,7 @@ else } $text.=$langs->trans('ConfirmSendingEmailing').'
'; $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); } } @@ -793,22 +793,22 @@ else print ''; print ''; // Description - print ''; // From - print ''; // Errors to - print ''; // Status @@ -864,7 +864,7 @@ else array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers"), 'value' => 0) ); // Paiement incomplet. On demande si motif = escompte ou autre - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$object->ref),'confirm_clone',$formquestion,'yes',2,240); } /* diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index a992ed73fd2..83cff684919 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -184,7 +184,7 @@ if ($object->fetch($id) >= 0) print ''; print ''; print ''; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 7ff42a737b4..11e5cddfbad 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1368,7 +1368,7 @@ if ($action == 'create') // Date print ''; // Validaty duration @@ -1416,9 +1416,9 @@ if ($action == 'create') $syear = date("Y", $tmpdte); $smonth = date("m", $tmpdte); $sday = date("d", $tmpdte); - $form->select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); + Form::select_date($syear."-".$smonth."-".$sday, 'date_livraison', '', '', '', "addprop"); } else { - $form->select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); + Form::select_date(-1, 'date_livraison', '', '', '', "addprop", 1, 1); } print ''; @@ -1671,22 +1671,22 @@ if ($action == 'create') // 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Confirm delete else if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen else if ($action == 'reopen') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line else if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate proposal @@ -1714,7 +1714,7 @@ if ($action == 'create') } if (! $error) - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); } if (! $formconfirm) { @@ -1733,7 +1733,7 @@ if ($action == 'create') // Ref print ''; // Ref customer @@ -1804,7 +1804,7 @@ if ($action == 'create') print ''; print ''; print ''; - $form->select_date($object->date, 're', '', '', 0, "editdate"); + Form::select_date($object->date, 're', '', '', 0, "editdate"); print ''; print ''; } else { @@ -1830,7 +1830,7 @@ if ($action == 'create') print ''; print ''; print ''; - $form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); + Form::select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); print ''; print ''; } else { @@ -1865,9 +1865,9 @@ if ($action == 'create') // Delivery date $langs->load('deliveries'); print ''; print ''; diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index cdeacefafe1..d3373ff92d8 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -73,7 +73,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 544c5ab27e3..d85768170d0 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -161,7 +161,7 @@ if ($object->id > 0) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index af603d0606b..858e4e1c34b 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -106,7 +106,7 @@ if ($object->id > 0) // Ref print ''; // Ref client diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 1e5ace7353e..cff7e9c313e 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; // Ref client diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 07989b457de..a9445743e0e 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -296,7 +296,7 @@ if ($socid > 0) if ($_GET['action'] == 'remove') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } /* @@ -403,7 +403,7 @@ if ($socid > 0) array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); } } else diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 1ec3a0533cc..712ef0fbc86 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -70,7 +70,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; // Ref cde client diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 37fdf8aa7a4..058a68d3803 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1505,7 +1505,7 @@ if ($action == 'create' && $user->rights->commande->creer) } // Date print ''; // Delivery date planed @@ -1515,7 +1515,7 @@ if ($action == 'create' && $user->rights->commande->creer) if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:''; } - $form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); + Form::select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); print ""; // Conditions de reglement @@ -1775,7 +1775,7 @@ if ($action == 'create' && $user->rights->commande->creer) * Confirmation de la suppression de la commande */ if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); } /* @@ -1825,7 +1825,7 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockDecrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); } // Confirm back to draft status @@ -1857,14 +1857,14 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); } /* * Confirmation de la cloture */ if ($action == 'shipped') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); } /* @@ -1898,13 +1898,13 @@ if ($action == 'create' && $user->rights->commande->creer) array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); } // Confirmation to delete line if ($action == 'ask_deleteline') { - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm=Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Clone confirmation @@ -1918,7 +1918,7 @@ if ($action == 'create' && $user->rights->commande->creer) // => 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) { @@ -1951,7 +1951,7 @@ if ($action == 'create' && $user->rights->commande->creer) // Ref print ''; print ''; print ''; @@ -2047,7 +2047,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - $form->select_date($object->date, 'order_', '', '', '', "setdate"); + Form::select_date($object->date, 'order_', '', '', '', "setdate"); print ''; print ''; } else { @@ -2072,7 +2072,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - $form->select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); + Form::select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); print ''; print ''; } else { diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index c72e040e61c..53fcd5d9a57 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -156,7 +156,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '"; // Ref commande client diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 2d9c80e9d2d..1c4c7b8b8cb 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -110,7 +110,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''; print ''; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 692d189e457..fff1434e0fc 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -403,11 +403,11 @@ if ($resql) if (empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { print ''; } print ''; print "\n"; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 6f3519e9ced..17ca75b8e80 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '"; // Ref commande client diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index a482b2b480c..07fe4af6015 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -427,7 +427,7 @@ if ($action == 'create' && !$error) // Date invoice print ''; // Payment term print ''; print ''; // Label @@ -404,7 +404,7 @@ if ($id > 0 || ! empty($ref)) if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteTransaction'); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); } @@ -466,7 +466,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; print ''; @@ -539,7 +539,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; print "\n"; diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 7b53d775cb6..97edaf5446f 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -150,7 +150,7 @@ if ($_GET["account"]) { if (! preg_match('/,/', $id)) { - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); } else { diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 420fc2e4687..d69db934899 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -365,7 +365,7 @@ if ($action == 'create') print ''; print ''; print ''; @@ -558,7 +558,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); } @@ -569,7 +569,7 @@ else // Ref print ''; print ''; // Label diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 3b6957df40f..151257a6535 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -179,7 +179,7 @@ if ($id > 0 || !empty($ref)) { // Ref print ''; print ''; // Label @@ -200,7 +200,7 @@ if ($id > 0 || !empty($ref)) { * Confirmation suppression fichier */ if ($action == 'delete') { - $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), + $ret = $formForm::formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 0764c87f5ab..fb8a823b96e 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -770,7 +770,7 @@ if ($account) if ($_GET["option"]!='all') { $morehtml=''.$langs->trans("ShowAllAccounts").''; - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam); } else { diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index a17614238be..7722713fce1 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -259,7 +259,7 @@ if ($result) // Confirmations if ($action == 'delete_categ') { - print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); + print Form::formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1); } @@ -276,7 +276,7 @@ if ($result) // Ref print '"; print ''; print ''; @@ -451,7 +451,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; } else @@ -467,7 +467,7 @@ if ($result) if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; print ''; // Label diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index f86ac81aa76..e56f776578e 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -191,9 +191,9 @@ if ($resql) $moreforfilter = ''; $moreforfilter.='
'; $moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' '; - $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= Form::select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= ' - '; - $moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= $langs->trans('EndDate') . ' ' . Form::select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= '
'; if ($moreforfilter) @@ -238,7 +238,7 @@ if ($resql) print ''; print ''; print ''; print "\n"; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index db7f37cb3e5..a60c470993d 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -97,7 +97,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) // Ref print ''; print ''; // Label diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 146ed4759c4..ca13059a0e4 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -177,7 +177,7 @@ $form->select_comptes($account_to,'account_to',0,'',1); print "\n"; print "\n"; print ''; print ''; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 934c970accf..94bb70ca9a2 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -262,7 +262,7 @@ if ($action == 'create') print ""; print ''; // Km @@ -358,7 +358,7 @@ else if ($id) // Date print ''; // Km @@ -416,7 +416,7 @@ else if ($id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); } @@ -429,16 +429,16 @@ else if ($id) // Ref print ''; $form->load_cache_types_fees(); // Type print ''; // Who @@ -450,16 +450,16 @@ else if ($id) // Date print ''; // Km/Price print '"; // Where diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index b6b1cbfa277..80f49fec401 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print ''; // Societe diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 497de98fa72..8767ca97961 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -165,7 +165,7 @@ if ($resql) // print ''; print ''; print ''; print "\n"; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index b70caf8b667..2c4442aa595 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2354,7 +2354,7 @@ if ($action == 'create') // Date invoice print ''; // Payment term @@ -2548,12 +2548,12 @@ if ($action == 'create') print ''; print '
'.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) Form::select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); + else Form::select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '
'.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else Form::select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '
'.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) $form->select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); - else if (GETPOST("afaire") == 2) $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); - else $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) Form::select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); + else if (GETPOST("afaire") == 2) Form::select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + else Form::select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '
'.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - //else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); - else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + //else Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend','ap'); + else Form::select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); print '
'; - print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); + print Form::select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print ''; - print $form->select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); + print Form::select_date($dateend, 'dateend', 0, 0, 1, '', 1, 0, 1); print '
'; - print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print Form::editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print ''; - print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); + print Form::editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer); print '
'; - print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); + print Form::editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount'; - print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); + print Form::editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); if (empty($object->outstanding_limit)) print $langs->trans("NoLimit"); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'id', $linkback); + print Form::showrefnav($object,'id', $linkback); print '
'.$form->editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print $form->editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.Form::editfieldkey("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print Form::editfieldval("MailTitle",'titre',$object->titre,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.Form::editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print Form::editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; - print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); + print '
'.Form::editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').''; + print Form::editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'id', $linkback); + print Form::showrefnav($object,'id', $linkback); print '
'.$langs->trans("MailTitle").''.$object->titre.'
' . $langs->trans('Date') . ''; - $form->select_date('', '', '', '', '', "addprop", 1, 1); + Form::select_date('', '', '', '', '', "addprop", 1, 1); print '
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'; - print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); + print Form::editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); print ''; - print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); + print Form::editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); print '
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); + print Form::showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
' . $langs->trans('Date') . ''; - $form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date + Form::select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print '
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "
'.$langs->trans('Ref').''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'.$langs->trans('Company').''.$object->thirdparty->getNomUrl(1).'
'; - print $form->selectyesno('billed', $billed, 1, 0, 1); + print Form::selectyesno('billed', $billed, 1, 0, 1); print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print "
'.$langs->trans('Date').''; - $html->select_date('','','','','',"add",1,1); + Form::select_date('','','','','',"add",1,1); print '
'.$langs->trans('PaymentConditionsShort').''; @@ -575,8 +575,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $num = $db->num_rows($resql); print load_fiche_titre($title); $i = 0; - $period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1); - $periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,1,'',1,0,1); + $periodely=Form::select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.Form::select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); if (! empty($socid)) { diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index b1bf6cd4270..847795df1a4 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -341,7 +341,7 @@ if ($id > 0 || ! empty($ref)) // Ref print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); print '
'; - $form->select_date($dateop,'op',0,0,0,'transaction'); + Form::select_date($dateop,'op',0,0,0,'transaction'); print ''; $form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1); @@ -521,9 +521,9 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - $period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('From').' '.Form::select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1); $period_filter .= ' '; - $period_filter .= $langs->trans('to').' '.$form->select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1); + $period_filter .= $langs->trans('to').' '.Form::select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1); print '
'.$period_filter.' '; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("Date").''; - $form->select_date('', 're', 0, 0, 0, 'formsoc'); + Form::select_date('', 're', 0, 0, 0, 'formsoc'); print '
'.$langs->trans("BalanceMinimalAllowed").'
'.$langs->trans("Ref").''; - print $form->showrefnav($account, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($account, 'ref', $linkback, 1, 'ref'); print '
' . $langs->trans("Ref") . ''; - print $form->showrefnav($object, 'ref', '', 1, 'ref'); + print Form::showrefnav($object, 'ref', '', 1, 'ref'); print '
'.$langs->trans("Ref")."'; - print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); + print Form::showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid'); print '
'; - print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); + print Form::select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro); print ''; - print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); + print Form::select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro); if (! $objp->rappro) { print '   '; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 8ef53f26203..9cf6b3fe2af 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -131,7 +131,7 @@ if (empty($num)) // Ref print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref'); print '
'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
'.$langs->trans("Ref").''; - print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); + print Form::showrefnav($acct, 'ref', $linkback, 1, 'ref'); print '
"; -$form->select_date((! empty($dateo)?$dateo:''),'','','','','add'); +Form::select_date((! empty($dateo)?$dateo:''),'','','','','add'); print "
'.$langs->trans("Date").''; - print $form->select_date($datec?$datec:-1,'','','','','add',1,1,1); + print Form::select_date($datec?$datec:-1,'','','','','add',1,1,1); print '
'.$langs->trans("Date").''; - print $form->select_date($object->date,'',0,0,0,'update',1,0,1); + print Form::select_date($object->date,'',0,0,0,'update',1,0,1); print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'; - print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print Form::editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; - print $form->editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print Form::editfieldval("Type",'type',$form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print '
'; - print $form->editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print Form::editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print ''; - print $form->editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); + print Form::editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker'); print '
'; - print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print Form::editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ''; - print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print Form::editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print "
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print '
' . $langs->trans('Date') . ''; $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); + print Form::select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); print '
'; print $langs->trans('From') . ' '; print ''; - print $form->select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print Form::select_date('', 'date_start' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '
'; print $langs->trans('to') . ' '; print ''; - print $form->select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); + print Form::select_date('', 'date_end' . $i, $usehm, $usehm, 1, "add", 1, 0, 1); print '
'; print ''; } @@ -2664,7 +2664,7 @@ else if ($id > 0 || ! empty($ref)) // Confirmation de la conversion de l'avoir en reduc if ($action == 'converttoreduc') { $text = $langs->trans('ConfirmConvertToReduc'); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); } // Confirmation to delete invoice @@ -2692,9 +2692,9 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' // => 1), array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction")))); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); } else { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); } } @@ -2758,7 +2758,7 @@ else if ($id > 0 || ! empty($ref)) { $text .= '
' . img_warning() . ' ' . $langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); } // Confirm back to draft status @@ -2795,12 +2795,12 @@ else if ($id > 0 || ! empty($ref)) array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $value)); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); } // Confirmation du classement paye if ($action == 'paid' && $resteapayer <= 0) { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } if ($action == 'paid' && $resteapayer > 0) { // Code @@ -2829,7 +2829,7 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); } // Confirmation du classement abandonne @@ -2860,13 +2860,13 @@ else if ($id > 0 || ! empty($ref)) // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); + $formconfirm = Form::formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); } } // Confirmation de la suppression d'une ligne produit if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); } // Clone confirmation @@ -2878,7 +2878,7 @@ else if ($id > 0 || ! empty($ref)) // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company($object->socid, 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = Form::formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) @@ -2910,7 +2910,7 @@ else if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer @@ -3091,7 +3091,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); + Form::form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'daytext'); } @@ -3454,7 +3454,7 @@ else if ($id > 0 || ! empty($ref)) if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editpaymentterm') { - $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); + Form::form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); } else { print dol_print_date($object->date_lim_reglement, 'daytext'); if ($object->hasDelay()) { diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 1250118f40e..b94a686e891 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref)) if ($result < 0) { dol_print_error('', $discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index b07a8f8c2d4..e6e474883f4 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index e4f9846309a..18e0fac540a 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index e44c9e96fb4..81fcd4e24a2 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -349,7 +349,7 @@ if ($action == 'create') // First date of execution for cron print "".$langs->trans('NextDateToExecution').""; $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); - print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); + print Form::select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1); print ""; // Number max of generation @@ -609,7 +609,7 @@ else if ($result < 0) { dol_print_error('', $discount->error); }*/ - print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref); print ''; @@ -669,9 +669,9 @@ else print ''; - print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer); print ''; - print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); + print Form::editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60'); print ''; print ''; @@ -771,7 +771,7 @@ else print ''; if ($action == 'date_when' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print Form::editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } else { @@ -780,7 +780,7 @@ else print ''; if ($action == 'date_when' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); + print Form::editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } print ''; print ''; @@ -789,7 +789,7 @@ else print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); } else { @@ -798,7 +798,7 @@ else print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); + print Form::editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); } else { @@ -810,14 +810,14 @@ else // Status of generated invoices print ''; if ($action == 'auto_validate' || $object->frequency > 0) - print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); + print Form::editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); else print $langs->trans("StatusOfGeneratedInvoices"); print ''; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) { - print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); + print Form::editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer, $select); } print ''; print ''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 982dbeb421e..a1479d3c875 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -719,7 +719,7 @@ if ($resql) if ($show_files) $param.='&show_files=' .$show_files; $param.=(! empty($option)?"&option=".$option:""); - $massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); + $massactionbutton=Form::selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); $i = 0; print '
'."\n"; @@ -924,7 +924,7 @@ if ($resql) print Form::selectarray('search_status', $liststatus, $search_status, 1); print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); + $searchpitco=Form::showFilterAndCheckAddButtons(1, 'checkforselect', 1); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 3562a235963..7d2cd530955 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ''; // Ref customer diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index b881086657a..8dbb1106869 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -167,7 +167,7 @@ if ($object->id > 0) { dol_print_error('',$discount->error); } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print Form::showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); print ""; // Ref customer @@ -300,7 +300,7 @@ if ($object->id > 0) { if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); + Form::form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date,'invoicedate'); } else { @@ -351,7 +351,7 @@ if ($object->id > 0) { if ($action == 'editpaymentterm') { - $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); + Form::form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$object->date_lim_reglement,'paymentterm'); } else { diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index b8a5779c708..fc99b8e747f 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -92,7 +92,7 @@ $builddate=time(); $description=$langs->trans("DescPurchasesJournal").'
'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); +$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 0cbd5068077..30e0aa69a75 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -96,7 +96,7 @@ $builddate=time(); $description=$langs->trans("DescSellsJournal").'
'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); else $description.= $langs->trans("DepositsAreIncluded"); -$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); +$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 566a2ff53cc..11f7e154f0a 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -164,11 +164,11 @@ if ($_GET["action"] == 'create') print ""; print ''.$langs->trans("DatePayment").''; - print $form->select_date($datep,"datep",'','','','add'); + print Form::select_date($datep,"datep",'','','','add'); print ''; print ''.$langs->trans("DateValue").''; - print $form->select_date($datev,"datev",'','','','add'); + print Form::select_date($datev,"datev",'','','','add'); print ''; // Label diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index ac30e529839..f2836dcb1ce 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -111,7 +111,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; @@ -129,7 +129,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$langs->trans("CalcModeLT2Debt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 7c1e99b3537..6cdc56baef5 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -131,7 +131,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice $nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -163,7 +163,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services $nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 72fd65d686b..b1abf17fe73 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -462,7 +462,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''.$langs->trans('Date').''; $datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment); - $form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); + Form::select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); print ''; print ''.$langs->trans('Comments').''; @@ -773,7 +773,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $text.='
'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed"); print ''; } - print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); + print Form::formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); } print "
\n"; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 0f03eb8ae47..42370682f4b 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -185,7 +185,7 @@ dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), 0, 'pa */ if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -195,7 +195,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -206,12 +206,12 @@ $linkback = '' . $langs- // Ref print ''.$langs->trans('Ref').''; -print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); +print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ''; // Date payment -print ''.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; -print $form->editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); +print ''.Form::editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; +print Form::editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); print ''; // Payment type (VIR, LIQ, ...) @@ -219,16 +219,16 @@ $labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$obje print ''.$langs->trans('PaymentMode').''.$labeltype.''; // Payment numero -print ''.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; -print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); +print ''.Form::editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; +print Form::editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); print ''; // Amount print ''.$langs->trans('Amount').''.price($object->montant,'',$langs,0,0,-1,$conf->currency).''; // Note -print ''.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).''; -print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); +print ''.Form::editfieldkey("Note",'note',$object->note,$object,$user->rights->facture->paiement).''; +print Form::editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); print ''; $disable_delete = 0; diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index fba7a9044fa..8c4b478abd2 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -339,7 +339,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1); } @@ -348,7 +348,7 @@ else */ if ($action == 'valide') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1); } @@ -361,7 +361,7 @@ else array('type' => 'hidden','name' => 'bankid','value' => GETPOST('lineid')), array('type' => 'date','name' => 'rejectdate_','label' => $langs->trans("RejectCheckDate"),'value' => dol_now()) ); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check',$formquestion,'',1); } } @@ -387,7 +387,7 @@ if ($action == 'new') //print ''.$langs->trans('Date').''.dol_print_date($now,'day').''; // Filter print ''.$langs->trans("DateChequeReceived").''; - print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1); + print Form::select_date($filterdate,'fd',0,0,1,'',1,1,1); print ''; print ''.$langs->trans("BankAccount").''; $form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1); @@ -582,7 +582,7 @@ else } else { - print $form->showrefnav($object,'ref',$linkback, 1, 'number'); + print Form::showrefnav($object,'ref',$linkback, 1, 'number'); } print ''; @@ -601,7 +601,7 @@ else print '
'; print ''; print ''; - $form->select_date($object->date_bordereau,'datecreate_','','','',"setdate"); + Form::select_date($object->date_bordereau,'datecreate_','','','',"setdate"); print ''; print '
'; } diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 5b4929ae42b..ff4beea6c0e 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -162,7 +162,7 @@ if ($resql) print ''; print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index bcca56ed645..f095e2ad577 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -265,7 +265,7 @@ if ($resql) print ''; print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index a68f3445305..04926879739 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -209,7 +209,7 @@ if ($_GET["action"] == 'create') print ''.$langs->trans("Date").''; $datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0; - $form->select_date($datepayment,'','','','',"add_payment",1,1); + Form::select_date($datepayment,'','','','',"add_payment",1,1); print ""; print ''; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index ad59687b43c..a621a008f1b 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -144,7 +144,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0, */ if ($action == 'delete') { - print $form->formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print Form::formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -154,7 +154,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print Form::formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -164,7 +164,7 @@ print ''; // Ref print ''; print ''; // Date diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index e229a3a5d75..f9d35b00937 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -156,7 +156,7 @@ if ($id > 0) /*if ($action == 'credite') { - print $form->formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); + print Form::formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); }*/ @@ -214,7 +214,7 @@ if ($id > 0) print ''; print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans('Ref').''; -print $form->showrefnav($paiement,'id','',1,'rowid','id'); +print Form::showrefnav($paiement,'id','',1,'rowid','id'); print '
'.$langs->trans("NotifyTransmision").'
'.$langs->trans("TransData").''; - print $form->select_date('','','','','',"userfile",1,1); + print Form::select_date('','','','','',"userfile",1,1); print '
'.$langs->trans("TransMetod").''; print Form::selectarray("methode",$bon->methodes_trans); @@ -237,7 +237,7 @@ if ($id > 0) print '
'.$langs->trans("NotifyCredit").'
'.$langs->trans('CreditDate').''; - print $form->select_date('','','','','',"infocredit",1,1); + print Form::select_date('','','','','',"infocredit",1,1); print '
'; print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice"); diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index c62c8c1c283..13e54e0e2d3 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -193,13 +193,13 @@ if ($id) //Select yes/no print ''.$langs->trans("WithdrawalRefusedConfirm").' '.$soc->name.' ?'; print ''; - print $form->selectyesno("confirm",1,0); + print Form::selectyesno("confirm",1,0); print ''; //Date print ''.$langs->trans("RefusedData").''; print ''; - print $form->select_date('','','','','',"confirm_rejet"); + print Form::select_date('','','','','',"confirm_rejet"); print ''; //Reason diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index e7cef1a50ad..148052aa000 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -137,7 +137,7 @@ if ($result) print ' '; print ' '; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print ''; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 4286c6a8453..8d7364af048 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -125,7 +125,7 @@ if ($modecompta=="CREANCES-DETTES") $name=$langs->trans("AnnualByCompaniesDueDebtMode"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'
','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().' '.img_next().''; $description=$langs->trans("RulesResultDue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -137,8 +137,8 @@ else { $name=$langs->trans("AnnualByCompaniesInputOutputMode"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1); - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + //$period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',1,1,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().' '.img_next().''; $description=$langs->trans("RulesResultInOut"); $builddate=time(); diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 4a8dc21ca1b..e2bb44c31d8 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -239,13 +239,13 @@ if ($action == 'create') // Date payment print ''; print fieldLabel('DatePayment','datep',1).''; - print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1); + print Form::select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1); print ''; // Date value for bank print ''; print fieldLabel('DateValue','datev',0).''; - print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1); + print Form::select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1); print ''; // Employee @@ -263,13 +263,13 @@ if ($action == 'create') // Date start period print ''; print fieldLabel('DateStartPeriod','datesp',1).''; - print $form->select_date($datesp,"datesp",'','','','add'); + print Form::select_date($datesp,"datesp",'','','','add'); print ''; // Date end period print ''; print fieldLabel('DateEndPeriod','dateep',1).''; - print $form->select_date($dateep,"dateep",'','','','add'); + print Form::select_date($dateep,"dateep",'','','','add'); print ''; // Amount @@ -340,7 +340,7 @@ if ($id) print ""; print ''.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print ''; // Employee diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 7e015a4ad2e..7f89d9967c2 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -108,7 +108,7 @@ if ($object->id) // Ref print ''.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print Form::showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print ''; // Societe diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index b0584d62850..33218b00f02 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -176,7 +176,7 @@ if ($result) print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 2a9894be87a..53d12229f97 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -270,7 +270,7 @@ if ($action == 'create') print $langs->trans("PeriodEndDate"); print ''; print ''; - print $form->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); + print Form::select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); print ''; print ''; // Amount @@ -286,7 +286,7 @@ if ($action == 'create') print $langs->trans("DateDue"); print ''; print ''; - print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); + print Form::select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); print ''; print "\n"; @@ -325,20 +325,20 @@ if ($id > 0) ); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes'); + print Form::formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneTax'),$langs->trans('ConfirmCloneTax',$object->ref),'confirm_clone',$formclone,'yes'); } // Confirmation de la suppression de la charge if ($action == 'paid') { $text=$langs->trans('ConfirmPaySocialContribution'); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2); } if ($action == 'delete') { $text=$langs->trans('ConfirmDeleteSocialContribution'); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2); + print Form::formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2); } if ($action == 'edit') @@ -351,7 +351,7 @@ if ($id > 0) // Ref print ''.$langs->trans("Ref").''; - print $form->showrefnav($object,'id'); + print Form::showrefnav($object,'id'); print ""; // Label @@ -443,7 +443,7 @@ if ($id > 0) print ""; if ($action == 'edit') { - print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); + print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { @@ -455,7 +455,7 @@ if ($id > 0) if ($action == 'edit') { print ''.$langs->trans("DateDue").""; - print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); + print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print ""; } else { diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index f87791dfed9..6bc9fe14f9d 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -107,7 +107,7 @@ if ($object->id) // Ref print ''.$langs->trans("Ref").''; - print $form->showrefnav($object,'id'); + print Form::showrefnav($object,'id'); print ""; // Label @@ -130,7 +130,7 @@ if ($object->id) print ""; if ($action == 'edit') { - print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); + print Form::select_date($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { @@ -143,7 +143,7 @@ if ($object->id) if ($action == 'edit') { print ''.$langs->trans("DateDue").""; - print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); + print Form::select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print ""; } else { diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 3133022b9e6..d33d3ea2414 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -205,7 +205,7 @@ if ($resql) print ' '; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index e995b06aa6b..910bc6e16e6 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") { $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -164,7 +164,7 @@ if ($modecompta=="CREANCES-DETTES") { $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index cb8151cf33c..cbcbb4d860d 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -139,7 +139,7 @@ if ($modecompta=="CREANCES-DETTES") { $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink="".img_previous()." ".img_next().""; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -150,7 +150,7 @@ if ($modecompta=="CREANCES-DETTES") { $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink="".img_previous()." ".img_next().""; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index dade07fd0e3..41da09ed290 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -155,7 +155,7 @@ if ($modecompta=="CREANCES-DETTES") $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeDebt"); $calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().' '.img_next().''; $description=$langs->trans("RulesCADue"); if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded"); @@ -166,7 +166,7 @@ if ($modecompta=="CREANCES-DETTES") $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $calcmode=$langs->trans("CalcModeEngagement"); $calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=''.img_previous().' '.img_next().''; $description=$langs->trans("RulesCAIn"); $description.= $langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index f7d8361b8ff..6c6d22be491 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -234,11 +234,11 @@ if ($action == 'create') print ""; print ''.$langs->trans("DatePayment").''; - print $form->select_date($datep,"datep",'','','','add',1,1); + print Form::select_date($datep,"datep",'','','','add',1,1); print ''; print ''.$langs->trans("DateValue").''; - print $form->select_date($datev,"datev",'','','','add',1,1); + print Form::select_date($datev,"datev",'','','','add',1,1); print ''; // Label diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index b0d7a9bce30..dcf6d284490 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -140,7 +140,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; //$name.='
('.$langs->trans("SeeVATReportInInputOutputMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesVATDueServices"); $description.='
'; @@ -183,7 +183,7 @@ if ($modetax==0) { // Invoice for goods, payment for services $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; //$name.='
('.$langs->trans("SeeVATReportInDueDebtMode",'','').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); //$periodlink=($year_start?"".img_previous()." ".img_next()."":""); $description=$langs->trans("RulesVATInServices"); $description.=' '.$langs->trans("DepositsAreIncluded"); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index e04530a9dc7..500739c18fb 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -130,7 +130,7 @@ if ($modetax==1) // Calculate on invoice for goods and services $nom=$langs->trans("VATReportByQuartersInDueDebtMode"); $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } @@ -165,7 +165,7 @@ if ($modetax==0) // Invoice for goods, payment for services $nom=$langs->trans("VATReportByQuartersInInputOutputMode"); $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; else { $prevquarter=4; $prevyear--; } diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php index 61d019894e8..a4cfedca663 100644 --- a/htdocs/compta/tva/quarter_report.php +++ b/htdocs/compta/tva/quarter_report.php @@ -149,7 +149,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services $nom=$langs->trans("VATReportByQuartersInDueDebtMode"); $calcmode=$langs->trans("CalcModeVATDebt"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) { $prevquarter--; @@ -198,7 +198,7 @@ if ($modetax==0) { // Invoice for goods, payment for services $nom=$langs->trans("VATReportByQuartersInInputOutputMode"); $calcmode=$langs->trans("CalcModeVATEngagement"); $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; - $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $period=Form::select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.Form::select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) { $prevquarter--; diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 9615bec99f1..1eeba95d634 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -172,7 +172,7 @@ if ($result) print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 9d4543f702a..bb00cd08d62 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -364,7 +364,7 @@ abstract class ActionsContactCardCommon if ($action == 'view' || $action == 'delete') { - $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id'); + $this->tpl['showrefnav'] = Form::showrefnav($this->object,'id'); if ($this->object->socid > 0) { @@ -413,7 +413,7 @@ abstract class ActionsContactCardCommon array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); - $this->tpl['action_create_user'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); + $this->tpl['action_create_user'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); } } diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 30a52469da2..709c1b30300 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -107,7 +107,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon // Confirm delete contact if ($action == 'delete' && $user->rights->societe->contact->supprimer) { - $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + $this->tpl['action_delete'] = Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); } } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 1d2432a586f..0e3653c2293 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -450,7 +450,7 @@ else { if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); } } @@ -633,7 +633,7 @@ else if (! empty($conf->mailing->enabled)) { print ''; - print ''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).''; + print ''.Form::selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).''; } else { @@ -688,11 +688,11 @@ else $form=new Form($db); if ($object->birthday) { - print $form->select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1); + print Form::select_date($object->birthday,'birthday',0,0,0,"perso", 1, 0, 1); } else { - print $form->select_date('','birthday',0,0,1,"perso", 1, 0, 1); + print Form::select_date('','birthday',0,0,1,"perso", 1, 0, 1); } print ''; @@ -873,7 +873,7 @@ else if (! empty($conf->mailing->enabled)) { print ''; - print ''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''; + print ''.Form::selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''; } else { @@ -1044,7 +1044,7 @@ else if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser"); else $text.=$langs->trans("UserWillBeInternalUser"); } - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); } diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 8bebb6f0cfb..121dbba32bb 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -130,7 +130,7 @@ if ($action == 'edit') // Date To Birth print ''.$langs->trans("DateToBirth").''; $form=new Form($db); - print $form->select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1); + print Form::select_date($object->birthday,'birthday',0,0,1,"perso", 1,0,1); print ''; print ''.$langs->trans("Alert").': '; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 2b5b3961066..6343461e9a7 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1148,7 +1148,7 @@ if ($action == 'create') print ''; print ''.$langs->trans("Date").''; - $form->select_date($datecontrat,'',0,0,'',"contrat"); + Form::select_date($datecontrat,'',0,0,'',"contrat"); print ""; // Project @@ -1243,7 +1243,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); } @@ -1264,7 +1264,7 @@ else $text=$langs->trans('ConfirmValidateContract',$numref); - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); } @@ -1273,7 +1273,7 @@ else */ if ($action == 'close') { - print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); + print Form::formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); } @@ -1294,31 +1294,31 @@ else // Ref du contrat if (!empty($modCodeContract->code_auto)) { print ''.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ""; } else { print ''; print ''; - print $form->editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); + print Form::editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); print ''; - print $form->editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); + print Form::editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); print ''; print ''; } print ''; print ''; - print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print Form::editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); print ''; - print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print Form::editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); print ''; print ''; print ''; print ''; - print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print Form::editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print ''; - print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print Form::editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print ''; print ''; @@ -1346,9 +1346,9 @@ else // Date print ''; print ''; - print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); + print Form::editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); print ''; - print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); + print Form::editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); print ''; print ''; /* print ''.$langs->trans("Date").''; @@ -1651,9 +1651,9 @@ else print ""; print ''; print $langs->trans("DateStartPlanned").' '; - $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); + Form::select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); + Form::select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); print ''; if (is_array($extralabelslines) && count($extralabelslines)>0) { @@ -1691,7 +1691,7 @@ else */ if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid')) { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); + print Form::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); if ($ret == 'html') print '
'; } @@ -1711,7 +1711,7 @@ else 'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"), array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); - $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); + $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion); print '
'; } @@ -1723,7 +1723,7 @@ else $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment'); - $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); + $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1); print '
'; } @@ -1735,7 +1735,7 @@ else $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment'); - $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); + $formForm::formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1); print '
'; } @@ -1824,11 +1824,11 @@ else print ''; print ''.$langs->trans("DateServiceActivate").''; - print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); + print Form::select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); print ''; print ''.$langs->trans("DateEndPlanned").''; - print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); + print Form::select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); print ''; print ''; @@ -1881,7 +1881,7 @@ else if ($objp->statut == 4) { print $langs->trans("DateEndReal").' '; - print $form->select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1); + print Form::select_date($dateactend,"end",$usehm,$usehm,($objp->date_fin_reelle>0?0:1),"closeline",1,1,1); } } print ''; diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index cd070f6078d..e526b840af8 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -143,7 +143,7 @@ if ($id > 0 || ! empty($ref)) // Reference du contrat print ''.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ""; // Customer diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 49466c7fcb0..148abdb0ed1 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -110,7 +110,7 @@ if ($object->id) $linkback = ''.$langs->trans("BackToList").''; // Reference - print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; + print ''.$langs->trans('Ref').''.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; // Societe print ''.$langs->trans("Customer").''; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 505775be4df..8b3d203b2c9 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -267,7 +267,7 @@ if ($resql) print ' '; print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index 502b354ee69..be39c90de57 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -78,7 +78,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Reference - print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; + print ''.$langs->trans('Ref').''.Form::showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; // Societe print ''.$langs->trans("Customer").''; diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 589b2944e21..3cf3a922b59 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -219,14 +219,14 @@ if ($resql) print Form::selectarray('filter_op1',$arrayofoperators,$filter_op1,1); print ' '; $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); - print $form->select_date($filter_date1,'op1',0,0,1,'',1,0,1); + print Form::select_date($filter_date1,'op1',0,0,1,'',1,0,1); print ''; print ''; $arrayofoperators=array('<'=>'<','>'=>'>'); print Form::selectarray('filter_op2',$arrayofoperators,$filter_op2,1); print ' '; $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); - print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1); + print Form::select_date($filter_date2,'op2',0,0,1,'',1,0,1); print ''; print ''; $arrayofstatus=array( @@ -239,7 +239,7 @@ if ($resql) print Form::selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1); print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); + $searchpitco=Form::showFilterAndCheckAddButtons(); print $searchpitco; print ''; print "\n"; diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 997e27adb20..3a0c6d05ff4 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -241,7 +241,7 @@ if ($section) $useglobalvars=1; $form = new Form($db); $formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile')); - print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); + print Form::formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); } if ($useajax) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 97645487d45..166b6d6b41f 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -702,7 +702,7 @@ class ExtraFields if (! is_object($form)) $form=new Form($this->db); // TODO Must also support $moreparam - $out = $form->select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); + $out = Form::select_date($value, $keysuffix.'options_'.$key.$keyprefix, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); } elseif (in_array($type,array('int'))) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 86fab11b662..e17bd17861d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3941,6 +3941,7 @@ class Form * @param string $selected preselected currency code * @param string $htmlname name of HTML select list * @return void + * @deprecated use Form::selectCurrency */ function select_currency($selected='',$htmlname='currency_id') { diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index ff5ff6a9cc7..7441902a837 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -562,7 +562,7 @@ class FormMail extends Form if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_SUPPLIER_PROPOSAL) && ! empty($this->param['models']) && $this->param['models'] == 'supplier_proposal_send') $defaultvaluefordeliveryreceipt=1; if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_ORDER) && ! empty($this->param['models']) && $this->param['models'] == 'order_send') $defaultvaluefordeliveryreceipt=1; if (! empty($conf->global->MAIL_FORCE_DELIVERY_RECEIPT_INVOICE) && ! empty($this->param['models']) && $this->param['models'] == 'facture_send') $defaultvaluefordeliveryreceipt=1; - $out.= $form->selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1); + $out.= Form::selectyesno('deliveryreceipt', (isset($_POST["deliveryreceipt"])?$_POST["deliveryreceipt"]:$defaultvaluefordeliveryreceipt), 1); } $out.= "\n"; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 8026f6104c2..73d59c82918 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1179,7 +1179,7 @@ function form_constantes($tableau,$strictw3c=0) } else if ($obj->type == 'yesno') { - print $form->selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1); + print Form::selectyesno('constvalue'.(empty($strictw3c)?'':'[]'),$obj->value,1); print ''; } else diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1a415e0338e..e3802565517 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -910,7 +910,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r { if ($showimage) $morehtmlleft.='
'.Form::showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'
'; } - if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
'; + if ($showbarcode) $morehtmlleft.='
'.Form::showbarcode($object).'
'; if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); } @@ -947,7 +947,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlref.=$langs->trans("TechnicalID").': '.$object->id; $morehtmlref.='
'; } - print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); + print Form::showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); print '
'; print '
'; } diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 7201b30308c..217030bd1e9 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -636,7 +636,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t // Form to add new time print ''; - $tableCell=$form->select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask); + $tableCell=Form::select_date($preselectedday,$lines[$i]->id,1,1,2,"addtime",0,0,1,$disabledtask); print $tableCell; print ''; diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 42f59e7c2fb..8dbe5d924fd 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -154,9 +154,9 @@ class mailing_fraise extends MailingTargets $s.=''; $s.='
'; $s.=$langs->trans("DateEndSubscription").':  '; - $s.=$langs->trans("After").' > '.$form->select_date(-1,'subscriptionafter',0,0,1,'fraise',1,0,1,0); + $s.=$langs->trans("After").' > '.Form::select_date(-1,'subscriptionafter',0,0,1,'fraise',1,0,1,0); $s.='   '; - $s.=$langs->trans("Before").' < '.$form->select_date(-1,'subscriptionbefore',0,0,1,'fraise',1,0,1,0); + $s.=$langs->trans("Before").' < '.Form::select_date(-1,'subscriptionbefore',0,0,1,'fraise',1,0,1,0); return $s; } diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index a983bf7f36e..3a162aa0901 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -29,7 +29,7 @@ if (empty($relativepathwithnofile)) $relativepathwithnofile=''; if ($action == 'delete') { $langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles - $ret = $form->form_confirm( + $ret = $formForm::formconfirm( $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param)?'':$param), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index c68aa599310..8812a3dd708 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -69,13 +69,13 @@ else $typeofdata='textarea:12:100';
-
>editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?>
-
editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
+
>
+
societe_id)) { ?>
-
>editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?>
-
editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
+
>
+
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 39de2604a0d..7d17930cdc0 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -382,16 +382,16 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da if (! empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; - $form->select_date($date_start,"date_start",$usehm,$usehm,1,"addproduct"); + Form::select_date($date_start,"date_start",$usehm,$usehm,1,"addproduct"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date($date_end,"date_end",$usehm,$usehm,1,"addproduct"); + Form::select_date($date_end,"date_end",$usehm,$usehm,1,"addproduct"); } else { echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; - echo $form->select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); + echo Form::select_date($date_start,'date_start',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); echo ' '.$langs->trans('to').' '; - echo $form->select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); + echo Form::select_date($date_end,'date_end',empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?0:1,1,"addproduct",1,0,1); }; print '