X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FEditEntryType.php;h=083559286477d5bf53fe8d91cb0f716f37adec8a;hb=bfe7a692261760517199a3797191fd214fc2ee6c;hp=2b1e1ef43c76a0c744a37ee6f985b3826ca70e4f;hpb=e008c037f53324b931f027483f9f1053171109c5;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php index 2b1e1ef4..08355928 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php @@ -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; @@ -14,17 +14,31 @@ class EditEntryType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('title', TextType::class, array('required' => true)) - ->add('is_public', CheckboxType::class, array('required' => false)) - ->add('save', SubmitType::class) + ->add('title', TextType::class, [ + 'required' => true, + 'label' => 'entry.edit.title_label', + ]) + ->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', + ]) ; } public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'data_class' => 'Wallabag\CoreBundle\Entity\Entry', - )); + ]); } public function getBlockPrefix()