Переглянути джерело

Merge branch 'develop' into 11.0_https

Alexandre SPANGARO 5 роки тому
батько
коміт
91b3bf76fd
100 змінених файлів з 280 додано та 219 видалено
  1. 1 1
      COPYRIGHT
  2. 19 11
      README.md
  3. 3 0
      build/docker/README.md
  4. 0 8
      build/exe/doliwamp/README
  5. 3 0
      build/exe/doliwamp/README.md
  6. BIN
      dev/initdemo/documents_demo/ticket/TS1909-0002/dolibarr_screenshot1_300x188.png
  7. BIN
      dev/initdemo/documents_demo/ticket/TS1909-0002/thumbs/dolibarr_screenshot1_300x188_mini.png
  8. BIN
      dev/initdemo/documents_demo/ticket/TS1909-0002/thumbs/dolibarr_screenshot1_300x188_small.png
  9. BIN
      dev/initdemo/documents_demo/users/0/1/thumbs/mariecurie_mini.jpg
  10. BIN
      dev/initdemo/documents_demo/users/0/1/thumbs/mariecurie_small.jpg
  11. BIN
      dev/initdemo/documents_demo/users/1/0/IMG_0013.jpg
  12. BIN
      dev/initdemo/documents_demo/users/1/0/thumbs/IMG_0013_mini.jpg
  13. BIN
      dev/initdemo/documents_demo/users/1/0/thumbs/IMG_0013_small.jpg
  14. BIN
      dev/initdemo/documents_demo/users/1/0/thumbs/alberteinstein_mini.jpg
  15. BIN
      dev/initdemo/documents_demo/users/1/0/thumbs/alberteinstein_small.jpg
  16. 0 0
      dev/initdemo/documents_demo/users/1/alberteinstein.jpg
  17. BIN
      dev/initdemo/documents_demo/users/1/thumbs/alberteinstein_mini.jpg
  18. BIN
      dev/initdemo/documents_demo/users/1/thumbs/alberteinstein_small.jpg
  19. 0 0
      dev/initdemo/documents_demo/users/10/mariecurie.jpg
  20. BIN
      dev/initdemo/documents_demo/users/10/thumbs/mariecurie_mini.jpg
  21. BIN
      dev/initdemo/documents_demo/users/10/thumbs/mariecurie_small.jpg
  22. BIN
      dev/initdemo/documents_demo/users/11/person4.jpeg
  23. BIN
      dev/initdemo/documents_demo/users/11/thumbs/person4_mini.jpeg
  24. BIN
      dev/initdemo/documents_demo/users/11/thumbs/person4_small.jpeg
  25. BIN
      dev/initdemo/documents_demo/users/12/person6.jpeg
  26. BIN
      dev/initdemo/documents_demo/users/12/thumbs/person6_mini.jpeg
  27. BIN
      dev/initdemo/documents_demo/users/12/thumbs/person6_small.jpeg
  28. BIN
      dev/initdemo/documents_demo/users/13/person7.jpeg
  29. BIN
      dev/initdemo/documents_demo/users/13/thumbs/person7_mini.jpeg
  30. BIN
      dev/initdemo/documents_demo/users/13/thumbs/person7_small.jpeg
  31. BIN
      dev/initdemo/documents_demo/users/14/person3.jpeg
  32. BIN
      dev/initdemo/documents_demo/users/14/thumbs/person3_mini.jpeg
  33. BIN
      dev/initdemo/documents_demo/users/14/thumbs/person3_small.jpeg
  34. BIN
      dev/initdemo/documents_demo/users/16/person1.jpeg
  35. BIN
      dev/initdemo/documents_demo/users/16/thumbs/person1_mini.jpeg
  36. BIN
      dev/initdemo/documents_demo/users/16/thumbs/person1_small.jpeg
  37. BIN
      dev/initdemo/documents_demo/users/17/person5.jpeg
  38. BIN
      dev/initdemo/documents_demo/users/17/thumbs/person5_mini.jpeg
  39. BIN
      dev/initdemo/documents_demo/users/17/thumbs/person5_small.jpeg
  40. 0 0
      dev/initdemo/documents_demo/users/18/ldestailleur_200x200.jpg
  41. BIN
      dev/initdemo/documents_demo/users/18/thumbs/ldestailleur_200x200_mini.jpg
  42. BIN
      dev/initdemo/documents_demo/users/18/thumbs/ldestailleur_200x200_small.jpg
  43. BIN
      dev/initdemo/documents_demo/users/19/person2.jpeg
  44. BIN
      dev/initdemo/documents_demo/users/19/thumbs/person2_mini.jpeg
  45. BIN
      dev/initdemo/documents_demo/users/19/thumbs/person2_small.jpeg
  46. BIN
      dev/initdemo/documents_demo/users/2/0/daviddoe.png
  47. BIN
      dev/initdemo/documents_demo/users/2/0/thumbs/daviddoe_mini.png
  48. BIN
      dev/initdemo/documents_demo/users/2/0/thumbs/daviddoe_small.png
  49. BIN
      dev/initdemo/documents_demo/users/2/person9.jpeg
  50. BIN
      dev/initdemo/documents_demo/users/2/thumbs/person9_mini.jpeg
  51. BIN
      dev/initdemo/documents_demo/users/2/thumbs/person9_small.jpeg
  52. 0 0
      dev/initdemo/documents_demo/users/3/pierrecurie.jpg
  53. BIN
      dev/initdemo/documents_demo/users/3/thumbs/pierrecurie_mini.jpg
  54. 0 0
      dev/initdemo/documents_demo/users/3/thumbs/pierrecurie_small.jpg
  55. BIN
      dev/initdemo/documents_demo/users/4/person8.jpeg
  56. BIN
      dev/initdemo/documents_demo/users/4/thumbs/person8_mini.jpeg
  57. BIN
      dev/initdemo/documents_demo/users/4/thumbs/person8_small.jpeg
  58. BIN
      dev/initdemo/documents_demo/users/8/1/thumbs/ldestailleur_200x200_small.jpg
  59. BIN
      dev/initdemo/documents_demo/users/9/1/eldy_php.jpg
  60. BIN
      dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_mini.jpg
  61. BIN
      dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_small.jpg
  62. 1 1
      dev/initdemo/initdemo.sh
  63. 5 4
      dev/initdemo/mysqldump_dolibarr_10.0.0.sql
  64. 1 1
      dev/initdemo/savedemo.sh
  65. 1 13
      htdocs/accountancy/customer/lines.php
  66. 1 13
      htdocs/accountancy/customer/list.php
  67. 1 13
      htdocs/accountancy/expensereport/lines.php
  68. 2 14
      htdocs/accountancy/expensereport/list.php
  69. 1 13
      htdocs/accountancy/supplier/lines.php
  70. 1 13
      htdocs/accountancy/supplier/list.php
  71. 7 7
      htdocs/adherents/admin/adherent.php
  72. 3 3
      htdocs/adherents/admin/adherent_emails.php
  73. 2 3
      htdocs/adherents/admin/website.php
  74. 2 3
      htdocs/adherents/canvas/actions_adherentcard_common.class.php
  75. 10 10
      htdocs/adherents/card.php
  76. 4 4
      htdocs/adherents/cartes/carte.php
  77. 2 2
      htdocs/adherents/class/adherent.class.php
  78. 2 2
      htdocs/adherents/class/adherentstats.class.php
  79. 1 2
      htdocs/adherents/htpasswd.php
  80. 2 1
      htdocs/adherents/list.php
  81. 2 2
      htdocs/adherents/subscription.php
  82. 3 3
      htdocs/adherents/subscription/card.php
  83. 2 1
      htdocs/adherents/subscription/list.php
  84. 1 1
      htdocs/adherents/type.php
  85. 27 27
      htdocs/admin/accountant.php
  86. 2 2
      htdocs/admin/agenda_reminder.php
  87. 1 1
      htdocs/admin/bank.php
  88. 8 6
      htdocs/admin/boxes.php
  89. 1 2
      htdocs/admin/chequereceipts.php
  90. 1 1
      htdocs/admin/delais.php
  91. 9 9
      htdocs/admin/dict.php
  92. 6 4
      htdocs/admin/emailcollector_card.php
  93. 4 2
      htdocs/admin/emailcollector_list.php
  94. 1 1
      htdocs/admin/expensereport.php
  95. 0 2
      htdocs/admin/expensereport_extrafields.php
  96. 118 0
      htdocs/admin/holiday_extrafields.php
  97. 4 2
      htdocs/admin/ihm.php
  98. 1 1
      htdocs/admin/index.php
  99. 11 9
      htdocs/admin/limits.php
  100. 3 1
      htdocs/admin/mails_senderprofile_list.php

