Commit Graph

639 Commits

Author SHA1 Message Date
Laurent Destailleur
1a2ac35985 Look and feel v21 - text to select email template into the placeholder 2024-10-15 00:13:53 +02:00
Laurent Destailleur
ec53c62a7e Debug layout feature for v21 2024-10-15 00:07:08 +02:00
Laurent Destailleur
fad083e29b Debug layout feature for v21 2024-10-14 23:38:14 +02:00
Laurent Destailleur
4a2043e7a0 Merge 2024-10-14 01:21:40 +02:00
Laurent Destailleur
47500d56f3 Doc 2024-10-14 01:15:54 +02:00
MDW
8609df383a Qual: fix phan notices (#31368)
* Qual: fix phan notices

# Qual: fix phan notices

Fix phan/phpstan notices, mostly in html,formmail

* Ignore phpstan exception
2024-10-14 00:36:42 +02:00
MDW
42bb4fbf3e Qual: Enable & fix or ignore Invalid DimOffset (#31176)
* Qual: Enable & fix or ignore Invalid DimOffset

# Qual: Enable & fix or ignore Invalid DimOffset

The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.

This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later

* Nullable object typing in function signature not ok for 7.0/8.4

Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-29 21:52:31 +02:00
Frédéric FRANCE
138ffa3158 fix phpstan (#31181)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-29 21:49:52 +02:00
lamrani abdelwadoud
5fcca27fc4 NEW display when click on NEWS templateDrop down for model (#30332)
* New update for templateMail by creating files

* New updating for get php content

* Update html.formmail.class.php

* Fix updating content news

* Fix CTI Errors

* edit html file for news

* NEW display for news with option

* replace file in ajax folder

* fix multiselect news

* Fix phan errors and remove part of useless css

* Fix brakets needed in script

* Fix Phan errors

* Fix display multiselect and fix security injection

* cancel removing part of code for classe modelMail

* Fix phstan errors

* Fix space line

* Fix error phpStan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-17 15:37:34 +02:00
MDW
ca414de526 Qual: Fix $fields related notices with Phan (#30704)
* Qual: Typing hints/ignore directives for phan notices

* Update field typing
2024-08-21 13:23:35 +02:00
MDW
75ed925f06 Qual: Fix PhanPluginUnknownObjectMethodCall ("part 1") (#30563)
* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add typing hint to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add typing hint in phan config to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjectBlock

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjectBlock

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjects

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Fix: MemberNumRefNumbers getExample does not take any arguments

Found thanks to adding the typing for phan!

* Qual: Correct forced type for $module

* Qual: Ignore phan false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Ignore false positive

* Qual: phan/Ignore false positive, replace depr.prop with method

* Qual: Fix typing for count by adding is_array check

* Qual: replace depr.prop `nom` with method

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Fix depr.prop with getter and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: Improve typing for mymodule template

* Make info method arguments match calls

* Make PrintingDriver abstract class because we added abstract methods

* Add phpdoc typing for phan

* Update getExample function signature for compatibility

* Update getExample function signature for compatibility

* Update getExample function signature for compatibility

* Update header wit correct information

* Update getExample method signature

* Update getExample method signature

* Correct reference to class in comment

* Force php phan typing for numbering modules

* Correct $_GLOBALS to $GLOBALS

* Add phpdoc to indicat type of properties

* Correct default to null

* Improve getNextValue typehint

* Improve getNextValue typehint

* Qual: Improve ModeleNumRefTakepos typing

* Qual: Improve ModeleNumRefRecruitmentJobPosition typing

* Fix default for $langs

* Do not use non-existing ModeleNumRefTakepos::nom

* Allow getNextValue argument to be null

* Correct $_GLOBAL into $GLOBALS

* Improve typing for ldap functions

* Allow null for outputlangs argument

* Improve typing for printOriginLine

* Improve typing for linkedObject access

* Fix PhanTypeMismatchArgumentNullableInternal and optimize

* Fix PhanPossiblyUndeclaredVariable by setting default value

* Ignore PhanPluginDuplicateExpressionAssignmentOperation - needs PHP7.4

* getToolTip does not accept null, changed to ''

* Improve getNextValue typing

* Change PrintingDriver back to normal class (instantiated)

And add errors for functions that should be overloaded

* Adjust pringOriginLine typing to match parent

* Fix phpdoc for getNextValue

* Fix phan typing

* Add/Improve phpdoc typing hints

* Qual: Adjustments to match typing

* Update typing for unit, use GETPOSTINT

* ModeleNumRefTask needs Project

* Fix several notices appearing after update from develop

* Index for choices is int, use GETPOSTINT

* Qual: Ignore empty foreach

* Force BOMLine on object line

* phan typing to indicate that linked objects are BOM

* Type the correct variable name (phan)

* Add typing for $langs

* Type to CommonNumRefGenerator (no class for availabilities)

* Resolve several phan notices after update from dev branch

* Extra typing fixes

* Move common attributes to parent class (phan)

* Add typing to Calendar class

* Improve typing hints

* Add typing to pdf_eagle_proforma

* Qual: Add typing for token in generic_oauthcallback.php

* Add typing for objMod

* Correct getNextValue function signature (phpstan)

* Fix typing (phpstan)

* Update version declarations (fix phpstan)

* Fix phpstan typing issues

* Adjust typing (phpstan)

* Qual: Update baseline & conf to detect 25% of PhanPluginUnknownObjectMethodCall
2024-08-17 19:32:52 +02:00
Laurent Destailleur
5c88a77ac1 Enhance the layout email selection 2024-08-15 18:32:55 +02:00
Laurent Destailleur
af779ead51 Fix rename field name for subject in english 2024-08-15 18:11:57 +02:00
Laurent Destailleur
69ac99e11a Fix sql error 2024-08-15 18:07:47 +02:00
Laurent Destailleur
4d28e971e7 Fix URL 2024-08-15 17:51:48 +02:00
lamrani abdelwadoud
1bd3d1877e NEW Preview product list when we choose model layout Commerce (#30185)
* New update for templateMail by creating files

* New updating for get php content

* Update html.formmail.class.php

* Fix updating content news

* Fix CTI Errors

* NEW function for Preview In CKeditor products

* edit html file for news

* Add automaticaly subject value to editor

* Update html.formmail.class.php

* FIX name and path of file

* Fix path for files

* Fix errors variables

* replace file in ajax folder

* rename path

* Fix return function in product class

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-15 17:39:15 +02:00
Laurent Destailleur
75158556c9 Debug 2024-07-31 19:36:57 +02:00
lamrani abdelwadoud
31a560422d New Preview mai topic value on Ckeditor (#30195)
* New update for templateMail by creating files

* New updating for get php content

* Update html.formmail.class.php

* Fix updating content news

* Fix CTI Errors

* edit html file for news

* Add automaticaly subject value to editor

* Update html.formmail.class.php

* FIX name and path of file

* Fix path for files

* Fix errors variables

* replace file in ajax folder

* rename path

* update the news file

* fix phan errors

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-31 19:12:40 +02:00
Laurent Destailleur
5513b573b0 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-24 04:06:06 +02:00
Laurent Destailleur
deee0ab320 Fix bad param of constructor 2024-07-23 09:25:23 +02:00
Laurent Destailleur
12f85b7501 Fix missing param in constructor 2024-07-23 09:23:12 +02:00
Laurent Destailleur
8a257ac93f Fix permission to edit email template - Debug v20 2024-07-23 02:12:46 +02:00
Laurent Destailleur
403fcd234e Debug v20 2024-07-22 21:49:47 +02:00
Laurent Destailleur
3a9931c0bb NEW Add a test mode into the setup of AI prompts 2024-07-19 15:38:52 +02:00
Frédéric FRANCE
c3d89d8b3a fix phpstan expects int, null ... (#30312) 2024-07-09 20:46:47 +02:00
Laurent Destailleur
896bfeb050 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-06-30 14:57:01 +02:00
Laurent Destailleur
bde5687890 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-06-30 11:59:25 +02:00
Laurent Destailleur
d7c2e78239 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
Conflicts:
	htdocs/core/class/html.formmail.class.php
	htdocs/core/tpl/card_presend.tpl.php
2024-06-30 03:50:02 +02:00
Regis Houssin
fdf5fe0f26 FIX broken pdf preview when multicompany sharing (#30188)
* FIX broken pdf preview when multicompany sharing

* Update html.formmail.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-06-29 19:28:30 +02:00
Laurent Destailleur
a618bf2ae6 Debug v20 2024-06-18 09:54:11 +02:00
Laurent Destailleur
534606ed96 Prepare 20.0 2024-06-16 01:33:35 +02:00
Laurent Destailleur
78421f4607 Debug v20 2024-06-06 11:09:43 +02:00
Laurent Destailleur
18242bc0a0 Debug v20 2024-06-06 02:33:16 +02:00
Frédéric FRANCE
933e87ca81 Update codespell-dict.txt (#29644)
* Update codespell-dict.txt

* WYSIWYG

* phan
2024-05-10 12:34:08 +02:00
Laurent Destailleur
7a8afd0185 Debug v20 2024-04-24 14:05:25 +02:00
Laurent Destailleur
82fd5a8ac3 Debug v20 2024-04-24 13:07:47 +02:00
Laurent Destailleur
68c81e5311 Debug v20 2024-04-24 11:26:08 +02:00
MDW
8b960280d9 PHPdoc Allow empty array for + PHPdoc improvements 2024-03-24 14:09:32 +01:00
Laurent Destailleur
150845cd02 Debug v20 2024-03-24 05:23:06 +01:00
Laurent Destailleur
e3c76ca86a Clean translation files 2024-03-20 15:25:47 +01:00
MDW
0cd2b3f069 Fix PhanTypeSuspiciousStringExpression 2024-03-19 02:43:20 +01:00
Laurent Destailleur
87388d7dab Debug v20 2024-03-16 21:33:55 +01:00
Laurent Destailleur
d686ce02d9 Merge pull request #28884 from lamrani002/addDelay
NEW animation for display spinner when waiting response
2024-03-16 12:12:33 +01:00
Laurent Destailleur
e9c4be9856 Merge pull request #28883 from lamrani002/getMsgInEditor
FIX problem for display content in editor
2024-03-16 11:49:00 +01:00
Lamrani Abdel
5422cbdfc2 remove variables withaiprompt 2024-03-16 01:07:17 +01:00
Lamrani Abdel
28e10cb999 Change icon spinner 2024-03-16 01:02:32 +01:00
MDW
c9135d0c33 Fix: Main email configuration was not added to list 2024-03-16 00:00:19 +01:00
Lamrani Abdel
7d49d0e20b NEW annimation for display spinner when waiting response 2024-03-15 18:05:32 +01:00
Lamrani Abdel
13e1209c01 FIX problem for display content in editor 2024-03-15 17:15:24 +01:00
Laurent Destailleur
6d71b4f9c5 Update html.formmail.class.php 2024-03-15 00:08:42 +01:00