|  | @@ -4,6 +4,7 @@ namespace App\Form;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  use App\Entity\Article;
 |  |  use App\Entity\Article;
 | 
											
												
													
														|  |  use App\Entity\User;
 |  |  use App\Entity\User;
 | 
											
												
													
														|  | 
 |  | +use App\Service\BaseUrl;
 | 
											
												
													
														|  |  use Symfony\Bridge\Doctrine\Form\Type\EntityType;
 |  |  use Symfony\Bridge\Doctrine\Form\Type\EntityType;
 | 
											
												
													
														|  |  use Symfony\Component\Form\AbstractType;
 |  |  use Symfony\Component\Form\AbstractType;
 | 
											
												
													
														|  |  use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
 |  |  use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
 | 
											
										
											
												
													
														|  | @@ -14,6 +15,11 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  class ArticleType extends AbstractType
 |  |  class ArticleType extends AbstractType
 | 
											
												
													
														|  |  {
 |  |  {
 | 
											
												
													
														|  | 
 |  | +    public function __construct(protected BaseUrl $baseUrl)
 | 
											
												
													
														|  | 
 |  | +    {
 | 
											
												
													
														|  | 
 |  | +        
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      public function buildForm(FormBuilderInterface $builder, array $options): void
 |  |      public function buildForm(FormBuilderInterface $builder, array $options): void
 | 
											
												
													
														|  |      {
 |  |      {
 | 
											
												
													
														|  |          $builder
 |  |          $builder
 | 
											
										
											
												
													
														|  | @@ -24,14 +30,16 @@ class ArticleType extends AbstractType
 | 
											
												
													
														|  |              ])
 |  |              ])
 | 
											
												
													
														|  |              ->add('slug', TextType::class, [
 |  |              ->add('slug', TextType::class, [
 | 
											
												
													
														|  |                  'attr'  => [
 |  |                  'attr'  => [
 | 
											
												
													
														|  | -                    'readonly'  => true,
 |  | 
 | 
											
												
													
														|  | -                    'data-slugger-target'  => 'slug'
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    //'readonly'  => true,
 | 
											
												
													
														|  | 
 |  | +                    'data-slugger-target'  => 'slug',
 | 
											
												
													
														|  | 
 |  | +                    'data-url' => $this->baseUrl->getBasePath()
 | 
											
												
													
														|  |                  ],
 |  |                  ],
 | 
											
												
													
														|  |              ])
 |  |              ])
 | 
											
												
													
														|  |              ->add('content', TextareaType::class, [
 |  |              ->add('content', TextareaType::class, [
 | 
											
												
													
														|  |                  'required'  => false,
 |  |                  'required'  => false,
 | 
											
												
													
														|  |                  'attr'  =>  [
 |  |                  'attr'  =>  [
 | 
											
												
													
														|  |                      'data-controller'   => 'easymde',
 |  |                      'data-controller'   => 'easymde',
 | 
											
												
													
														|  | 
 |  | +                    'data-url' => $this->baseUrl->getBasePath()
 | 
											
												
													
														|  |                  ]
 |  |                  ]
 | 
											
												
													
														|  |              ])
 |  |              ])
 | 
											
												
													
														|  |              ->add('publicationDate', null, [
 |  |              ->add('publicationDate', null, [
 |