+ 1 - 1
COPYRIGHT

@@ -37,6 +37,7 @@ TCPDF                  6.2.25        LGPL-3+                     Yes
 TCPDI                  1.0.0         LGPL-3+ / Apache 2.0        Yes             FPDI replacement
 
 JS libraries:
+Ace                    1.4.6         BSD                         Yes             JS library to get code syntaxique coloration in a textarea.    
 jQuery                 3.4.1         MIT License                 Yes             JS library
 jQuery UI              1.12.1        GPL and MIT License         Yes             JS library plugin UI
 jQuery select2         4.0.5         GPL and Apache License      Yes             JS library plugin for sexier multiselect
@@ -54,7 +55,6 @@ jQuery Timepicker      1.1.0         GPL and MIT License         Yes
 jsGanttImproved        1.7.5.4       BSD License                 Yes             JS library (to build Gantt reports)
 JsTimezoneDetect       1.0.6         MIT License                 Yes             JS library to detect user timezone
 SwaggerUI			   2.0.24		 GPL-2+                      Yes             JS library to offer the REST API explorer
-Ace                    1.2.8         BSD                         Yes             JS library to get code syntaxique coloration in a textarea.    
 
 Image libraries:
 Octicons               8.1           MIT                         Yes

+ 19 - 11
README.md

@@ -74,6 +74,7 @@ If you don't have time to install it yourself, you can try some commercial 'read
 
 ## UPGRADING
 
+- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr 
 - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
 - At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process.
   If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
@@ -90,18 +91,19 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
 
 ### Main application/modules (all optional)
 
-- Customers, Prospects and/or Suppliers directory
+- Customers, Prospects (Leads) and/or Suppliers directory
 - Products and/or Services catalog
 - Commercial proposals management
 - Customer and Supplier Orders management
 - Invoices and payment management
 - Standing orders management (European SEPA)
 - Bank accounts management
+- Accounting management
 - Shared calendar/agenda (with ical and vcal export for third party tools integration)
 - Opportunities and/or project management
 - Projects management
 - Contracts management
-- Stock management
+- Warehouse/Stock management
 - Shipping management
 - Interventions management
 - Employee's leave requests management
@@ -111,7 +113,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
 - Foundations members management
 - Mass emailing
 - Surveys
-- Point of Sale
+- Point of Sale (POS) 
 - …
 
 ### Other application/modules
@@ -131,15 +133,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
 
 ### Other general features
 
-- Localization in most major languages.
-- Multi-Users and groups with finely grained rights.
-- Multi-currency.
-- Multi-company by adding of an external module.
-- Very user friendly and easy to use.
+- Localization in most major languages
+- Multi-Users and groups with finely grained rights
+- Multi-currency
+- Multi-company by adding of an external module
+- Very user friendly and easy to use
+- customizable Dashboard
 - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
-- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
-- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
-- APIs.
+
+- APIs
 - An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
 - Support a lot of country specific features:
     - Spanish Tax RE and ISPF
@@ -153,6 +155,12 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
 - PDF or ODT generation for invoice, proposals, orders...
 - …
 
+### System Environment / Requirements
+
+- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
+- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
+
+
 ### Extending
 
 Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).

+ 3 - 0
build/docker/README.md

@@ -23,3 +23,6 @@ The URL to go to the Dolibarr is :
 The URL to go to PhpMyAdmin is (login/password is root/root) :
 
         http://0.0.0.0:8080
+
+Setup the database connection during the installation process, please use mariad
+b (name of the database container) as database host.

+ 0 - 8
build/exe/doliwamp/README

@@ -1,8 +0,0 @@
-README (English)
-##################################################
-DOLIWAMP Package tools
-##################################################
-
-This directory contains files used by makepack-dolibarr.pl
-script to build the all-in-on .EXE package DoliWamp, ready
-to be distributed (for Windows).

+ 3 - 0
build/exe/doliwamp/README.md

@@ -3,5 +3,8 @@
 DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP). 
 It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also all prerequisites like the web server, and the database in one auto-install process.
 
+This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
+to be distributed (for Windows).
+
 If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).
 

BIN
dev/initdemo/documents_demo/ticket/TS1909-0002/dolibarr_screenshot1_300x188.png


BIN
dev/initdemo/documents_demo/ticket/TS1909-0002/thumbs/dolibarr_screenshot1_300x188_mini.png


BIN
dev/initdemo/documents_demo/ticket/TS1909-0002/thumbs/dolibarr_screenshot1_300x188_small.png


BIN
dev/initdemo/documents_demo/users/0/1/thumbs/mariecurie_mini.jpg


BIN
dev/initdemo/documents_demo/users/0/1/thumbs/mariecurie_small.jpg


BIN
dev/initdemo/documents_demo/users/1/0/IMG_0013.jpg


BIN
dev/initdemo/documents_demo/users/1/0/thumbs/IMG_0013_mini.jpg


BIN
dev/initdemo/documents_demo/users/1/0/thumbs/IMG_0013_small.jpg


BIN
dev/initdemo/documents_demo/users/1/0/thumbs/alberteinstein_mini.jpg


BIN
dev/initdemo/documents_demo/users/1/0/thumbs/alberteinstein_small.jpg


+ 0 - 0
dev/initdemo/documents_demo/users/1/0/alberteinstein.jpg → dev/initdemo/documents_demo/users/1/alberteinstein.jpg


BIN
dev/initdemo/documents_demo/users/1/thumbs/alberteinstein_mini.jpg


BIN
dev/initdemo/documents_demo/users/1/thumbs/alberteinstein_small.jpg


+ 0 - 0
dev/initdemo/documents_demo/users/0/1/mariecurie.jpg → dev/initdemo/documents_demo/users/10/mariecurie.jpg


BIN
dev/initdemo/documents_demo/users/10/thumbs/mariecurie_mini.jpg


