Release 2.0.13 (#3955)
- added missing escape to prevent HTML injection - added missing color attribute - upgrade theme - use dropdown submenu if title is set, otherwise dropdown tends to get too long - allow to use card-table instead of card-body - added `required` attribute to username and password field - fix pagination back to page 1 - prevent tag name too long - re-add missing user preferences link
This commit is contained in:
@@ -60,7 +60,7 @@ final class TagArrayToStringTransformer implements DataTransformerInterface
|
||||
|
||||
foreach ($newNames as $name) {
|
||||
$tag = new Tag();
|
||||
$tag->setName($name);
|
||||
$tag->setName(mb_substr($name, 0, 100));
|
||||
$tags[] = $tag;
|
||||
|
||||
// new tags persist automatically thanks to the cascade={"persist"}
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace App\Form\Type;
|
||||
|
||||
use App\Configuration\SystemConfiguration;
|
||||
use App\Constants;
|
||||
use App\Utils\Color;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
@@ -39,6 +40,13 @@ final class ColorChoiceType extends AbstractType implements DataTransformerInter
|
||||
],
|
||||
'label' => 'color',
|
||||
'empty_data' => null,
|
||||
'choice_attr' => function ($color, $name) {
|
||||
if ($color === null) {
|
||||
$color = (new Color())->getRandom($name);
|
||||
}
|
||||
|
||||
return ['data-color' => $color];
|
||||
},
|
||||
];
|
||||
|
||||
$choices = [];
|
||||
|
||||
@@ -80,7 +80,7 @@ final class TagsSelectType extends AbstractType
|
||||
$newNames = array_diff($newNames, $foundTagNames);
|
||||
foreach ($newNames as $name) {
|
||||
$tag = new Tag();
|
||||
$tag->setName($name);
|
||||
$tag->setName(mb_substr($name, 0, 100));
|
||||
$this->tagRepository->saveTag($tag);
|
||||
$newData[] = $tag->getId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user