From c6499c52193acdfa674178c885fc47d960f0ebe6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Sep 2022 13:00:25 +0200 Subject: [PATCH] Fix cursor to wait --- htdocs/core/class/html.form.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5729b87cc6f..f0fceb521da 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5141,6 +5141,12 @@ class Form },'; } + $jsforcursor = ''; + if (empty($useajax)) { + $jsforcursor = '// The call to urljump can be slow, so we set the wait cursor'."\n"; + $jsforcursor .= 'jQuery("html,body,#id-container").addClass("cursorwait");'."\n"; + } + $formconfirm .= ' resizable: false, height: "'.$height.'", @@ -5170,8 +5176,7 @@ class Form } var urljump = pageyes + (pageyes.indexOf("?") < 0 ? "?" : "") + options; if (pageyes.length > 0) { - // The call to urljump can be slow, so we set the wait cursor - jQuery("html,body,#id-container").addClass("cursorwait"); + '.$jsforcursor.' location.href = urljump; console.log("after location.href"); }