diff --git a/include/anc_pa.inc.php b/include/anc_pa.inc.php index 05db57368..a85460712 100644 --- a/include/anc_pa.inc.php +++ b/include/anc_pa.inc.php @@ -100,10 +100,11 @@ if ( isset($_REQUEST['sa'])) $ret.= $wSa; $ret.= $wAction; $ret.=HtmlInput::submit("submit","Enregistre"); - $ret.=sprintf(''. +/* $ret.=sprintf(''. '', "?p_action=ca_pa&pa_id=".$_GET['pa_id']."&sa=pa_delete&$str_dossier"); - +*/ + $ret.=HtmlInput::button_anchor('Efface',"?p_action=ca_pa&pa_id=".$_GET['pa_id']."&sa=pa_delete&$str_dossier",'Efface','onclick="return confirm(\'Effacer ?\')"'); $ret.= ''; $ret.= ''; diff --git a/include/class_html_input.php b/include/class_html_input.php index 187a594b9..ab3f0b725 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -203,12 +203,14 @@ echo $string => {'prop':'1','prop2':'2','prop3':'3'}; *\param $p_label the text *\param $p_value the location of the window, *\param $p_name the id of the span + *\param $p_javascript javascript for this button *\return string with htmlcode */ - static function button_anchor($p_label,$p_value,$p_name="") { - $r=sprintf(' %s', + static function button_anchor($p_label,$p_value,$p_name="",$p_javascript="") { + $r=sprintf(' %s', $p_name, $p_value, + $p_javascript, $p_label); return $r; }