diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index f3cc82f92fe..bc74f96cee9 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -855,22 +855,20 @@ class Position extends CommonObject * @param string|int $morecss Value for css to define style/length of field. May also be a numeric. * @return string */ - public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0, $nonewbutton = 0) - { + public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0, $nonewbutton = 0) { global $langs; - if($key == 'fk_user') - { + if($key == 'fk_user') { $vacantId = $keyprefix.$key.'vacant'.$keysuffix; $out = parent::showInputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss); - $out.= ''; + $out .= ''; ?> fk_user == 0) - { + if($key == 'fk_user' && $this->fk_user == 0) { return $langs->trans("VacantPosition"); } return parent::showOutputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss);