]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
Form: move url and origin_url to UrlType
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / EditEntryType.php
index 40e5b5b9a2cd88e120cd32a96cf0ddbb71208a08..083559286477d5bf53fe8d91cb0f716f37adec8a 100644 (file)
@@ -3,9 +3,9 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
 use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\Extension\Core\Type\TextType;
+use Symfony\Component\Form\Extension\Core\Type\UrlType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -18,15 +18,16 @@ class EditEntryType extends AbstractType
                 'required' => true,
                 'label' => 'entry.edit.title_label',
             ])
-            ->add('is_public', CheckboxType::class, [
-                'required' => false,
-                'label' => 'entry.edit.is_public_label',
-            ])
-            ->add('url', TextType::class, [
+            ->add('url', UrlType::class, [
                 'disabled' => true,
                 'required' => false,
                 'label' => 'entry.edit.url_label',
             ])
+            ->add('origin_url', UrlType::class, [
+                'required' => false,
+                'property_path' => 'originUrl',
+                'label' => 'entry.edit.origin_url_label',
+            ])
             ->add('save', SubmitType::class, [
                 'label' => 'entry.edit.save_label',
             ])