diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6fb85c3363d..a07ce5246c8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -33,7 +33,6 @@ * \brief File of class with all html predefined components * \version $Id$ */ - $action = GETPOST("action"); /** @@ -75,6 +74,7 @@ class Form * @param perm Permission to allow button to edit parameter * @param typeofdata Type of data (string by default, email, ...) * @return string HTML edit field + * TODO no GET or POST in class file, use a param */ function editfieldkey($text,$htmlname,$preselected,$paramkey,$paramvalue,$perm,$typeofdata='string') { @@ -83,7 +83,7 @@ class Form $ret.='
| '; $ret.=$langs->trans($text); $ret.=' | '; - if ($action != 'edit'.$htmlname && $perm) $ret.=''.img_edit($langs->trans('Edit'),1).' | '; + if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.=''.img_edit($langs->trans('Edit'),1).' | '; $ret.='