diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a0ae5c244e5..72f3c809d2d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2217,8 +2217,6 @@ class Form $more.=''."\n"; } - $formconfirm.= "\n\n"; - if ($useajax && $conf->use_javascript_ajax) { $autoOpen=true; @@ -2244,81 +2242,12 @@ class Form } // New code using jQuery only - $formconfirm.= ''."\n"; - $formconfirm.= ''; - - $formconfirm.= "\n"; + include(DOL_DOCUMENT_ROOT.'/core/tpl/ajax/formconfirm.tpl.php'); } else { + $formconfirm.= "\n\n"; + $formconfirm.= '
'."\n"; $formconfirm.= ''; $formconfirm.= ''."\n"; @@ -2350,9 +2279,10 @@ class Form $formconfirm.= "
\n"; $formconfirm.= '
'; + + $formconfirm.= "\n"; } - $formconfirm.= "\n"; return $formconfirm; } diff --git a/htdocs/core/tpl/ajax/formconfirm.tpl.php b/htdocs/core/tpl/ajax/formconfirm.tpl.php new file mode 100644 index 00000000000..d3367c7a7c1 --- /dev/null +++ b/htdocs/core/tpl/ajax/formconfirm.tpl.php @@ -0,0 +1,84 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +?> + + + + + \ No newline at end of file