diff --git a/html/image/edit.png b/html/image/edit.png new file mode 100644 index 000000000..54b5c9ad9 Binary files /dev/null and b/html/image/edit.png differ diff --git a/include/lib/class_html_input.php b/include/lib/class_html_input.php index e5d1e2ffc..c4dad1f4d 100755 --- a/include/lib/class_html_input.php +++ b/include/lib/class_html_input.php @@ -467,6 +467,19 @@ class HtmlInput $r.=''; return $r; + } + /** + * Image to click , + * @param string $p_image filename of the image under image/ + * @param string $p_js javascript when the image is clicked + * @param string $p_message Message + */ + static function image_click($p_image,$p_js,$p_message) + { + $ret=sprintf('', + $p_message,$p_image,$p_js); + return $ret; + } /** * button Html image diff --git a/include/lib/class_manage_table_sql.php b/include/lib/class_manage_table_sql.php index c1019e227..8dc931e8b 100644 --- a/include/lib/class_manage_table_sql.php +++ b/include/lib/class_manage_table_sql.php @@ -490,19 +490,19 @@ class Manage_Table_SQL echo ""; if ($this->can_update_row()) { - $js=sprintf("onclick=\"%s.input('%s','%s');\"", $this->object_name, + $js=sprintf("%s.input('%s','%s');", $this->object_name, $p_row[$this->table->primary_key], $this->object_name ); - echo HtmlInput::anchor(_("Modifier"), "", $js); + echo HtmlInput::image_click("edit.png",$js,_("Modifier")); } echo ""; echo ""; if ($this->can_delete_row()) { - $js=sprintf("onclick=\"%s.delete('%s','%s');\"", $this->object_name, + $js=sprintf("%s.delete('%s','%s');", $this->object_name, $p_row[$this->table->primary_key], $this->object_name ); - echo HtmlInput::anchor(_("Effacer"), "", $js); + echo HtmlInput::image_click("delete.gif", $js,_("effacer")); } echo ""; echo '';