BIN
dev/initdemo/documents_demo/users/10/thumbs/mariecurie_small.jpg


BIN
dev/initdemo/documents_demo/users/11/person4.jpeg


BIN
dev/initdemo/documents_demo/users/11/thumbs/person4_mini.jpeg


BIN
dev/initdemo/documents_demo/users/11/thumbs/person4_small.jpeg


BIN
dev/initdemo/documents_demo/users/12/person6.jpeg


BIN
dev/initdemo/documents_demo/users/12/thumbs/person6_mini.jpeg


BIN
dev/initdemo/documents_demo/users/12/thumbs/person6_small.jpeg


BIN
dev/initdemo/documents_demo/users/13/person7.jpeg


BIN
dev/initdemo/documents_demo/users/13/thumbs/person7_mini.jpeg


BIN
dev/initdemo/documents_demo/users/13/thumbs/person7_small.jpeg


BIN
dev/initdemo/documents_demo/users/14/person3.jpeg


BIN
dev/initdemo/documents_demo/users/14/thumbs/person3_mini.jpeg


BIN
dev/initdemo/documents_demo/users/14/thumbs/person3_small.jpeg


BIN
dev/initdemo/documents_demo/users/16/person1.jpeg


BIN
dev/initdemo/documents_demo/users/16/thumbs/person1_mini.jpeg


BIN
dev/initdemo/documents_demo/users/16/thumbs/person1_small.jpeg


BIN
dev/initdemo/documents_demo/users/17/person5.jpeg


BIN
dev/initdemo/documents_demo/users/17/thumbs/person5_mini.jpeg


BIN
dev/initdemo/documents_demo/users/17/thumbs/person5_small.jpeg


+ 0 - 0
dev/initdemo/documents_demo/users/8/1/ldestailleur_200x200.jpg → dev/initdemo/documents_demo/users/18/ldestailleur_200x200.jpg


BIN
dev/initdemo/documents_demo/users/8/1/thumbs/ldestailleur_200x200_mini.jpg → dev/initdemo/documents_demo/users/18/thumbs/ldestailleur_200x200_mini.jpg


BIN
dev/initdemo/documents_demo/users/18/thumbs/ldestailleur_200x200_small.jpg


BIN
dev/initdemo/documents_demo/users/19/person2.jpeg


BIN
dev/initdemo/documents_demo/users/19/thumbs/person2_mini.jpeg


BIN
dev/initdemo/documents_demo/users/19/thumbs/person2_small.jpeg


BIN
dev/initdemo/documents_demo/users/2/0/daviddoe.png


BIN
dev/initdemo/documents_demo/users/2/0/thumbs/daviddoe_mini.png


BIN
dev/initdemo/documents_demo/users/2/0/thumbs/daviddoe_small.png


BIN
dev/initdemo/documents_demo/users/2/person9.jpeg


BIN
dev/initdemo/documents_demo/users/2/thumbs/person9_mini.jpeg


BIN
dev/initdemo/documents_demo/users/2/thumbs/person9_small.jpeg


+ 0 - 0
dev/initdemo/documents_demo/users/3/0/pierrecurie.jpg → dev/initdemo/documents_demo/users/3/pierrecurie.jpg


BIN
dev/initdemo/documents_demo/users/3/0/thumbs/pierrecurie_mini.jpg → dev/initdemo/documents_demo/users/3/thumbs/pierrecurie_mini.jpg


+ 0 - 0
dev/initdemo/documents_demo/users/3/0/thumbs/pierrecurie_small.jpg → dev/initdemo/documents_demo/users/3/thumbs/pierrecurie_small.jpg


BIN
dev/initdemo/documents_demo/users/4/person8.jpeg


BIN
dev/initdemo/documents_demo/users/4/thumbs/person8_mini.jpeg


BIN
dev/initdemo/documents_demo/users/4/thumbs/person8_small.jpeg


BIN
dev/initdemo/documents_demo/users/8/1/thumbs/ldestailleur_200x200_small.jpg


BIN
dev/initdemo/documents_demo/users/9/1/eldy_php.jpg


BIN
dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_mini.jpg


BIN
dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_small.jpg


+ 1 - 1
dev/initdemo/initdemo.sh

@@ -50,7 +50,7 @@ fi
 # ----------------------------- if no params on command line
 if [ "x$passwd" = "x" ]
 then
-	export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1`
+	export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
 	export dumpfile=`basename $dumpfile`
 
 	# ----------------------------- input file

Різницю між файлами не показано, бо вона завелика
+ 5 - 4
dev/initdemo/mysqldump_dolibarr_10.0.0.sql


+ 1 - 1
dev/initdemo/savedemo.sh

@@ -38,7 +38,7 @@ passwd=$5;
 # ----------------------------- if no params on command line
 if [ "x$passwd" = "x" ]
 then
-	export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1`
+	export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
 	export dumpfile=`basename $dumpfile`
 
 	# ----------------------------- input file

+ 1 - 13
htdocs/accountancy/customer/lines.php

