]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/NewTagType.php
Added new tag form in mobile view for Material theme
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / NewTagType.php
index 3db4105fc3e5de4213809fc9636122b9f1b0a45c..e830ade480d7dde9a4bb4b819cb093b563b1e141 100644 (file)
@@ -3,6 +3,7 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -12,7 +13,15 @@ class NewTagType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('label', TextType::class, ['required' => true])
+            ->add('label', TextType::class, [
+                'required' => true,
+                'attr' => [
+                    'placeholder' => 'tag.new.placeholder',
+                ],
+            ])
+            ->add('add', SubmitType::class, [
+                'label' => 'tag.new.add',
+            ])
         ;
     }