diff --git a/htdocs/admin/security_captcha.php b/htdocs/admin/security_captcha.php index f495da241c3..0f53f8a8154 100644 --- a/htdocs/admin/security_captcha.php +++ b/htdocs/admin/security_captcha.php @@ -1,8 +1,8 @@ - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2024-2025 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 @@ -26,10 +26,6 @@ // Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; - /** * @var Conf $conf * @var DoliDB $db @@ -38,6 +34,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; * @var User $user */ +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + // Load translation files required by the page $langs->loadLangs(array("users", "admin", "other")); @@ -134,8 +134,13 @@ print dol_get_fiche_head($head, 'captcha', '', -1); print '
'; +print ''; +print ''; +print ''; +print ''; +print ''; -print $langs->trans("UseCaptchaCode").' - Login'; +print ''; if (isModEnabled('societe')) { - print '
'; - print $langs->trans("UseCaptchaCode").' - Thirdparty public contact form'; + print ''; if (isModEnabled('ticket')) { - print '
'; - print $langs->trans("UseCaptchaCode").' - Public ticket creation'; + print ''; if (isModEnabled('member')) { - print '
'; - print $langs->trans("UseCaptchaCode").' - Membership public subcription'; + print ''; if (isModEnabled('don')) { - print '
'; - print $langs->trans("UseCaptchaCode").' - Donation public form'; + print ''; +print '
'.$langs->trans("Captcha").''.$langs->trans("Status").'
' . $langs->trans("UseCaptchaCode").' - Login'; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA', array(), null, 0, 0, 1); } else { @@ -145,10 +150,10 @@ if (!empty($conf->use_javascript_ajax)) { print ''.img_picto($langs->trans("Enabled"), 'on').''; } } +print '
' . $langs->trans("UseCaptchaCode").' - Thirdparty public contact form'; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA_THIRDPARTY', array(), null, 0, 0, 1); } else { @@ -159,10 +164,10 @@ if (isModEnabled('societe')) { } } } +print '
' . $langs->trans("UseCaptchaCode").' - Public ticket creation'; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA_TICKET', array(), null, 0, 0, 1); } else { @@ -173,10 +178,10 @@ if (isModEnabled('ticket')) { } } } +print '
' . $langs->trans("UseCaptchaCode").' - Membership public subscription'; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA_MEMBER', array(), null, 0, 0, 1); } else { @@ -187,10 +192,10 @@ if (isModEnabled('member')) { } } } +print '
' . $langs->trans("UseCaptchaCode").' - Donation public form'; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA_DONATION', array(), null, 0, 0, 1); } else { @@ -201,7 +206,9 @@ if (isModEnabled('don')) { } } } +print '
'; // Set if a captcha is used on at least one place $showavailablecaptcha = 0; if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA')) {