@@ -215,19 +215,7 @@ if (strlen(trim($search_account))) {
 if (strlen(trim($search_vat))) {
 	$sql .= natural_search("fd.tva_tx", price2num($search_vat), 1);
 }
-if ($search_month > 0)
-{
-	if ($search_year > 0 && empty($search_day))
-		$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'";
-		elseif ($search_year > 0 && ! empty($search_day))
-			$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
-			else
-				$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
-}
-elseif ($search_year > 0)
-{
-	$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'";
-}
+$sql.=dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year);
 if (strlen(trim($search_country))) {
 	$arrayofcode = getCountriesInEEC();
 	$country_code_in_EEC = $country_code_in_EEC_without_me = '';

+ 1 - 13
htdocs/accountancy/customer/list.php

@@ -251,19 +251,7 @@ if (strlen(trim($search_account))) {
 if (strlen(trim($search_vat))) {
     $sql .= natural_search("l.tva_tx", $search_vat, 1);
 }
-if ($search_month > 0)
-{
-	if ($search_year > 0 && empty($search_day))
-		$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'";
-		elseif ($search_year > 0 && ! empty($search_day))
-			$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
-			else
-				$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
-}
-elseif ($search_year > 0)
-{
-	$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'";
-}
+$sql.=dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year);
 if (strlen(trim($search_country))) {
 	$arrayofcode = getCountriesInEEC();
 	$country_code_in_EEC = $country_code_in_EEC_without_me = '';

+ 1 - 13
htdocs/accountancy/expensereport/lines.php

@@ -186,19 +186,7 @@ if (strlen(trim($search_account))) {
 if (strlen(trim($search_vat))) {
 	$sql .= natural_search("erd.tva_tx", price2num($search_vat), 1);
 }
-if ($search_month > 0)
-{
-	if ($search_year > 0 && empty($search_day))
-		$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'";
-		elseif ($search_year > 0 && ! empty($search_day))
-			$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
-			else
-				$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
-}
-elseif ($search_year > 0)
-{
-	$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'";
-}
+$sql.=dolSqlDateFilter('erd.date', $search_day, $search_month, $search_year);
 $sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")";  // We don't share object for accountancy
 
 $sql .= $db->order($sortfield, $sortorder);

+ 2 - 14
htdocs/accountancy/expensereport/list.php

@@ -215,20 +215,8 @@ if (strlen(trim($search_account))) {
 if (strlen(trim($search_vat))) {
     $sql .= natural_search("erd.tva_tx", $search_vat, 1);
 }
-if ($search_month > 0)
-{
-	if ($search_year > 0 && empty($search_day))
-		$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'";
-		elseif ($search_year > 0 && ! empty($search_day))
-			$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
-			else
-				$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
-}
-elseif ($search_year > 0)
-{
-	$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'";
-}
-$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")";  // We don't share object for accountancy
+$sql.=dolSqlDateFilter('erd.date', $search_day, $search_month, $search_year);
+$sql.= " AND er.entity IN (" . getEntity('expensereport', 0) . ")";  // We don't share object for accountancy
 
 $sql .= $db->order($sortfield, $sortorder);
 

+ 1 - 13
htdocs/accountancy/supplier/lines.php

@@ -210,19 +210,7 @@ if (strlen(trim($search_account))) {
 if (strlen(trim($search_vat))) {
 	$sql .= natural_search("l.tva_tx", price2num($search_vat), 1);
 }
-if ($search_month > 0)
-{
-	if ($search_year > 0 && empty($search_day))
-		$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'";
-		elseif ($search_year > 0 && ! empty($search_day))
-			$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
-			else
-				$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
-}
-elseif ($search_year > 0)
-{
-	$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'";
-}
+$sql.=dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year);
 if (strlen(trim($search_country))) {
 	$arrayofcode = getCountriesInEEC();
 	$country_code_in_EEC = $country_code_in_EEC_without_me = '';

+ 1 - 13
htdocs/accountancy/supplier/list.php

@@ -252,19 +252,7 @@ if (strlen(trim($search_account))) {
 if (strlen(trim($search_vat))) {
     $sql .= natural_search("l.tva_tx", price2num($search_vat), 1);
 }
-if ($search_month > 0)
-{
-	if ($search_year > 0 && empty($search_day))
-		$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'";
-		elseif ($search_year > 0 && ! empty($search_day))
-			$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
-			else
-				$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
-}
-elseif ($search_year > 0)
-{
-	$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'";
-}
+$sql.=dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year);
 if (strlen(trim($search_country))) {
 	$arrayofcode = getCountriesInEEC();
 	$country_code_in_EEC = $country_code_in_EEC_without_me = '';

+ 7 - 7
htdocs/adherents/admin/adherent.php

@@ -79,7 +79,7 @@ if ($action == 'updateall')
     }
 }
 
-// Action mise a jour ou ajout d'une constante
+// Action to update or add a constant
 if ($action == 'update' || $action == 'add')
 {
 	$constname=GETPOST('constname', 'alpha');
@@ -108,7 +108,7 @@ if ($action == 'update' || $action == 'add')
 	}
 }
 
-// Action activation d'un sous module du module adherent
+// Action to enable of a submodule of the adherent module
 if ($action == 'set')
 {
     $result=dolibarr_set_const($db, GETPOST('name', 'alpha'), GETPOST('value'), '', 0, '', $conf->entity);
@@ -118,7 +118,7 @@ if ($action == 'set')
     }
 }
 
-// Action desactivation d'un sous module du module adherent
+// Action to disable a submodule of the adherent module
 if ($action == 'unset')
 {
     $result=dolibarr_del_const($db, GETPOST('name', 'alpha'), $conf->entity);
@@ -220,9 +220,9 @@ if ($conf->facture->enabled)
 
 print '</table>';
 
-print '<center>';
+print '<div class="center">';
 print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
-print '</center>';
+print '</div>';
 
 print '</form>';
 
@@ -230,7 +230,7 @@ print '<br>';
 
 
 /*
- * Edition info modele document
+ * Edit info of model document
  */
 $constantes=array(
 		'ADHERENT_CARD_TYPE',
@@ -254,7 +254,7 @@ print '<br>';
 
 
 /*
- * Edition info modele document
+ * Edit info of model document
  */
 $constantes=array('ADHERENT_ETIQUETTE_TYPE','ADHERENT_ETIQUETTE_TEXT');
 

+ 3 - 3
htdocs/adherents/admin/adherent_emails.php

@@ -82,7 +82,7 @@ if ($action == 'updateall')
     }
 }
 
-// Action mise a jour ou ajout d'une constante
+// Action to update or add a constant
 if ($action == 'update' || $action == 'add')
 {
 	$constlineid = GETPOST('rowid', 'int');
@@ -108,7 +108,7 @@ if ($action == 'update' || $action == 'add')
 	}
 }
 
-// Action activation d'un sous module du module adherent
+// Action to enable a submodule of the adherent module
 if ($action == 'set')
 {
     $result=dolibarr_set_const($db, GETPOST('name', 'alpha'), GETPOST('value'), '', 0, '', $conf->entity);
@@ -118,7 +118,7 @@ if ($action == 'set')
     }
 }
 
-// Action desactivation d'un sous module du module adherent
+// Action to disable a submodule of the adherent module
 if ($action == 'unset')
 {
     $result=dolibarr_del_const($db, GETPOST('name', 'alpha'), $conf->entity);

+ 2 - 3
htdocs/adherents/admin/website.php

@@ -22,7 +22,6 @@
  *     	\file       htdocs/adherents/admin/website.php
  *		\ingroup    member
  *		\brief      File of main public page for member module
- *		\author	    Laurent Destailleur
  */
 
 require '../../main.inc.php';
@@ -211,9 +210,9 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
 
 	print '</table>';
 
-	print '<center>';
+	print '<div class="center">';
 	print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
-	print '</center>';
+	print '</div>';
 }
 
 

+ 2 - 3
htdocs/adherents/canvas/actions_adherentcard_common.class.php

@@ -19,11 +19,11 @@
 /**
  *	\file       htdocs/adherents/canvas/actions_adherentcard_common.class.php
  *	\ingroup    adherent
- *	\brief      Fichier de la classe Adherent card controller (common)
+ *	\brief      File of class Thirdparty member card controller (common)
  */
 
 /**
- *	Class to maage members using default canvas
+ *	Class to manage members using default canvas
  */
 abstract class ActionsAdherentCardCommon
 {
@@ -170,7 +170,6 @@ abstract class ActionsAdherentCardCommon
 				$this->tpl['nb_emailing'] = $this->object->getNbOfEMailings();
 			}
 
-
         	// Dolibarr user
         	if ($this->object->user_id)
 			{

+ 10 - 10
htdocs/adherents/card.php

@@ -638,7 +638,7 @@ if (empty($reshook))
 				// Set output language
 				$outputlangs = new Translate('', $conf);
 				$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
-				// Load traductions files requiredby by page
+				// Load traductions files required by page
 				$outputlangs->loadLangs(array("main", "members"));
 				// Get email content from template
 				$arraydefaultmessage=null;
@@ -719,7 +719,7 @@ if (empty($reshook))
 					// Set output language
 					$outputlangs = new Translate('', $conf);
 					$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
-					// Load traductions files requiredby by page
+					// Load traductions files required by page
 					$outputlangs->loadLangs(array("main", "members"));
 					// Get email content from template
 					$arraydefaultmessage=null;
@@ -1039,8 +1039,8 @@ else
             print '<tr><td>'.$langs->trans("LinkedIn").'</td><td><input type="text" name="member_linkedin" size="40" value="'.(GETPOST('member_linkedin', 'alpha')?GETPOST('member_linkedin', 'alpha'):$object->linkedin).'"></td></tr>';
         }
 
