From 5da7f4ed00dde1236acab80c54a4bc1321ced32d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 7 Dec 2017 08:20:14 +0100 Subject: [PATCH] Icon move / fix Correct button_anchor to avoid the message "javascript:void(0)" --- include/lib/html_input.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php index 398f8cbc7..a153306b2 100755 --- a/include/lib/html_input.class.php +++ b/include/lib/html_input.class.php @@ -226,9 +226,11 @@ class HtmlInput */ static function button_anchor($p_label,$p_value,$p_name="",$p_javascript="",$p_class="button") { - $r=sprintf(' %s', + $href=""; + if ( $p_value != "") $href=sprintf (' href ="%s" ',$p_value); + $r=sprintf(' %s', $p_name, - $p_value, + $href, $p_javascript, $p_label); return $r; @@ -826,6 +828,7 @@ class HtmlInput * @param type $mod hide , close , zoom , custom or none, with * custom , the $name contains all the code * @param type $p_js contains the javascript if mod = "custom" or "zoom" contains button + code + * @param type $p_draggable , if set to yes the box will be draggable * @return type */ static function title_box($p_name,$p_div,$p_mod="close",$p_js="",$p_draggable="y") @@ -854,7 +857,7 @@ class HtmlInput die (__FILE__.":".__LINE__._('Paramètre invaide')); if ( $p_draggable=="y") { - $drag=sprintf('', + $drag=sprintf('', $p_div, $p_div); $r.=$drag;