forked from wallabag/wallabag
Fix adding tag to entries from other people
I've also limited tag length to 20 chars (and limit adding more than 5 tags at once)
This commit is contained in:
@ -10,6 +10,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class NewTagType extends AbstractType
|
||||
{
|
||||
public const MAX_LENGTH = 40;
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
@ -17,6 +19,7 @@ class NewTagType extends AbstractType
|
||||
'required' => true,
|
||||
'attr' => [
|
||||
'placeholder' => 'tag.new.placeholder',
|
||||
'max_length' => self::MAX_LENGTH,
|
||||
],
|
||||
])
|
||||
->add('add', SubmitType::class, [
|
||||
|
||||
Reference in New Issue
Block a user