-	    // Birthday
-		print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
+	    // Birth Date
+		print "<tr><td>".$langs->trans("DateToBirth")."</td><td>\n";
 		print $form->selectDate(($object->birth ? $object->birth : -1), 'birth', '', '', 1, 'formsoc');
 		print "</td></tr>\n";
 
@@ -1308,8 +1308,8 @@ else
             print '<tr><td>'.$langs->trans("LinkedIn").'</td><td><input type="text" name="linkedin" class="minwidth100" value="'.(isset($_POST["linkedin"])?GETPOST("linkedin"):$object->linkedin).'"></td></tr>';
         }
 
-	    // Birthday
-		print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
+	    // Birth Date
+		print "<tr><td>".$langs->trans("DateToBirth")."</td><td>\n";
 		print $form->selectDate(($object->birth ? $object->birth : -1), 'birth', '', '', 1, 'formsoc');
 		print "</td></tr>\n";
 
@@ -1483,7 +1483,7 @@ else
 			// Set output language
 			$outputlangs = new Translate('', $conf);
 			$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
-			// Load traductions files requiredby by page
+			// Load traductions files required by page
 			$outputlangs->loadLangs(array("main", "members"));
 			// Get email content from template
 			$arraydefaultmessage=null;
@@ -1544,7 +1544,7 @@ else
 			// Set output language
 			$outputlangs = new Translate('', $conf);
 			$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
-			// Load traductions files requiredby by page
+			// Load traductions files required by page
 			$outputlangs->loadLangs(array("main", "members"));
 			// Get email content from template
 			$arraydefaultmessage=null;
@@ -1750,8 +1750,8 @@ else
 
         print '<table class="border tableforfield tableforfield" width="100%">';
 
-		// Birthday
-		print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth, 'day').'</td></tr>';
+		// Birth Date
+		print '<tr><td class="titlefield">'.$langs->trans("DateToBirth").'</td><td class="valeur">'.dol_print_date($object->birth, 'day').'</td></tr>';
 
 		// Public
 		print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';

+ 4 - 4
htdocs/adherents/cartes/carte.php

@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php';
 
 $langs->loadLangs(array("members","errors"));
 
-// Choix de l'annee d'impression ou annee courante.
+// Choice of printing year or current year.
 $now = dol_now();
 $year=dol_print_date($now, '%Y');
 $month=dol_print_date($now, '%m');
@@ -47,8 +47,8 @@ $adherentstatic=new Adherent($db);
 $object=new Adherent($db);
 
 $extrafields = new ExtraFields($db);
-// fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('adherent');
+// Fetch optionals attributes and labels
+$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
 
 
 /*
@@ -97,7 +97,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
     		$adherentstatic->lastname=$objp->lastname;
     		$adherentstatic->firstname=$objp->firstname;
 
-            // format extrafiled so they can be parsed in function complete_substitutions_array
+            // Format extrafield so they can be parsed in function complete_substitutions_array
     		if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']))
             {
                 $adherentstatic->array_options = array();

+ 2 - 2
htdocs/adherents/class/adherent.class.php

@@ -2688,12 +2688,12 @@ class Adherent extends CommonObject
 		// Process
 		foreach ($to_del as $del) {
 			if ($c->fetch($del) > 0) {
-				$c->del_type($this, 'member');
+				$c->del_type($this, Categorie::TYPE_MEMBER);
 			}
 		}
 		foreach ($to_add as $add) {
 			if ($c->fetch($add) > 0) {
-				$c->add_type($this, 'member');
+				$c->add_type($this, Categorie::TYPE_MEMBER);
 			}
 		}
 

+ 2 - 2
htdocs/adherents/class/adherentstats.class.php

@@ -83,7 +83,7 @@ class AdherentStats extends Stats
 	 * Return the number of proposition by month for a given year
 	 *
      * @param   int		$year       Year
-     *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
+     *	@param	int		$format		0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
      * @return	array				Array of nb each month
 	 */
 	public function getNbByMonth($year, $format = 0)
@@ -124,7 +124,7 @@ class AdherentStats extends Stats
 	 * Return the number of subscriptions by month for a given year
 	 *
      * @param   int		$year       Year
-     * @param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
+     * @param	int		$format		0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
      * @return	array				Array of amount each month
 	 */
 	public function getAmountByMonth($year, $format = 0)

+ 1 - 2
htdocs/adherents/htpasswd.php

@@ -20,8 +20,7 @@
 /**
  *  	\file 		htdocs/adherents/htpasswd.php
  *      \ingroup    member
- *      \brief      Page d'export htpasswd du fichier des adherents
- *      \author     Rodolphe Quiedeville
+ *      \brief      Export page htpasswd of the membership file
  */
 
 require '../main.inc.php';

+ 2 - 1
htdocs/adherents/list.php

@@ -88,7 +88,8 @@ $hookmanager->initHooks(array('memberlist'));
 $extrafields = new ExtraFields($db);
 
 // fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('adherent');
+$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
+
 $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
 
 // List of fields to search into when doing a "search in all"

+ 2 - 2
htdocs/adherents/subscription.php

@@ -360,7 +360,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
             	// Set output language
             	$outputlangs = new Translate('', $conf);
             	$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
-            	// Load traductions files requiredby by page
+            	// Load traductions files required by page
             	$outputlangs->loadLangs(array("main", "members"));
 
             	// Get email content from template
@@ -1093,7 +1093,7 @@ if ($rowid > 0)
             // Set output language
             $outputlangs = new Translate('', $conf);
             $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
-            // Load traductions files requiredby by page
+            // Load traductions files required by page
             $outputlangs->loadLangs(array("main", "members"));
             // Get email content from template
             $arraydefaultmessage=null;

+ 3 - 3
htdocs/adherents/subscription/card.php

