diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 5813c45047a..7f7f3313139 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5018,7 +5018,7 @@ class Form
}
$formconfirm .= '
';
- if (empty($conf->use_javascript_ajax)) {
+ if (!empty($conf->use_javascript_ajax)) {
$formconfirm .= '';
$formconfirm .= '