src/Form/Type/ProfilRepreneur/CiblesRechercheesType.php line 24

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4.  * @author Mehrez Labidi
  5.  */
  6. namespace App\Form\Type\ProfilRepreneur;
  7. use App\Form\Type\ProfilRepreneur\ProfilRepreneurType;
  8. use Symfony\Component\Form\Extension\Core\Type\{
  9.     ChoiceType,
  10.     DateType,
  11.     TextType,
  12.     HiddenType,
  13.     TextareaType,
  14.     SubmitType
  15. };
  16. use Symfony\Component\Form\FormBuilderInterface;
  17. use App\Form\Type\FormChoices;
  18. class CiblesRechercheesType extends ProfilRepreneurType // form3_cibles_recherchees.html
  19.     public function buildForm(FormBuilderInterface $builder, array $options): void {
  20.         parent::buildForm($builder$options);
  21.         // Section: Votre projet en quelques mots
  22.         $builder
  23.                 ->add('idee'ChoiceType::class, [
  24.                     'label' => 'Avez-vous déjà une idée claire de l\'entreprise que vous recherchez ?',
  25.                     'choices' => [
  26.                         'Non' => 'non',
  27.                         'Oui' => 'oui',
  28.                     ],
  29.                     'expanded' => true,
  30.                     'multiple' => false,
  31.                     'required' => true,
  32.                     'attr' => [
  33.                         'id' => 'idee'
  34.                     ]
  35.                 ])
  36.                 ->add('titre'TextType::class, [
  37.                     'label' => 'Si vous deviez donner un titre à l\'activité ciblée, lequel serait-il ?',
  38.                     'required' => false,
  39.                     'attr' => [
  40.                         'class' => 'form-control',
  41.                         'maxlength' => self::MAXLENGTH_MEDIUM,
  42.                         'id' => 'titre'
  43.                     ],
  44.                 ])
  45.                 ->add('description_entreprise'TextareaType::class, [
  46.                     'label' => 'Comment décririez-vous plus précisément l\'entreprise que vous souhaitez reprendre ?',
  47.                     'required' => false,
  48.                     'attr' => [
  49.                         'class' => 'form-control',
  50.                         'rows' => self::ROWS_SMALL,
  51.                         'maxlength' => self::MAXLENGTH_SHORT,
  52.                         'id' => 'description_entreprise',
  53.                         'onfocus' => 'this.rows = 10',
  54.                         'onblur' => 'this.rows = 3'
  55.                     ],
  56.                 ])
  57.                 ->add('cibles'ChoiceType::class, [
  58.                     'label' => 'Avez-vous déjà identifié des cibles potentielles ?',
  59.                     'choices' => [
  60.                         'Non' => 'non',
  61.                         'Oui' => 'oui',
  62.                     ],
  63.                     'expanded' => true,
  64.                     'multiple' => false,
  65.                     'required' => true,
  66.                     'attr' => [
  67.                         'id' => 'cibles'
  68.                     ]
  69.                 ])
  70.                 ->add('precisions_cibles'TextareaType::class, [
  71.                     'label' => 'Si oui, pouvez-vous nous en dire plus ?',
  72.                     'required' => false,
  73.                     'attr' => [
  74.                         'class' => 'form-control',
  75.                         'rows' => self::ROWS_SMALL,
  76.                         'maxlength' => self::MAXLENGTH_SHORT,
  77.                         'id' => 'precisions_cibles',
  78.                         'onfocus' => 'this.rows = 10',
  79.                         'onblur' => 'this.rows = 3'
  80.                     ],
  81.                 ])
  82.                 // Section: Secteurs d'activité & environnement métier
  83.                 ->add('secteurs_activite_recherchees'HiddenType::class, [
  84.                     'attr' => [
  85.                         'id' => 'secteurs_activite_recherchees',
  86.                     ]
  87.                 ])
  88.                 ->add('precisions_secteurs_activite'TextareaType::class, [
  89.                     'label' => 'Précisez',
  90.                     'required' => false,
  91.                     'attr' => [
  92.                         'class' => 'form-control',
  93.                         'rows' => self::ROWS_SMALL,
  94.                         'maxlength' => self::MAXLENGTH_SHORT,
  95.                         'id' => 'precisions_secteurs_activite',
  96.                         'onfocus' => 'this.rows = 10',
  97.                         'onblur' => 'this.rows = 3'
  98.                     ],
  99.                 ])
  100.                 ->add('exclusion_secteurs'HiddenType::class, [
  101.                     'attr' => [
  102.                         'id' => 'exclusion_secteurs'
  103.                     ]
  104.                 ])
  105.                 ->add('precisions_exclusion_secteurs'TextareaType::class, [
  106.                     'label' => 'Précisez',
  107.                     'required' => false,
  108.                     'attr' => [
  109.                         'class' => 'form-control',
  110.                         'rows' => self::ROWS_SMALL,
  111.                         'maxlength' => self::MAXLENGTH_SHORT,
  112.                         'id' => 'precisions_raison',
  113.                         'onfocus' => 'this.rows = 10',
  114.                         'onblur' => 'this.rows = 3'
  115.                     ],
  116.                 ])
  117.                 ->add('ouvert'ChoiceType::class, [
  118.                     'label' => 'Êtes-vous ouvert à explorer un secteur que vous ne maîtrisez pas encore ?',
  119.                     'choices' => [
  120.                         'Non, je préfère rester sur des secteurs connus' => 'non',
  121.                         'Oui, je suis curieux et adaptable' => 'oui',
  122.                     ],
  123.                     'expanded' => true,
  124.                     'multiple' => false,
  125.                     'required' => true,
  126.                     'attr' => [
  127.                         'id' => 'ouvert'
  128.                     ]
  129.                 ])
  130.                 // Section: Modèle économique et nature d'activité
  131.                 ->add('preference_clientele'ChoiceType::class, [
  132.                     'label' => 'Préférence de clientèle',
  133.                     'choices' => [
  134.                         'B2B' => 'b2b',
  135.                         'B2C' => 'b2c',
  136.                         'Peu importe' => 'peu_importe',
  137.                     ],
  138.                     'expanded' => true,
  139.                     'multiple' => false,
  140.                     'required' => true,
  141.                     'attr' => [
  142.                         'id' => 'preference_clientele'
  143.                     ]
  144.                 ])
  145.                 ->add('technicite'ChoiceType::class, [
  146.                     'label' => 'Quel niveau de technicité souhaitez-vous dans l\'activité à reprendre ?',
  147.                     'choices' => [
  148.                         'Faible (commerce, services courants)' => 'faible',
  149.                         'Modéré (services techniques, fabrication standard)' => 'modere',
  150.                         'Elevé (ingénierie, produits complexes, expertise poussée)' => 'eleve',
  151.                     ],
  152.                     'expanded' => true,
  153.                     'multiple' => false,
  154.                     'required' => true,
  155.                     'attr' => [
  156.                         'id' => 'technicite'
  157.                     ]
  158.                 ])
  159.                 ->add('type_revenus'ChoiceType::class, [
  160.                     'label' => 'Avez-vous une préférence sur le type de revenus ?',
  161.                     'choices' => [
  162.                         'Récurrents (abonnements, contrats de maintenance…)' => 'recurrents',
  163.                         'Ponctuels (ventes unitaires, projets…)' => 'ponctuels',
  164.                         'Peu importe, cela dépend du projet' => 'peu_importe',
  165.                     ],
  166.                     'expanded' => true,
  167.                     'multiple' => false,
  168.                     'required' => true,
  169.                     'attr' => [
  170.                         'id' => 'type_revenus'
  171.                     ]
  172.                 ])
  173.                 ->add('profil_entreprise'ChoiceType::class, [
  174.                     'label' => 'Quel profil d\'entreprise vous attire le plus ?',
  175.                     'choices' => [
  176.                         'Une entreprise déjà structurée, avec une équipe en place à piloter' => 'structuree',
  177.                         'Une entreprise plus modeste, à structurer et faire croître progressivement' => 'modeste',
  178.                         'Peu importe, selon le projet' => 'peu_importe',
  179.                     ],
  180.                     'expanded' => true,
  181.                     'multiple' => false,
  182.                     'required' => true,
  183.                     'attr' => [
  184.                         'id' => 'profil_entreprise'
  185.                     ]
  186.                 ])
  187.                 ->add('precisions_taille_entreprise'TextareaType::class, [
  188.                     'label' => 'Précisez',
  189.                     'required' => false,
  190.                     'attr' => [
  191.                         'class' => 'form-control',
  192.                         'rows' => self::ROWS_SMALL,
  193.                         'maxlength' => self::MAXLENGTH_SHORT,
  194.                         'id' => 'precisions_taille_entreprise',
  195.                         'onfocus' => 'this.rows = 10',
  196.                         'onblur' => 'this.rows = 3'
  197.                     ],
  198.                 ])
  199.                 // Section: Zone géographique
  200.                 ->add('localisations_recherchees'HiddenType::class, [
  201.                     'attr' => [
  202.                         'id' => 'localisations_recherchees',
  203.                     ]
  204.                 ])
  205.                 ->add('precisions_localisations_recherchees'TextareaType::class, [
  206.                     'label' => 'Précisez',
  207.                     'required' => false,
  208.                     'attr' => [
  209.                         'class' => 'form-control',
  210.                         'rows' => self::ROWS_SMALL,
  211.                         'maxlength' => self::MAXLENGTH_SHORT,
  212.                         'id' => 'precisions_localisations_recherchees',
  213.                         'onfocus' => 'this.rows = 10',
  214.                         'onblur' => 'this.rows = 3'
  215.                     ],
  216.                 ])
  217.                 ->add('exclusion_localisation'HiddenType::class, [
  218.                     'attr' => [
  219.                         'id' => 'exclusion_localisation'
  220.                     ]
  221.                 ])
  222.                 ->add('precisions_exclusion_localisation'TextareaType::class, [
  223.                     'label' => 'Précisez',
  224.                     'required' => false,
  225.                     'attr' => [
  226.                         'class' => 'form-control',
  227.                         'rows' => self::ROWS_SMALL,
  228.                         'maxlength' => self::MAXLENGTH_SHORT,
  229.                         'id' => 'precisions_exclusion_localisation',
  230.                         'onfocus' => 'this.rows = 10',
  231.                         'onblur' => 'this.rows = 3'
  232.                     ],
  233.                 ])
  234.                 ->add('international'ChoiceType::class, [
  235.                     'label' => 'Seriez-vous prêt à étudier une opportunité à l\'international ?',
  236.                     'choices' => [
  237.                         'Non' => 'non',
  238.                         'Oui' => 'oui',
  239.                     ],
  240.                     'expanded' => true,
  241.                     'multiple' => false,
  242.                     'required' => true,
  243.                     'attr' => [
  244.                         'id' => 'international'
  245.                     ]
  246.                 ])
  247.                 ->add('precisions_international'TextareaType::class, [
  248.                     'label' => 'Précisez',
  249.                     'required' => false,
  250.                     'attr' => [
  251.                         'class' => 'form-control',
  252.                         'rows' => self::ROWS_SMALL,
  253.                         'maxlength' => self::MAXLENGTH_SHORT,
  254.                         'id' => 'precisions_international',
  255.                         'onfocus' => 'this.rows = 10',
  256.                         'onblur' => 'this.rows = 3'
  257.                     ],
  258.         ]);
  259.         // extra field //  secteurs_activite , HiddenType::class 
  260.         $builder->add('id_secteur_activite1'ChoiceType::class, [
  261.             "label" => "Secteur prédefini",
  262.             'required' => false,
  263.             "choices" => FormChoices::selectionnerChoisir() + self::listIdSecteurs(),
  264.             "attr" => [
  265.                 "autocomplete" => "off",
  266.                 'id' => 'id_secteur_activite1',
  267.                 "class" => "form-control"
  268.             ]
  269.         ]);
  270.         $builder->add('id_secteur_activite2'ChoiceType::class, [
  271.             'required' => false,
  272.             "choices" => FormChoices::selectionnerChoisir(),
  273.             "attr" => [
  274.                 "autocomplete" => "off",
  275.                 'id' => 'id_secteur_activite2',
  276.                 "class" => "form-control"
  277.             ]
  278.         ]);
  279.         $builder->add('id_secteur_activite3'ChoiceType::class, [
  280.             'required' => false,
  281.             "choices" => FormChoices::selectionnerChoisir(),
  282.             "attr" => [
  283.                 "autocomplete" => "off",
  284.                 'id' => 'id_secteur_activite3',
  285.                 "class" => "form-control"
  286.             ]
  287.         ]);
  288.         $builder->add('exclusion_id_secteur_activite1'ChoiceType::class, [
  289.             "label" => "Secteur prédefini",
  290.             'required' => false,
  291.             "choices" => FormChoices::selectionnerChoisir() + self::listIdSecteurs(),
  292.             "attr" => [
  293.                 "autocomplete" => "off",
  294.                 'id' => 'exclusion_id_secteur_activite1',
  295.                 "class" => "form-control"
  296.             ]
  297.         ]);
  298.         $builder->add('exclusion_id_secteur_activite2'ChoiceType::class, [
  299.             'required' => false,
  300.             "choices" => FormChoices::selectionnerChoisir(),
  301.             "attr" => [
  302.                 "autocomplete" => "off",
  303.                 'id' => 'exclusion_id_secteur_activite2',
  304.                 "class" => "form-control"
  305.             ]
  306.         ]);
  307.         $builder->add('exclusion_id_secteur_activite3'ChoiceType::class, [
  308.             'required' => false,
  309.             "choices" => FormChoices::selectionnerChoisir(),
  310.             "attr" => [
  311.                 "autocomplete" => "off",
  312.                 'id' => 'exclusion_id_secteur_activite3',
  313.                 "class" => "form-control"
  314.             ]
  315.         ]);
  316.         // extra field // ->add('zones', HiddenType::class 
  317.         $builder->add('id_pays'ChoiceType::class, [
  318.             "label" => "Pays",
  319.             "required" => false,
  320.             "choices" => FormChoices::selectionnerChoisir() + self::listIdPays(),
  321.             "attr" => [
  322.                 'id' => 'id_pays',
  323.                 "class" => "form-control"
  324.             ]
  325.         ]);
  326.         $builder->add('id_region'ChoiceType::class, [
  327.             "required" => false,
  328.             "choices" => FormChoices::selectionnerChoisir(),
  329.             "attr" => [
  330.                 'id' => 'id_region',
  331.                 "class" => "form-control"
  332.             ],
  333.         ]);
  334.         $builder->add('id_departement'ChoiceType::class, [
  335.             "required" => false,
  336.             "choices" => FormChoices::selectionnerChoisir(),
  337.             "attr" => [
  338.                 'id' => 'id_departement',
  339.                 "class" => "form-control"
  340.             ],
  341.         ]);
  342.         $builder->add('exclusion_id_pays'ChoiceType::class, [
  343.             "label" => "Pays",
  344.             "required" => false,
  345.             "choices" => FormChoices::selectionnerChoisir() + self::listIdPays(),
  346.             "attr" => [
  347.                 'id' => 'exclusion_id_pays',
  348.                 "class" => "form-control"
  349.             ]
  350.         ]);
  351.         $builder->add('exclusion_id_region'ChoiceType::class, [
  352.             "required" => false,
  353.             "choices" => FormChoices::selectionnerChoisir(),
  354.             "attr" => [
  355.                 'id' => 'exclusion_id_region',
  356.                 "class" => "form-control"
  357.             ],
  358.         ]);
  359.         $builder->add('exclusion_id_departement'ChoiceType::class, [
  360.             "required" => false,
  361.             "choices" => FormChoices::selectionnerChoisir(),
  362.             "attr" => [
  363.                 'id' => 'exclusion_id_departement',
  364.                 "class" => "form-control"
  365.             ],
  366.         ]);
  367.         // taille_entreprise
  368.         /*         * *************************************************************** Situation financière *************************************************** */
  369.         $builder->add('prix_cession_min'HiddenType::class, [
  370.             "attr" => [
  371.                 "autocomplete" => "off",
  372.                 "class" => "form-control",
  373.                 "id" => "prix_cession_min"
  374.                 ]
  375.         ]);
  376.         $builder->add('prix_cession_max'HiddenType::class, [
  377.             "attr" => ["autocomplete" => "off",
  378.                 "class" => "form-control",
  379.                 "id" => "prix_cession_max"
  380.                 ]
  381.         ]);
  382.         $builder->add('ca_min'HiddenType::class, [
  383.             "attr" => [
  384.                 "autocomplete" => "off",
  385.                 "class" => "form-control",
  386.                 "id" => "ca_min"
  387.             ]
  388.         ]);
  389.         $builder->add('ca_max'HiddenType::class, [
  390.             "attr" => [
  391.                 "autocomplete" => "off",
  392.                 "class" => "form-control",
  393.                 "id" => "ca_max"
  394.                 ]
  395.         ]);
  396.         $builder->add('nb_personnes_min'HiddenType::class, [
  397.             "attr" => [
  398.                 "autocomplete" => "off",
  399.                 "class" => "form-control",
  400.                 "id" => "nb_personnes_min"
  401.                 ]
  402.         ]);
  403.         $builder->add('nb_personnes_max'HiddenType::class, [
  404.             "attr" => [
  405.                 "autocomplete" => "off",
  406.                 "class" => "form-control",
  407.                 "id" => "nb_personnes_max"
  408.                 ]
  409.         ]);
  410.         /*         * *************************************************************** Situation financière *************************************************** */
  411.         // prix_cession
  412.         // ca
  413.         // nb_personnes 
  414.     }
  415. }