@@ -68,7 +68,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';		// Must be include,
 
 if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $cancel)
 {
-	// Charge objet actuel
+	// Load current object
 	$result=$object->fetch($rowid);
 	if ($result > 0)
 	{
@@ -101,7 +101,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $canc
 
 		if (! $errmsg)
 		{
-			// Modifie valeures
+			// Modify values
 			$object->dateh=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
 			$object->datef=dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']);
 			$object->fk_type=$_POST["typeid"];
@@ -389,7 +389,7 @@ if ($rowid && $action != 'edit')
 		}
 	}
 
-    // Supprimer
+    // Delete
     if ($user->rights->adherent->cotisation->creer)
     {
         print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id."&action=delete\">".$langs->trans("Delete")."</a></div>\n";

+ 2 - 1
htdocs/adherents/subscription/list.php

@@ -68,7 +68,8 @@ $hookmanager->initHooks(array('subscriptionlist'));
 $extrafields = new ExtraFields($db);
 
 // fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('subscription');
+$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
+
 $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
 
 // List of fields to search into when doing a "search in all"

+ 1 - 1
htdocs/adherents/type.php

@@ -73,7 +73,7 @@ $object = new AdherentType($db);
 $extrafields = new ExtraFields($db);
 
 // fetch optionals attributes and labels
-$extralabels=$extrafields->fetch_name_optionals_label('adherent_type');
+$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
 
 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
 {

+ 27 - 27
htdocs/admin/accountant.php

@@ -112,56 +112,56 @@ if ($action == 'edit' || $action == 'updateedit')
 	print '<input type="hidden" name="action" value="update">';
 
 	print '<table class="noborder" width="100%">';
-	print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
+	print '<tr class="oddeven liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
 
 	// Name
-	print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
+	print '<tr><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
 	print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_NAME?$conf->global->MAIN_INFO_ACCOUNTANT_NAME: GETPOST("nom", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
 
 	// Address
-	print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
+	print '<tr><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
 	print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS?$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS: GETPOST("address", 'nohtml')) . '</textarea></td></tr>'."\n";
 
-	print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
+	print '<tr><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
 	print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_ZIP?$conf->global->MAIN_INFO_ACCOUNTANT_ZIP: GETPOST("zipcode", 'alpha')) . '"></td></tr>'."\n";
 
-	print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
+	print '<tr><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
 	print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_TOWN?$conf->global->MAIN_INFO_ACCOUNTANT_TOWN: GETPOST("town", 'nohtml')) . '"></td></tr>'."\n";
 
 	// Country
-	print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
+	print '<tr><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
 	//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2);    // By default, country of localization
 	print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
 	if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
 	print '</td></tr>'."\n";
 
-	print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
+	print '<tr><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
 	$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id');
 	print '</td></tr>'."\n";
 
-	print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
+	print '<tr><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
 	print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_PHONE . '"></td></tr>';
 	print '</td></tr>'."\n";
 
-	print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
+	print '<tr><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
 	print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_FAX . '"></td></tr>';
 	print '</td></tr>'."\n";
 
-	print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
+	print '<tr><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
 	print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_MAIL . '"></td></tr>';
 	print '</td></tr>'."\n";
 
 	// Web
-	print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
+	print '<tr><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
 	print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_ACCOUNTANT_WEB . '"></td></tr>';
 	print '</td></tr>'."\n";
 
 	// Code
-	print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
+	print '<tr><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
 	print '<input name="code" id="code" class="minwidth100" value="'. ($conf->global->MAIN_INFO_ACCOUNTANT_CODE?$conf->global->MAIN_INFO_ACCOUNTANT_CODE: GETPOST("code", 'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
 
 	// Note
-	print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
+	print '<tr><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
 	print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note', 'none') ? GETPOST('note', 'none') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>';
 	print '</td></tr>';
 
@@ -189,24 +189,24 @@ else
 
 	print '<div class="div-table-responsive-no-min">';
 	print '<table class="noborder" width="100%">';
-	print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
+	print '<tr class="oddeven liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
 
 
-	print '<tr class="oddeven"><td class="titlefield wordbreak">'.$langs->trans("CompanyName").'</td><td>';
+	print '<tr><td class="titlefield wordbreak">'.$langs->trans("CompanyName").'</td><td>';
 	print $conf->global->MAIN_INFO_ACCOUNTANT_NAME;
 	print '</td></tr>';
 
 
-	print '<tr class="oddeven"><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '</td></tr>';
+	print '<tr><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '</td></tr>';
 
 
-	print '<tr class="oddeven"><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '</td></tr>';
+	print '<tr><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '</td></tr>';
 
 
-	print '<tr class="oddeven"><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '</td></tr>';
+	print '<tr><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '</td></tr>';
 
 
-	print '<tr class="oddeven"><td>'.$langs->trans("CompanyCountry").'</td><td>';
+	print '<tr><td>'.$langs->trans("CompanyCountry").'</td><td>';
 	if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY))
 	{
 		$code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2);
@@ -217,23 +217,23 @@ else
 	print '</td></tr>';
 
 
-	if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr class="oddeven"><td>'.$langs->trans("Region-State").'</td><td>';
-	else print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>';
+	if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr><td>'.$langs->trans("Region-State").'</td><td>';
+	else print '<tr><td>'.$langs->trans("State").'</td><td>';
 	if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
 	else print '&nbsp;';
 	print '</td></tr>';
 
-	print '<tr class="oddeven"><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '</td></tr>';
+	print '<tr><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '</td></tr>';
 
-	print '<tr class="oddeven"><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '</td></tr>';
+	print '<tr><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '</td></tr>';
 
-	print '<tr class="oddeven"><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '</td></tr>';
+	print '<tr><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '</td></tr>';
 
-	print '<tr class="oddeven"><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '</td></tr>';
+	print '<tr><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '</td></tr>';
 
-	print '<tr class="oddeven"><td>'.$langs->trans("AccountantFileNumber").'</td><td>' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '</td></tr>';
+	print '<tr><td>'.$langs->trans("AccountantFileNumber").'</td><td>' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '</td></tr>';
 
-	print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '</td></tr>';
+	print '<tr><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '</td></tr>';
 
 	print '</table>';
 	print "</div>";

+ 2 - 2
htdocs/admin/agenda_reminder.php

@@ -148,8 +148,8 @@ elseif ($action == 'setdoc')
 {
 	if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity))
 	{
-		// La constante qui a ete lue en avant du nouveau set
-		// on passe donc par une variable pour avoir un affichage coherent
+		// The constant that has been read in front of the new set
+		// is therefore passed through a variable to have a coherent display
 		$conf->global->ACTION_EVENT_ADDON_PDF = $value;
 	}
 

+ 1 - 1
htdocs/admin/bank.php

@@ -49,7 +49,7 @@ $type = 'bankaccount';
  * Actions
  */
 
