clean code

This commit is contained in:
Frédéric France 2024-03-13 18:45:02 +01:00
parent edb12bc63d
commit ec7ff74f25

View file

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2022 Alice Adminson <aadminson@example.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* 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') {
}
});
});
</script>";
print $out;