diff --git a/htdocs/ai/admin/setup.php b/htdocs/ai/admin/setup.php
index 80ecd7828ef..2f1852ddd29 100644
--- a/htdocs/ai/admin/setup.php
+++ b/htdocs/ai/admin/setup.php
@@ -192,31 +192,35 @@ if (getDolGlobalString("AI_API_SERVICE")) {
$functioncode = GETPOST('functioncode');
$out = '';
- if ($functioncode) {
- $labeloffeature = empty($arrayofaifeatures[GETPOST('functioncode')]['label']) ? 'Undefined' : $arrayofaifeatures[GETPOST('functioncode')]['label'];
+ //if ($functioncode) {
+ $key = 'textgenerationother'; // The HTML ID of field to fill
+
+ $labeloffeature = empty($arrayofaifeatures[$key]['label']) ? 'Undefined' : $arrayofaifeatures[$key]['label'];
//$out .= $langs->trans("Test").' '.$labeloffeature.'...
';
- if (GETPOST('functioncode') == 'textgenerationemail') {
- $key = 'textgenerationemail'; // The HTML ID of field to fill
+ //if (GETPOST('functioncode') == 'textgenerationemail') {
- include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
- $showlinktoai = $key; // 'textgeneration', 'imagegeneration', ...
- $showlinktoailabel = $langs->trans("Test").' '.$labeloffeature;
- $showlinktolayout = 0;
- $formmail = new FormMail($db);
- $htmlname = $key;
+ print '
';
+ //print '
';
- // Fill $out
- include DOL_DOCUMENT_ROOT.'/core/tpl/formlayoutai.tpl.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
+ include_once DOL_DOCUMENT_ROOT."/core/class/html.formai.class.php";
+ $formai = new FormAI($db);
+ $formmail = new FormMail($db);
- $out .= '';
- } else {
- $out .= $langs->trans("FeatureNotYetAvailable").'
';
- $functioncode = '';
- }
- }
+ $showlinktoai = $key; // 'textgeneration', 'imagegeneration', ...
+ $showlinktoailabel = $langs->trans("AITestText");
+ $showlinktolayout = 0;
+ $htmlname = $key;
+ // Fill $out
+ include DOL_DOCUMENT_ROOT.'/core/tpl/formlayoutai.tpl.php';
+
+ $out .= '
'; // The div
+ //}
+
+ /*
if (!$functioncode) {
// Combo list of AI features
$out .= '