do not get color if not category is selected

This commit is contained in:
Uwe Steinmann 2024-01-24 11:56:40 +01:00
parent b3ad7f54fb
commit 3be9cef85c

View File

@ -118,7 +118,7 @@ $(document).ready( function() {
'value'=>($category ? htmlspecialchars($category->getName()) : '')
)
);
$color = ($category && $category->getColor()) ? $category->getColor() : substr(md5($category->getName()), 0, 6);
$color = $category ? ($category->getColor() ? $category->getColor() : substr(md5($category->getName()), 0, 6)) : 'ffffff';
$this->formField(
getMLText("color"),
array(