From fd7ac6f8e2916adf367cbcb20fa29a14ebde1a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 28 Oct 2024 14:41:04 +0100 Subject: [PATCH 01/15] Update ignore_translation_keys.lst (#31604) * Update ignore_translation_keys.lst * Update setup.php --- dev/translation/ignore_translation_keys.lst | 4 ++++ htdocs/modulebuilder/template/admin/setup.php | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index c70dcf4b69090..dde64cf4b71d6 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -1073,6 +1073,10 @@ MYMODULE_MYPARAM6 MYMODULE_MYPARAM7 MYMODULE_MYPARAM8 MYMODULE_MYPARAM9 +MYMODULE_MYPARAM10 +MYMODULE_MYPARAM11 +MYMODULE_MYPARAM12 +MYMODULE_MYPARAM13 ManufacturingOrders MemberCreate MemberTypeCreate diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index d7ae08371370a..4f27dc700cb77 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -165,17 +165,17 @@ //$item->fieldInputOverride = false; // set this var to override field input //$item->fieldOutputOverride = false; // set this var to override field output -$item = $formSetup->newItem('TEST_MYPARAM11')->setAsHtml(); +$item = $formSetup->newItem('MYMODULE_MYPARAM11')->setAsHtml(); $item->nameText = $item->getNameText().' more html text '; $item->fieldInputOverride = ''; $item->helpText = $langs->transnoentities('HelpMessage'); $item->cssClass = 'minwidth500'; -$item = $formSetup->newItem('TEST_MYPARAM12'); +$item = $formSetup->newItem('MYMODULE_MYPARAM12'); $item->fieldOverride = "Value forced, can't be modified"; $item->cssClass = 'minwidth500'; -//$item = $formSetup->newItem('TEST_MYPARAM13')->setAsDate(); // Not yet implemented +//$item = $formSetup->newItem('MYMODULE_MYPARAM13')->setAsDate(); // Not yet implemented // End of definition of parameters From 7409e3c492d327296b4ecefdb0771da7bde073c6 Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Mon, 28 Oct 2024 14:41:34 +0100 Subject: [PATCH 02/15] FIX php-stan incorrect case newtoken (#31603) --- htdocs/modulebuilder/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index c23f819225219..9440b466b5877 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -5958,7 +5958,7 @@ function updateInputField() { print ''; print ' '.$langs->trans("TriggersFile"); print ' : '.$langs->trans("FileNotYetGenerated").''; - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; print ''; } @@ -6008,7 +6008,7 @@ function updateInputField() { print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print ''; } else { From cc4f86dac323c361fc69870596c312e9fe15f8fe Mon Sep 17 00:00:00 2001 From: lamrani abdelwadoud Date: Mon, 28 Oct 2024 14:51:36 +0100 Subject: [PATCH 03/15] New functionality Generate img product (#29731) * New functionality for generate image for product * New functionality for generate image for product * Fix errors CTI * remove null for second params * fix CTI errors again * Fix whitespace * Fix whitespaces again * Fix run phan * Update commonobject.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/core/class/html.formmail.class.php | 44 ++++++++++++++++++++--- htdocs/langs/en_US/products.lang | 2 ++ htdocs/product/document.php | 22 ++++++++++++ 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index d88c24fd9b6fb..ccf22410156a1 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1506,6 +1506,10 @@ public function getSectionForAIPrompt($function = 'textgeneration', $format = '' $out .= ''.$langs->trans("AIProcessingPleaseWait", getDolGlobalString('AI_API_SERVICE', 'chatgpt')); $out .= ''; + if ($function == 'imagegeneration') { + $out .= '
'; // Div for displaying the generated image + } + $out .= "\n"; $out .= "