diff --git a/htdocs/ai/admin/custom_prompt.php b/htdocs/ai/admin/custom_prompt.php index 699479bbb9e..c791479eca8 100644 --- a/htdocs/ai/admin/custom_prompt.php +++ b/htdocs/ai/admin/custom_prompt.php @@ -1,6 +1,7 @@ * Copyright (C) 2022 Alice Adminson + * Copyright (C) 2024 Frédéric France * * 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 @@ -137,7 +138,7 @@ if ($action == 'updatePrompts') { $newConfigurationsJson = json_encode($currentConfigurations, JSON_UNESCAPED_UNICODE); $result = dolibarr_set_const($db, 'AI_CONFIGURATIONS_PROMPT', $newConfigurationsJson, 'chaine', 0, '', $conf->entity); if (!$error) { - $action = 'dodo'; + $action = ''; if ($result) { header("Location: ".$_SERVER['PHP_SELF']); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -165,9 +166,6 @@ if ($action == 'confirm_deleteproperty' && GETPOST('confirm') == 'yes') { } } } -if ($action == 'confirm_deleteproperty') { - var_dump(GETPOST('confirm'));exit; -} /* @@ -344,7 +342,7 @@ if ($action == 'edit' || $action == 'create') { $('#postPromptInput').val(''); } }); - + $('.showInputBtn').click(function() { event.preventDefault(); var index = $(this).data('index'); @@ -357,7 +355,7 @@ if ($action == 'edit' || $action == 'create') { $(this).html($(this).data('icon-cancel')); $(this).data('state', 'cancel'); - } else { + } else { $('#prePromptInput_'+index).attr('disabled', 'disabled'); $('#postPromptInput_'+index).attr('disabled', 'disabled'); @@ -367,8 +365,8 @@ if ($action == 'edit' || $action == 'create') { } }); }); - - + + "; print $out;