-//Order display of bank account
+// Order display of bank account
 if ($action == 'setbankorder') {
     if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0)
     {

+ 8 - 6
htdocs/admin/boxes.php

@@ -63,7 +63,7 @@ if ($action == 'add') {
             {
                 $pos = $boxid['pos'];
 
-                // Initialize distinct fkuser with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
+                // Initialize distinct fk_user with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
                 $distinctfkuser=array();
                 if (! $error)
                 {
@@ -225,8 +225,8 @@ print load_fiche_titre($langs->trans("Boxes"), '', 'title_setup');
 print $langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
 
 /*
- * Recherche des boites actives par defaut pour chaque position possible
- * On stocke les boites actives par defaut dans $boxes[position][id_boite]=1
+ * Search for the default active boxes for each possible position
+ * We store the active boxes by default in $boxes[position][id_boite]=1
  */
 
 $actives = array();
@@ -257,7 +257,7 @@ if ($resql)
 		array_push($actives, $obj->box_id);
 
 		if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) $decalage++;
-		// On renumerote l'ordre des boites si l'une d'elle est a ''
+		// We renumber the order of the boxes if one of them is in ''
 		// This occurs just after an insert.
 		if ($decalage)
 		{
@@ -268,7 +268,7 @@ if ($resql)
 
 	if ($decalage)
 	{
-	    // Si on a renumerote, on corrige champ box_order
+	    // If we have renumbered, we correct the field box_order
 		// This occurs just after an insert.
 		$sql = "SELECT box_order";
 		$sql.= " FROM ".MAIN_DB_PREFIX."boxes";
@@ -366,7 +366,7 @@ foreach($boxtoadd as $box)
     print '</td>'."\n";
     print '<td>' . $box->sourcefile . '</td>'."\n";
 
-    // Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position
+    // For each possible position, an activation link is displayed if the box is not already active for that position
     print '<td class="center">';
     print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n";
     print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n";
@@ -483,7 +483,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIV
 
 print '</table>';
 
+print '<br>';
 print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button"></div>';
+print '<br>';
 
 print '</form>';
 print "\n".'<!-- End Other Const -->'."\n";

+ 1 - 2
htdocs/admin/chequereceipts.php

@@ -91,7 +91,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
 }
 
 /*
- * view
+ * View
  */
 
 $dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
@@ -233,7 +233,6 @@ print '<br>';
 
 /*
  * Other options
- *
  */
 print load_fiche_titre($langs->trans("OtherOptions"), '', '');
 

+ 1 - 1
htdocs/admin/delais.php

@@ -222,7 +222,7 @@ if ($action == 'edit')
 else
 {
     /*
-     * Affichage des parametres
+     * Show parameters
      */
 
 	print '<table class="noborder" width="100%">';

+ 9 - 9
htdocs/admin/dict.php

@@ -251,7 +251,7 @@ $tabsqlsort[35]="c.label ASC";
 $tabsqlsort[36]="r.fk_c_exp_tax_cat ASC, r.range_ik ASC";
 $tabsqlsort[37]="r.unit_type ASC, r.scale ASC, r.code ASC";
 
-// Nom des champs en resultat de select pour affichage du dictionnaire
+// Field names in select result for dictionary display
 $tabfield=array();
 $tabfield[1] = "code,libelle,country";
 $tabfield[2] = "code,libelle,region_id,region,country";   // "code,libelle,region,country_code-country"
@@ -291,7 +291,7 @@ $tabfield[35]= "label";
 $tabfield[36]= "range_ik,fk_c_exp_tax_cat";
 $tabfield[37]= "code,label,short_label,unit_type,scale";
 
-// Nom des champs d'edition pour modification d'un enregistrement
+// Edit field names for editing a record
 $tabfieldvalue=array();
 $tabfieldvalue[1] = "code,libelle,country";
 $tabfieldvalue[2] = "code,libelle,region";   // "code,libelle,region"
@@ -331,7 +331,7 @@ $tabfieldvalue[35]= "label";
 $tabfieldvalue[36]= "range_ik,fk_c_exp_tax_cat";
 $tabfieldvalue[37]= "code,label,short_label,unit_type,scale";
 
-// Nom des champs dans la table pour insertion d'un enregistrement
+// Field names in the table for inserting a record
 $tabfieldinsert=array();
 $tabfieldinsert[1] = "code,libelle,fk_pays";
 $tabfieldinsert[2] = "code_departement,nom,fk_region";
@@ -979,7 +979,7 @@ if ($sortfield) $paramwithsearch.= '&sortfield='.urlencode($sortfield);
 if (GETPOST('from')) $paramwithsearch.= '&from='.urlencode(GETPOST('from', 'alpha'));
 
 
-// Confirmation de la suppression de la ligne
+// Confirmation of the deletion of the line
 if ($action == 'delete')
 {
     print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
@@ -991,7 +991,7 @@ if ($action == 'delete')
  */
 if ($id)
 {
-    // Complete requete recherche valeurs avec critere de tri
+    // Complete search values request with sort criteria
     $sql=$tabsql[$id];
 
     if (! preg_match('/ WHERE /', $sql)) $sql.= " WHERE 1 = 1";
@@ -1283,8 +1283,8 @@ if ($id)
         {
         	if ($fieldlist[$field] == 'entity') continue;
 
-            // Determine le nom du champ par rapport aux noms possibles
-            // dans les dictionnaires de donnees
+            // Determines the name of the field in relation to the possible names
+            // in data dictionaries
             $showfield=1;							  	// By defaut
             $align="left";
             $cssprefix='';
@@ -1850,14 +1850,14 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
 			print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
 			print '</td>';
 		}
-		// Le type de l'element (pour les type de contact)
+		// The type of the element (for contact types)
 		elseif ($fieldlist[$field] == 'element')
 		{
 			print '<td>';
 			print $form->selectarray('element', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
 			print '</td>';
 		}
-		// La source de l'element (pour les type de contact)
+		// The source of the element (for contact types)
 		elseif ($fieldlist[$field] == 'source')
 		{
 			print '<td>';

+ 6 - 4
htdocs/admin/emailcollector_card.php

@@ -36,7 +36,7 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php';
 if (!$user->admin) accessforbidden();
 if (empty($conf->emailcollector->enabled)) accessforbidden();
 
-// Load traductions files requiredby by page
+// Load traductions files required by page
 $langs->loadLangs(array("admin", "mails", "other"));
 
 // Get parameters
@@ -55,8 +55,10 @@ $object = new EmailCollector($db);
 $extrafields = new ExtraFields($db);
 $diroutputmassaction = $conf->emailcollector->dir_output . '/temp/massgeneration/' . $user->id;
 $hookmanager->initHooks(array('emailcollectorcard')); // Note that conf->hooks_modules contains array
+
 // Fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('emailcollector');
+$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
+
 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
 
 // Initialize array of search criterias
@@ -116,7 +118,7 @@ if (empty($reshook))
 if (GETPOST('addfilter', 'alpha'))
 {
 	$emailcollectorfilter = new EmailCollectorFilter($db);
-	$emailcollectorfilter->type = GETPOST('filtertype', 'az09');
+	$emailcollectorfilter->type = GETPOST('filtertype', 'aZ09');
 	$emailcollectorfilter->rulevalue = GETPOST('rulevalue', 'alpha');
 	$emailcollectorfilter->fk_emailcollector = $object->id;
 	$emailcollectorfilter->status = 1;
@@ -150,7 +152,7 @@ if ($action == 'deletefilter')
 if (GETPOST('addoperation', 'alpha'))
 {
 	$emailcollectoroperation = new EmailCollectorAction($db);
-	$emailcollectoroperation->type = GETPOST('operationtype', 'az09');
+	$emailcollectoroperation->type = GETPOST('operationtype', 'aZ09');
 	$emailcollectoroperation->actionparam = GETPOST('operationparam', 'none');
 	$emailcollectoroperation->fk_emailcollector = $object->id;
 	$emailcollectoroperation->status = 1;

+ 4 - 2
htdocs/admin/emailcollector_list.php

@@ -34,7 +34,7 @@ dol_include_once('/emailcollector/class/emailcollector.class.php');
 if (!$user->admin) accessforbidden();
 if (empty($conf->emailcollector->enabled)) accessforbidden();
 
-// Load traductions files requiredby by page
+// Load traductions files required by page
 $langs->loadLangs(array("admin", "other"));
 
 $action     = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view';				// The action 'add', 'create', 'edit', 'update', 'view', ...
@@ -66,8 +66,10 @@ $object = new EmailCollector($db);
 $extrafields = new ExtraFields($db);
 $diroutputmassaction = $conf->emailcollector->dir_output . '/temp/massgeneration/' . $user->id;
 $hookmanager->initHooks(array('emailcollectorlist')); // Note that conf->hooks_modules contains array
+
 // Fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('emailcollector');
+$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
+
 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
 
 // Default sort order (if not yet defined by previous GETPOST)

+ 1 - 1
htdocs/admin/expensereport.php

@@ -496,7 +496,7 @@ else
 }
 print '</td></tr>'."\n";
 
-//Use draft Watermark
+// Use draft Watermark
 
 print '<tr class="oddeven"><td colspan="2">';
 print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';

+ 0 - 2
htdocs/admin/expensereport_extrafields.php

@@ -63,8 +63,6 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
  * View
  */
 
-$textobject=$langs->transnoentitiesnoconv("expensereports");
-
 llxHeader('', $langs->trans("ExpenseReportsSetup"));
 
 $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';

+ 118 - 0
htdocs/admin/holiday_extrafields.php

@@ -0,0 +1,118 @@
+<?php
+/* Copyright (C) 2001-2002	Rodolphe Quiedeville	<rodolphe@quiedeville.org>
+ * Copyright (C) 2003		Jean-Louis Bergamo		<jlb@j1b.org>
+ * Copyright (C) 2004-2013	Laurent Destailleur		<eldy@users.sourceforge.net>
+ * Copyright (C) 2012		Regis Houssin			<regis.houssin@inodbox.com>
+ * Copyright (C) 2012		Florian Henry			<florian.henry@open-concept.pro>
+ * Copyright (C) 2013		Philippe Grand			<philippe.grand@atoo-net.com>
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ *      \file       htdocs/admin/holiday_extrafields.php
+ *		\ingroup    holiday
+ *		\brief      Page to setup extra fields of holiday
+ */
+
+require '../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
+
+if (!$user->admin)
+	accessforbidden();
+
+// Load translation files required by the page
+$langs->loadLangs(array('admin', 'errors', 'holiday', 'other'));
+
+$extrafields = new ExtraFields($db);
+$form = new Form($db);
+
+// List of supported format
+$tmptype2label=ExtraFields::$type2label;
+$type2label=array('');
+foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
+
+$action=GETPOST('action', 'alpha');
+$attrname=GETPOST('attrname', 'alpha');
+$elementtype='holiday'; //Must be the $table_element of the class that manage extrafield
+
+if (!$user->admin) accessforbidden();
+
+
+/*
+ * Actions
+ */
+
+require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
+
+
+
+/*
+ * View
+ */
+
+llxHeader('', $langs->trans("HolidaySetup"));
+
+$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
+print load_fiche_titre($langs->trans("HolidaySetup"), $linkback, 'title_setup');
+
+$head = holiday_admin_prepare_head();
+
+dol_fiche_head($head, 'attributes', $langs->trans("Holidays"), -1, 'holiday');
+
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
+
+dol_fiche_end();
+
+
+// Buttons
+if ($action != 'create' && $action != 'edit')
+{
+    print '<div class="tabsAction">';
+    print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>";
+    print "</div>";
+}
+
+
+/* ************************************************************************** */
+/*                                                                            */
+/* Creation of an optional field											  */
+/*                                                                            */
+/* ************************************************************************** */
+
+if ($action == 'create')
+{
+	print '<br><div id="newattrib"></div>';
+    print load_fiche_titre($langs->trans('NewAttribute'));
+
+    require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
+}
+
+/* ************************************************************************** */
+/*                                                                            */
+/* Edition of an optional field                                               */
+/*                                                                            */
+/* ************************************************************************** */
+if ($action == 'edit' && ! empty($attrname))
+{
+    print "<br>";
+    print load_fiche_titre($langs->trans("FieldEdition", $attrname));
+
+    require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
+}
+
+// End of page
+llxFooter();
+$db->close();

+ 4 - 2
htdocs/admin/ihm.php

@@ -432,11 +432,13 @@ if ($action == 'edit')	// Edit
 	print '</table>'."\n";
 
 
-	print '<br><div class="center">';
+	print '<br>';
+	print '<div class="center">';
 	print '<input class="button" type="submit" name="submit" value="'.$langs->trans("Save").'">';
-	print ' &nbsp; ';
+	print '&nbsp;&nbsp;&nbsp;';
 	print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
 	print '</div>';
+	print '<br>';
 
 	print '</form>';
 }

+ 1 - 1
htdocs/admin/index.php

@@ -43,7 +43,7 @@ $wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'
 llxHeader('', $langs->trans("Setup"), $wikihelp);
 
 
-print load_fiche_titre($langs->trans("SetupArea"), '', 'title_setup.png');
+print load_fiche_titre($langs->trans("SetupArea"), '', 'tools');
 
 
 if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))

+ 11 - 9
htdocs/admin/limits.php

@@ -102,7 +102,7 @@ if ($action == 'edit')
     clearstatcache();
 
     print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
+    print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td></tr>';
 
 
     print '<tr class="oddeven"><td>';
@@ -110,23 +110,25 @@ if ($action == 'edit')
     print '</td><td><input class="flat" name="MAIN_MAX_DECIMALS_UNIT" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_UNIT . '"></td></tr>';
 
 
-    print '<tr class="oddeven"><td>';
+    print '<tr><td>';
     print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
     print '</td><td><input class="flat" name="MAIN_MAX_DECIMALS_TOT" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_TOT . '"></td></tr>';
 
 
-    print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td><input class="flat" name="MAIN_MAX_DECIMALS_SHOWN" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_SHOWN . '"></td></tr>';
+    print '<tr><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td><input class="flat" name="MAIN_MAX_DECIMALS_SHOWN" size="3" value="' . $conf->global->MAIN_MAX_DECIMALS_SHOWN . '"></td></tr>';
 
 
-    print '<tr class="oddeven"><td>';
+    print '<tr><td>';
     print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
     print '</td><td><input class="flat" name="MAIN_ROUNDING_RULE_TOT" size="3" value="' . $conf->global->MAIN_ROUNDING_RULE_TOT . '"></td></tr>';
 
     print '</table>';
 
-    print '<br><div class="center">';
+    print '<br>';
+    print '<div class="center">';
     print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
     print '</div>';
+	print '<br>';
 
     print '</form>';
     print '<br>';
@@ -142,21 +144,21 @@ else
     print '</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_UNIT.'</td></tr>';
 
 
-    print '<tr class="oddeven"><td>';
+    print '<tr><td>';
     print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
     print '</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_TOT.'</td></tr>';
 
 
-    print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_SHOWN.'</td></tr>';
+    print '<tr><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td><td class="right">'.$conf->global->MAIN_MAX_DECIMALS_SHOWN.'</td></tr>';
 
 
-    print '<tr class="oddeven"><td>';
+    print '<tr><td>';
     print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
     print '</td><td class="right">'.$conf->global->MAIN_ROUNDING_RULE_TOT.'</td></tr>';
 
     print '</table>';
 
-    print '<div class="tabsAction">';
+    print '<div class="tabsAction tabsActionNoBottom">';
     print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
     print '</div>';
 }

+ 3 - 1
htdocs/admin/mails_senderprofile_list.php

@@ -59,8 +59,10 @@ $object=new EmailSenderProfile($db);
 $extrafields = new ExtraFields($db);
 $diroutputmassaction=$conf->admin->dir_output . '/temp/massgeneration/'.$user->id;
 $hookmanager->initHooks(array('emailsenderprofilelist'));     // Note that conf->hooks_modules contains array
+
 // Fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('emailsenderprofile');
+$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
+
 $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
 
 // Default sort order (if not yet defined by previous GETPOST)

Деякі файли не було показано, через те що забагато файлів було змінено