diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index c817a252603..9de21c37fdb 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -3027,6 +3027,7 @@ if ($action == 'create' && $usercancreate) { if ($numlines > 0) { print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, $object->id, 1); } else { + $langs->load("errors"); print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, $object->id, 0); } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1c9c99118f5..4d5ccb4b62a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -12838,7 +12838,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url = $attr['class'] = 'butActionRefused'; $attr['href'] = ''; $attr['title'] = (($label && $text && $label != $text) ? $label : ''); - $attr['title'] = ($attr['title'] ? $attr['title'].'
' : '').$langs->trans('NotEnoughPermissions'); + $attr['title'] = ($attr['title'] ? $attr['title'] : $langs->trans('NotEnoughPermissions')); } if (!empty($id)) {