From 632d8dde95b74edb0d11a7266ba1c0d58f07c28a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 14 May 2011 09:21:24 +0000 Subject: [PATCH] Test: not reload page with dialog confirm --- htdocs/core/class/html.form.class.php | 28 ++++++++++++++++++++------- htdocs/societe/soc.php | 23 ++++++++++++++-------- htdocs/theme/auguria/style.css.php | 13 ++++++++----- 3 files changed, 44 insertions(+), 20 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 20e54be8ac7..fa6783fb114 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2038,19 +2038,28 @@ class Form if ($useajax && $conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { + $autoOpen=true; + $dialogconfirm='dialog-confirm'; + if (! is_int($useajax)) { + list($useajax,$button) = explode(',',$useajax); + $autoOpen=false; + $dialogconfirm.='-'.$button; + } $pageyes=$page.'&action='.$action.'&confirm=yes'; $pageno=($useajax == 2?$page.'&confirm=no':''); // New code using jQuery only - $formconfirm.= '
'; + $formconfirm.= '