Commit 54ca3a9e by Damien Moulard

Merge branch '5652-pdv-inscription-par-formulaire' into 'ssa-gironde'

5652 pdv inscription par formulaire

See merge request cooperatic/kohinos-tav!51
parents e7ac1e34 d73de2dc
...@@ -330,6 +330,11 @@ form[name="formEncaissement"] label { ...@@ -330,6 +330,11 @@ form[name="formEncaissement"] label {
border-color: transparent transparent black transparent; border-color: transparent transparent black transparent;
} }
.global-evaluation-container {
background-color:powderblue;
border-radius:10px;
border: 5px solid powderblue;
}
/** /**
* END Success check animation. * END Success check animation.
*/ */
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"/build/app.a8f5cd0d.js" "/build/app.a8f5cd0d.js"
], ],
"css": [ "css": [
"/build/app.9c351632.css" "/build/app.8e23f36c.css"
] ]
}, },
"admin": { "admin": {
......
{ {
"build/app.css": "/build/app.9c351632.css", "build/app.css": "/build/app.8e23f36c.css",
"build/app.js": "/build/app.a8f5cd0d.js", "build/app.js": "/build/app.a8f5cd0d.js",
"build/admin.css": "/build/admin.5dc0eea7.css", "build/admin.css": "/build/admin.5dc0eea7.css",
"build/admin.js": "/build/admin.cee4d78d.js", "build/admin.js": "/build/admin.cee4d78d.js",
......
...@@ -44,6 +44,9 @@ class Prestataire extends AccountableObject implements AccountableInterface ...@@ -44,6 +44,9 @@ class Prestataire extends AccountableObject implements AccountableInterface
use HasEcompteEntity; use HasEcompteEntity;
use HasAccountsTrait; use HasAccountsTrait;
const DISTRIBUTOR = 'distributor';
const PRODUCER = 'producer';
/** /**
* @var \Ramsey\Uuid\UuidInterface * @var \Ramsey\Uuid\UuidInterface
* *
...@@ -198,6 +201,22 @@ class Prestataire extends AccountableObject implements AccountableInterface ...@@ -198,6 +201,22 @@ class Prestataire extends AccountableObject implements AccountableInterface
private $horaires; private $horaires;
/** /**
* @var string|null (champ libre)
*
* @ORM\Column(name="marketchannelfunction", type="text", nullable=true)
* @Groups({"read", "write"})
*/
private $marketchannelfunction;
public function setMarketChannelFunction($var)
{
$this->marketchannelfunction = $var;
}
public function getMarketChannelFunction()
{
return $this->marketchannelfunction;
}
/**
* @var TypePrestataire * @var TypePrestataire
* *
* @ORM\ManyToOne(targetEntity="TypePrestataire", cascade={"persist"}, inversedBy="prestataires") * @ORM\ManyToOne(targetEntity="TypePrestataire", cascade={"persist"}, inversedBy="prestataires")
...@@ -206,6 +225,21 @@ class Prestataire extends AccountableObject implements AccountableInterface ...@@ -206,6 +225,21 @@ class Prestataire extends AccountableObject implements AccountableInterface
private $typeprestataire; private $typeprestataire;
/** /**
* @var SelfEvalPrestaQuiz
* @ORM\OneToOne(targetEntity="SelfEvalPrestaQuiz", cascade={"persist"})
* @ORM\JoinColumn(name="selfevalprestaquiz_id", referencedColumnName="id", nullable=true)
*/
protected $selfevalprestaquiz;
public function setSelfEvalPrestaQuiz($var)
{
$this->selfevalprestaquiz = $var;
}
public function getSelfEvalPrestaQuiz()
{
return $this->selfevalprestaquiz;
}
/**
* @var ArrayCollection|Rubrique[] * @var ArrayCollection|Rubrique[]
* @ORM\ManyToMany(targetEntity="Rubrique", mappedBy="prestataires", cascade={"persist"}, fetch="EXTRA_LAZY") * @ORM\ManyToMany(targetEntity="Rubrique", mappedBy="prestataires", cascade={"persist"}, fetch="EXTRA_LAZY")
* @Groups({"read", "write"}) * @Groups({"read", "write"})
...@@ -748,7 +782,7 @@ class Prestataire extends AccountableObject implements AccountableInterface ...@@ -748,7 +782,7 @@ class Prestataire extends AccountableObject implements AccountableInterface
* *
* @return $this * @return $this
*/ */
public function removeUser(User $users) public function removeUser(User $user)
{ {
if ($this->users->contains($user)) { if ($this->users->contains($user)) {
$this->users->removeElement($user); $this->users->removeElement($user);
...@@ -790,7 +824,7 @@ class Prestataire extends AccountableObject implements AccountableInterface ...@@ -790,7 +824,7 @@ class Prestataire extends AccountableObject implements AccountableInterface
* *
* @return $this * @return $this
*/ */
public function removeCaissier(User $caissiers) public function removeCaissier(User $caissier)
{ {
if ($this->caissiers->contains($caissier)) { if ($this->caissiers->contains($caissier)) {
$this->caissiers->removeElement($caissier); $this->caissiers->removeElement($caissier);
......
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Doctrine\UuidGenerator;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity
* @ORM\Table(name="selfevalprestaquiz")
*/
class SelfEvalPrestaQuiz
{
/*
* This class is really just about storing results of a form in a database.
* Attributes are not going to be part of any logic code.
* I opt to set all attributes public to save coding time.
*/
/**
* @var \Ramsey\Uuid\UuidInterface
*
* @ORM\Id
* @ORM\Column(type="uuid", unique=true)
* @ORM\GeneratedValue(strategy="CUSTOM")
* @ORM\CustomIdGenerator(class=UuidGenerator::class)
* @Groups({"read"})
*/
protected $id;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $accessib_geophy;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $accessib_tempor;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $accessib_edupop;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $accessib_divers;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $accessib_vulner;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $accessib_geophy_comment;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $accessib_tempor_comment;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $accessib_edupop_comment;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $accessib_divers_comment;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $accessib_vulner_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $bienetre_format;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $bienetre_format_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $bienetre_impgou;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $bienetre_impgou_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $bienetre_bienet;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $bienetre_bienet_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $bienetre_recben;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $bienetre_recben_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $transpar_jusrem;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $transpar_jusrem_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $transpar_transp;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $transpar_transp_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $transpar_relpro;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $transpar_relpro_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $disagdur_labels;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $disagdur_labels_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $disagdur_condur;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $disagdur_condur_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_labels;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_labels_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_valbio;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_valbio_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_ecorec;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_ecorec_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_pertes;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_pertes_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_climat;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_climat_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_geneti;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_geneti_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_prosol;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_prosol_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $localite_probru;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $localite_probru_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $localite_protra;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $localite_protra_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $accessib_global;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $accessib_global_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $bienetre_global;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $bienetre_global_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $transpar_global;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $transpar_global_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $disagdur_global;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $disagdur_global_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $proagdur_global;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $proagdur_global_comment;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
public $localite_global;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
public $localite_global_comment;
}
<?php
namespace App\Form\Type;
use App\Entity\Prestataire;
use App\Entity\SelfEvalPrestaQuiz;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class DistributorSelfEvalPrestaQuizType extends SelfEvalPrestaQuizType
{
public function __construct()
{
parent::__construct();
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
/* PARTIE 3 : TRANSPARENCE ET JUSTE REMUNERATION */
$this->opts['label'] = "Juste rémunération : les prix d'achats aux producteurs correspondent-ils au coût de la production (y compris la rémunération) ?";
$this->opts['choices'] = [
$this->frown . " pas connaissance du coût de production des produits achetés" => 0,
$this->meh . " ne correspondent pas toujours mais connaissance du coût de production" => 1,
$this->smile . " oui" => 2,
];
$builder->add('transpar_jusrem', ChoiceType::class, $this->opts);
$builder->add('transpar_jusrem_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Transparence : les consommateurs peuvent-ils accéder à des informations leur permettant de comprendre
comment les prix des produits sont construits ?";
$this->opts['choices'] = [
$this->frown . " aucun moyen d'avoir accès aux informations" => 0,
$this->meh . " au moins via l'équipe en discutant" => 1,
$this->smile . " affichages et en discutant" => 2,
];
$builder->add('transpar_transp', ChoiceType::class, $this->opts);
$builder->add('transpar_transp_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Relation au producteur : sur l'offre alimentaire globale, quels sont les circuits de commercialisation majoritaires ?";
$this->opts['choices'] = [
$this->frown . " plus de 2 intermédiaires connus ou intraçable" => 0,
$this->meh . " 2 intermédiaires connus" => 1,
$this->smile . " 0 ou 1 intermédiaire connu" => 2,
];
$builder->add('transpar_relpro', ChoiceType::class, $this->opts);
$builder->add('transpar_relpro_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Transparence et juste rémunération : " . $this->labelEvalGlob;
$this->opts['choices'] = $this->stdGlobalChoices;
$builder->add('transpar_global', ChoiceType::class, $this->opts);
$builder->add('transpar_global_comment', TextareaType::class, $this->cmtOpts);
/* PARTIE 4 : PRATIQUES AGRICOLES DURABLES */
$this->opts['label'] = "Détenez-vous des labels ou des certifications (AB, Bio, Nature et Progrès, système de garantie
participatif ou équivalent minimum ?";
$this->opts['choices'] = [
$this->frown . " moins de 50 % des produits" => 0,
$this->meh . " entre 50 et 70% des produits" => 1,
$this->smile . " plus de 70 % des produits" => 2,
];
$builder->add('disagdur_labels', ChoiceType::class, $this->opts);
$builder->add('disagdur_labels_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Le lieu s'assure-t-il que ses produits alimentaires non labellisés mais conventionnables sont issus
de pratiques agricoles durables ?";
$this->opts['choices'] = [
$this->frown . " non" => 0,
$this->meh . " oui pas des échanges avec le producteur ou le revendeur qui connaît les pratiques agricoles du secteur" => 1,
$this->smile . " oui" => 2,
];
$builder->add('disagdur_condur', ChoiceType::class, $this->opts);
$builder->add('disagdur_condur_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Pratiques agricoles durables : " . $this->labelEvalGlob;
$this->opts['choices'] = $this->stdGlobalChoices;
$builder->add('disagdur_global', ChoiceType::class, $this->opts);
$builder->add('disagdur_global_comment', TextareaType::class, $this->cmtOpts);
/* PARTIE 5 : LOCALITE DES PRODUITS */
$this->opts['label'] = "Quelle est la provenance de l'offre alimentaire globale en produits bruts ?";
$this->opts['choices'] = [
$this->frown . " 0 à 49 % de produits locaux (moins de 250 km à la ronde)" => 0,
$this->meh . " 50 à 79 % de produits locaux (moins de 250 km à la ronde)" => 1,
$this->smile . " plus de 80 % de produits locaux (moins de 250 km à la ronde)" => 2,
];
$builder->add('localite_probru', ChoiceType::class, $this->opts);
$builder->add('localite_probru_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Quelle est la provenance de l'offre alimentaire globale en produits transformés ?";
$this->opts['choices'] = [
$this->frown . " 0 à 24 % de produits locaux (moins de 250 km à la ronde)" => 0,
$this->meh . " 25 à 49 % de produits locaux (moins de 250 km à la ronde)" => 1,
$this->smile . " plus de 50 % de produits locaux (moins de 250 km à la ronde)" => 2,
];
$builder->add('localite_protra', ChoiceType::class, $this->opts);
$builder->add('localite_protra_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Localité des produits : " . $this->labelEvalGlob;
$this->opts['choices'] = $this->stdGlobalChoices;
$builder->add('localite_global', ChoiceType::class, $this->opts);
$builder->add('localite_global_comment', TextareaType::class, $this->cmtOpts);
}
/**
*
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => SelfEvalPrestaQuiz::class,
]);
}
public function getBlockPrefix(): string
{
return 'formDistributorSelfEvalPrestaQuiz';
}
}
<?php
namespace App\Form\Type;
use App\Entity\Prestataire;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
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;
use Symfony\Component\Validator\Constraints\NotNull;
/**
* Identification questionnaire for prestataire.
*/
class InfosPrestaQuizType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('userFirstName', TextType::class, [
'mapped' => false, //store it into the user
'label' => 'Prénom',
'required' => true,
'constraints' => [new NotNull()],
])
->add('userLastName', TextType::class, [
'mapped' => false, //store it into the user
'label' => 'Nom',
'required' => true,
'constraints' => [new NotNull()],
])
->add('raison', TextType::class, [
'required' => true,
'constraints' => [new NotNull()],
])
->add('responsable', TextType::class, [
'required' => true,
'constraints' => [new NotNull()],
])
->add('metier', TextType::class, [
'label' => 'Métier responsable',
'required' => true,
'constraints' => [new NotNull()],
])
->add('horaires', TextType::class, [
'label' => 'Jours, horaires et périodes de fermeture pour congés :',
'required' => true,
'constraints' => [new NotNull()],
])
->add('geolocs', CollectionType::class, [
'entry_type' => GeolocPrestataireFormType::class,
'entry_options' => ['label' => false, 'with_latlon' => false],
'required' => true,
'allow_add' => false,
'allow_delete' => false,
'by_reference' => false,
'label' => false,
])
->add('marketchannelfunction', ChoiceType::class, [
'label' => 'Fonction dans le circuit de distribution',
'choices' => [
'Distributeur/distributrice' => Prestataire::DISTRIBUTOR,
'Producteur/productrice' => Prestataire::PRODUCER,
],
'required' => true,
'constraints' => [new NotNull()],
])
->add('save', SubmitType::class, ['label' => 'Envoyer'])
;
}
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Prestataire::class,
]);
}
public function getBlockPrefix(): string
{
return 'formInfosPrestaQuiz';
}
}
<?php
namespace App\Form\Type;
use App\Entity\Prestataire;
use App\Entity\SelfEvalPrestaQuiz;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ProducerSelfEvalPrestaQuizType extends SelfEvalPrestaQuizType
{
public function __construct()
{
parent::__construct();
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
/* PARTIE 4 : PRATIQUES AGRICOLES DURABLES */
$this->opts['label'] = "Détenez-vous des labels ou des certifications (AB Bio, Nature et Progrès, système de garantie participatif ou équivalent minimum) ?";
$this->opts['choices'] = [
$this->frown . " non" => 0,
$this->smile . " oui" => 2,
];
$builder->add('proagdur_labels', ChoiceType::class, $this->opts);
$builder->add('proagdur_labels_comment', TextareaType::class, $this->cmtOpts);
//Jusqu'à la fin
$this->opts['choices'] = $this->stdChoices;
$this->opts['label'] = "Les pratiques agricoles permettent-elles de valoriser la biodiversité ?";
$builder->add('proagdur_valbio', ChoiceType::class, $this->opts);
$builder->add('proagdur_valbio_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Les pratiques agricoles permettent-elles l'économie ou le recyclage de l'énergie, de l'eau, de la matière organique, des nutriments ?";
$builder->add('proagdur_ecorec', ChoiceType::class, $this->opts);
$builder->add('proagdur_ecorec_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Les pratiques agricoles réduisent-elles les pertes agricoles (au champ ou post-récolte) ?";
$builder->add('proagdur_pertes', ChoiceType::class, $this->opts);
$builder->add('proagdur_pertes_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Les pratiques agricoles contribuent-elles à l'atténuation ou à l'adaptation au changement climatique ?";
$builder->add('proagdur_climat', ChoiceType::class, $this->opts);
$builder->add('proagdur_climat_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Les pratiques agricoles permettent-elles de renforcer l'autonomie de la ferme en ressources génétiques (végétales ou animales), en eau, en intrants, en énergie ?";
$builder->add('proagdur_geneti', ChoiceType::class, $this->opts);
$builder->add('proagdur_geneti_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Les pratiques agricoles permettent-elles la protection des sols ?";
$builder->add('proagdur_prosol', ChoiceType::class, $this->opts);
$builder->add('proagdur_prosol_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Pratiques agricoles durables : " . $this->labelEvalGlob . " (cochez vert si vous détenez un label ou une certification)";
$this->opts['choices'] = $this->stdGlobalChoices;
$builder->add('proagdur_global', ChoiceType::class, $this->opts);
$builder->add('proagdur_global_comment', TextareaType::class, $this->cmtOpts);
}
/**
*
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => SelfEvalPrestaQuiz::class,
]);
}
public function getBlockPrefix(): string
{
return 'formProducerSelfEvalPrestaQuiz';
}
}
<?php
namespace App\Form\Type;
use App\Entity\SelfEvalPrestaQuiz;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\NotNull;
/**
*
* Self-eval prestataire questionnaire base class
* containing useful attributes and buildForm for
* sections that are common to distributors and producers
*/
class SelfEvalPrestaQuizType extends AbstractType
{
protected array $stdChoices;
protected array $opts;
protected array $cmtOpts;
protected string $labelEvalGlob;
protected string $frown;
protected string $meh;
protected string $smile;
public function __construct()
{
$this->frown = '<i class="fas fa-frown text-danger"></i>';
$this->meh = '<i class="fas fa-meh text-warning"></i>';
$this->smile = '<i class="fas fa-smile text-success"></i>';
$this->stdChoices = [
$this->frown . ' non' => 0,
$this->meh . ' moyennement' => 1,
$this->smile . ' oui' => 2,
];
$this->stdGlobalChoices = [
$this->frown => 0,
$this->meh => 1,
$this->smile => 2,
];
$this->opts = [
'label' => '',
'choices' => $this->stdChoices,
'expanded' => true,
"multiple" => false,
'constraints' => [new NotNull()],
];
$this->cmtOpts = [
'attr' => ['placeholder' => 'Commentaires'],
'label' => false,
'required' => false,
];
$this->labelEvalGlob = "évaluation globale";
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
/* PARTIE 1 : ACCESSIBILITE ET INCLUSIVITE */
$this->opts['label'] = "Géographique et physique : le lieu est-il accessible par différents modes de transport ?";
$this->opts['choices'] = [
$this->frown . " 0 mode de transport" => 0,
$this->meh . " 1 mode de transport" => 1,
$this->smile . " plus d'1 mode de transport" => 2,
];
$builder->add('accessib_geophy', ChoiceType::class, $this->opts);
$builder->add('accessib_geophy_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Temporelle : le lieu communique-t-il sur ses plages d'ouvertures ?";
$this->opts['choices'] = [
$this->frown . " 0 mode de communication" => 0,
$this->meh . " 1 mode de communication" => 1,
$this->smile . " plus d'1 mode de communication" => 2,
];
$builder->add('accessib_tempor', ChoiceType::class, $this->opts);
$builder->add('accessib_tempor_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Sociale et inclusivité (1/3) : le lieu mène-t-il des actions de sensibilisation et d'éducation populaire à l'alimentation ?";
$this->opts['choices'] = $this->stdChoices;
$builder->add('accessib_edupop', ChoiceType::class, $this->opts);
$builder->add('accessib_edupop_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Sociale et inclusivité (2/3) : le lieu propose-t-il des services spécifiques pour faciliter son accessibilité à une diversité
de profils (pour les personnes agées, les personnes en situation de handicap, les familles ...) ?";
$this->opts['choices'] = $this->stdChoices;
$builder->add('accessib_divers', ChoiceType::class, $this->opts);
$builder->add('accessib_divers_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Sociale et inclusivité (3/3) : le lieu mène-t-il des actions spécifiques pour lutter contre la vulnérabilité alimentaire ?";
$this->opts['choices'] = $this->stdChoices;
$builder->add('accessib_vulner', ChoiceType::class, $this->opts);
$builder->add('accessib_vulner_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Accessibilité et inclusivité : " . $this->labelEvalGlob;
$this->opts['choices'] = $this->stdGlobalChoices;
$builder->add('accessib_global', ChoiceType::class, $this->opts);
$builder->add('accessib_global_comment', TextareaType::class, $this->cmtOpts);
/* PARTIE 2 : BIEN-ETRE AU TRAVAIL */
$this->opts['label'] = "Le lieu met-il en place des actions pour faciliter l'accueil, l'intégration et la formation des personnes qui y travaillent ?";
$this->opts['choices'] = $this->stdChoices;
$builder->add('bienetre_format', ChoiceType::class, $this->opts);
$builder->add('bienetre_format_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Les travailleurs sont-ils impliqués dans la gouvernance ?";
$this->opts['choices'] = $this->stdChoices;
$builder->add('bienetre_impgou', ChoiceType::class, $this->opts);
$builder->add('bienetre_impgou_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Le lieu met-il en place des actions pour améliorer le bien-être des personnes qui y travaillent ?";
$this->opts['choices'] = $this->stdChoices;
$builder->add('bienetre_bienet', ChoiceType::class, $this->opts);
$builder->add('bienetre_bienet_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Le lieu met-il en place des actions pour valoriser et reconnaître le travail fourni par les bénévoles ?";
$this->opts['choices'] = $this->stdChoices;
$builder->add('bienetre_recben', ChoiceType::class, $this->opts);
$builder->add('bienetre_recben_comment', TextareaType::class, $this->cmtOpts);
$this->opts['label'] = "Bien-être au travail : " . $this->labelEvalGlob;
$this->opts['choices'] = $this->stdGlobalChoices;
$builder->add('bienetre_global', ChoiceType::class, $this->opts);
$builder->add('bienetre_global_comment', TextareaType::class, $this->cmtOpts);
$builder->add('save', SubmitType::class, ['label' => 'Envoyer'])
;
}
/**
*
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => SelfEvalPrestaQuiz::class,
]);
}
public function getBlockPrefix(): string
{
return 'formSelfEvalPrestaQuiz';
}
}
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240214104305 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE selfevalprestaquiz (id CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', accessib_geophy INT NOT NULL, accessib_tempor INT NOT NULL, accessib_edupop INT NOT NULL, accessib_divers INT NOT NULL, accessib_vulner INT NOT NULL, accessib_geophy_comment LONGTEXT NOT NULL, accessib_tempor_comment LONGTEXT NOT NULL, accessib_edupop_comment LONGTEXT NOT NULL, accessib_divers_comment LONGTEXT NOT NULL, accessib_vulner_comment LONGTEXT NOT NULL, bienetre_format INT NOT NULL, bienetre_format_comment LONGTEXT NOT NULL, bienetre_impgou INT NOT NULL, bienetre_impgou_comment LONGTEXT NOT NULL, bienetre_bienet INT NOT NULL, bienetre_bienet_comment LONGTEXT NOT NULL, bienetre_recben INT NOT NULL, bienetre_recben_comment LONGTEXT NOT NULL, transpar_jusrem INT NOT NULL, transpar_jusrem_comment LONGTEXT NOT NULL, transpar_transp INT NOT NULL, transpar_transp_comment LONGTEXT NOT NULL, transpar_relpro INT NOT NULL, transpar_relpro_comment LONGTEXT NOT NULL, disagdur_labels INT NOT NULL, disagdur_labels_comment LONGTEXT NOT NULL, disagdur_condur INT NOT NULL, disagdur_condur_comment LONGTEXT NOT NULL, proagdur_labels INT NOT NULL, proagdur_labels_comment LONGTEXT NOT NULL, proagdur_valbio INT NOT NULL, proagdur_valbio_comment LONGTEXT NOT NULL, proagdur_ecorec INT NOT NULL, proagdur_ecorec_comment LONGTEXT NOT NULL, proagdur_pertes INT NOT NULL, proagdur_pertes_comment LONGTEXT NOT NULL, proagdur_climat INT NOT NULL, proagdur_climat_comment LONGTEXT NOT NULL, proagdur_geneti INT NOT NULL, proagdur_geneti_comment LONGTEXT NOT NULL, proagdur_prosol INT NOT NULL, proagdur_prosol_comment LONGTEXT NOT NULL, localite_probru INT NOT NULL, localite_probru_comment LONGTEXT NOT NULL, localite_protra INT NOT NULL, localite_protra_comment LONGTEXT NOT NULL, accessib_global INT NOT NULL, accessib_global_comment LONGTEXT NOT NULL, bienetre_global INT NOT NULL, bienetre_global_comment LONGTEXT NOT NULL, transpar_global INT NOT NULL, transpar_global_comment LONGTEXT NOT NULL, disagdur_global INT NOT NULL, disagdur_global_comment LONGTEXT NOT NULL, proagdur_global INT NOT NULL, proagdur_global_comment LONGTEXT NOT NULL, localite_global INT NOT NULL, localite_global_comment LONGTEXT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_general_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE prestataire ADD selfevalprestaquiz_id CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD marketchannelfunction LONGTEXT DEFAULT NULL, CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\'');
$this->addSql('ALTER TABLE prestataire ADD CONSTRAINT FK_60A26480C5DC59A8 FOREIGN KEY (selfevalprestaquiz_id) REFERENCES selfevalprestaquiz (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_60A26480C5DC59A8 ON prestataire (selfevalprestaquiz_id)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire DROP FOREIGN KEY FK_60A26480C5DC59A8');
$this->addSql('DROP TABLE selfevalprestaquiz');
$this->addSql('DROP INDEX UNIQ_60A26480C5DC59A8 ON prestataire');
$this->addSql('ALTER TABLE prestataire DROP selfevalprestaquiz_id, DROP marketchannelfunction, CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\'');
}
}
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240214152548 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\'');
$this->addSql('ALTER TABLE selfevalprestaquiz CHANGE accessib_geophy_comment accessib_geophy_comment LONGTEXT DEFAULT NULL, CHANGE accessib_tempor_comment accessib_tempor_comment LONGTEXT DEFAULT NULL, CHANGE accessib_edupop_comment accessib_edupop_comment LONGTEXT DEFAULT NULL, CHANGE accessib_divers_comment accessib_divers_comment LONGTEXT DEFAULT NULL, CHANGE accessib_vulner_comment accessib_vulner_comment LONGTEXT DEFAULT NULL, CHANGE bienetre_format_comment bienetre_format_comment LONGTEXT DEFAULT NULL, CHANGE bienetre_impgou_comment bienetre_impgou_comment LONGTEXT DEFAULT NULL, CHANGE bienetre_bienet_comment bienetre_bienet_comment LONGTEXT DEFAULT NULL, CHANGE bienetre_recben_comment bienetre_recben_comment LONGTEXT DEFAULT NULL, CHANGE transpar_jusrem_comment transpar_jusrem_comment LONGTEXT DEFAULT NULL, CHANGE transpar_transp_comment transpar_transp_comment LONGTEXT DEFAULT NULL, CHANGE transpar_relpro_comment transpar_relpro_comment LONGTEXT DEFAULT NULL, CHANGE disagdur_labels_comment disagdur_labels_comment LONGTEXT DEFAULT NULL, CHANGE disagdur_condur_comment disagdur_condur_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_labels_comment proagdur_labels_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_valbio_comment proagdur_valbio_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_ecorec_comment proagdur_ecorec_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_pertes_comment proagdur_pertes_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_climat_comment proagdur_climat_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_geneti_comment proagdur_geneti_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_prosol_comment proagdur_prosol_comment LONGTEXT DEFAULT NULL, CHANGE localite_probru_comment localite_probru_comment LONGTEXT DEFAULT NULL, CHANGE localite_protra_comment localite_protra_comment LONGTEXT DEFAULT NULL, CHANGE accessib_global_comment accessib_global_comment LONGTEXT DEFAULT NULL, CHANGE bienetre_global_comment bienetre_global_comment LONGTEXT DEFAULT NULL, CHANGE transpar_global_comment transpar_global_comment LONGTEXT DEFAULT NULL, CHANGE disagdur_global_comment disagdur_global_comment LONGTEXT DEFAULT NULL, CHANGE proagdur_global_comment proagdur_global_comment LONGTEXT DEFAULT NULL, CHANGE localite_global_comment localite_global_comment LONGTEXT DEFAULT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\'');
$this->addSql('ALTER TABLE selfevalprestaquiz CHANGE accessib_geophy_comment accessib_geophy_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE accessib_tempor_comment accessib_tempor_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE accessib_edupop_comment accessib_edupop_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE accessib_divers_comment accessib_divers_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE accessib_vulner_comment accessib_vulner_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE bienetre_format_comment bienetre_format_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE bienetre_impgou_comment bienetre_impgou_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE bienetre_bienet_comment bienetre_bienet_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE bienetre_recben_comment bienetre_recben_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE transpar_jusrem_comment transpar_jusrem_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE transpar_transp_comment transpar_transp_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE transpar_relpro_comment transpar_relpro_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE disagdur_labels_comment disagdur_labels_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE disagdur_condur_comment disagdur_condur_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_labels_comment proagdur_labels_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_valbio_comment proagdur_valbio_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_ecorec_comment proagdur_ecorec_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_pertes_comment proagdur_pertes_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_climat_comment proagdur_climat_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_geneti_comment proagdur_geneti_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_prosol_comment proagdur_prosol_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE localite_probru_comment localite_probru_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE localite_protra_comment localite_protra_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE accessib_global_comment accessib_global_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE bienetre_global_comment bienetre_global_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE transpar_global_comment transpar_global_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE disagdur_global_comment disagdur_global_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE proagdur_global_comment proagdur_global_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, CHANGE localite_global_comment localite_global_comment LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`');
}
}
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240214152700 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\'');
$this->addSql('ALTER TABLE selfevalprestaquiz CHANGE accessib_geophy accessib_geophy INT DEFAULT NULL, CHANGE accessib_tempor accessib_tempor INT DEFAULT NULL, CHANGE accessib_edupop accessib_edupop INT DEFAULT NULL, CHANGE accessib_divers accessib_divers INT DEFAULT NULL, CHANGE accessib_vulner accessib_vulner INT DEFAULT NULL, CHANGE bienetre_format bienetre_format INT DEFAULT NULL, CHANGE bienetre_impgou bienetre_impgou INT DEFAULT NULL, CHANGE bienetre_bienet bienetre_bienet INT DEFAULT NULL, CHANGE bienetre_recben bienetre_recben INT DEFAULT NULL, CHANGE transpar_jusrem transpar_jusrem INT DEFAULT NULL, CHANGE transpar_transp transpar_transp INT DEFAULT NULL, CHANGE transpar_relpro transpar_relpro INT DEFAULT NULL, CHANGE disagdur_labels disagdur_labels INT DEFAULT NULL, CHANGE disagdur_condur disagdur_condur INT DEFAULT NULL, CHANGE proagdur_labels proagdur_labels INT DEFAULT NULL, CHANGE proagdur_valbio proagdur_valbio INT DEFAULT NULL, CHANGE proagdur_ecorec proagdur_ecorec INT DEFAULT NULL, CHANGE proagdur_pertes proagdur_pertes INT DEFAULT NULL, CHANGE proagdur_climat proagdur_climat INT DEFAULT NULL, CHANGE proagdur_geneti proagdur_geneti INT DEFAULT NULL, CHANGE proagdur_prosol proagdur_prosol INT DEFAULT NULL, CHANGE localite_probru localite_probru INT DEFAULT NULL, CHANGE localite_protra localite_protra INT DEFAULT NULL, CHANGE accessib_global accessib_global INT DEFAULT NULL, CHANGE bienetre_global bienetre_global INT DEFAULT NULL, CHANGE transpar_global transpar_global INT DEFAULT NULL, CHANGE disagdur_global disagdur_global INT DEFAULT NULL, CHANGE proagdur_global proagdur_global INT DEFAULT NULL, CHANGE localite_global localite_global INT DEFAULT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\'');
$this->addSql('ALTER TABLE selfevalprestaquiz CHANGE accessib_geophy accessib_geophy INT NOT NULL, CHANGE accessib_tempor accessib_tempor INT NOT NULL, CHANGE accessib_edupop accessib_edupop INT NOT NULL, CHANGE accessib_divers accessib_divers INT NOT NULL, CHANGE accessib_vulner accessib_vulner INT NOT NULL, CHANGE bienetre_format bienetre_format INT NOT NULL, CHANGE bienetre_impgou bienetre_impgou INT NOT NULL, CHANGE bienetre_bienet bienetre_bienet INT NOT NULL, CHANGE bienetre_recben bienetre_recben INT NOT NULL, CHANGE transpar_jusrem transpar_jusrem INT NOT NULL, CHANGE transpar_transp transpar_transp INT NOT NULL, CHANGE transpar_relpro transpar_relpro INT NOT NULL, CHANGE disagdur_labels disagdur_labels INT NOT NULL, CHANGE disagdur_condur disagdur_condur INT NOT NULL, CHANGE proagdur_labels proagdur_labels INT NOT NULL, CHANGE proagdur_valbio proagdur_valbio INT NOT NULL, CHANGE proagdur_ecorec proagdur_ecorec INT NOT NULL, CHANGE proagdur_pertes proagdur_pertes INT NOT NULL, CHANGE proagdur_climat proagdur_climat INT NOT NULL, CHANGE proagdur_geneti proagdur_geneti INT NOT NULL, CHANGE proagdur_prosol proagdur_prosol INT NOT NULL, CHANGE localite_probru localite_probru INT NOT NULL, CHANGE localite_protra localite_protra INT NOT NULL, CHANGE accessib_global accessib_global INT NOT NULL, CHANGE bienetre_global bienetre_global INT NOT NULL, CHANGE transpar_global transpar_global INT NOT NULL, CHANGE disagdur_global disagdur_global INT NOT NULL, CHANGE proagdur_global proagdur_global INT NOT NULL, CHANGE localite_global localite_global INT NOT NULL');
}
}
{% extends '@kohinos/common/layout.html.twig' %}
{% block content %}
{# Form theme use is mandatory to insert non-text stuff (such as html, icons...) in the choice type choices label. #}
{% form_theme form '@kohinos/tav/prestaquiz_form_theme.html.twig' %}
<h1>Inscription point de vente (2/2) : auto-évaluation</h1>
{{ form_start(form) }}
{# includes twig common to distributors and producers #}
{% include '@kohinos/tav/selfeval_prestaquiz.html.twig' %}
<br/>
<br/>
<br/>
<h2><i class="fas fa-coins"></i> Transparence et juste rémunération</h2>
<div class="container">
<div class="row">
{{ form_label(form.transpar_jusrem) }}
<div class="col">{{ form_widget(form.transpar_jusrem) }}</div>
<div class="col">{{ form_row(form.transpar_jusrem_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.transpar_transp) }}
<div class="col">{{ form_widget(form.transpar_transp) }}</div>
<div class="col">{{ form_row(form.transpar_transp_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.transpar_relpro) }}
<div class="col">{{ form_widget(form.transpar_relpro) }}</div>
<div class="col">{{ form_row(form.transpar_relpro_comment) }}</div>
</div>
</div>
<div class="container global-evaluation-container">
<div class="row">
{{ form_label(form.accessib_global) }}
<div class="col">{{ form_widget(form.transpar_global) }}</div>
<div class="col">{{ form_row(form.transpar_global_comment) }}</div>
</div>
</div>
<br/>
<br/>
<br/>
<h2><i class="fas fa-seedling"></i> Pratiques agricoles durables</h2>
<div class="container">
<div class="row">
{{ form_label(form.disagdur_labels) }}
<div class="col">{{ form_widget(form.disagdur_labels) }}</div>
<div class="col">{{ form_row(form.disagdur_labels_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.disagdur_condur) }}
<div class="col">{{ form_widget(form.disagdur_condur) }}</div>
<div class="col">{{ form_row(form.disagdur_condur_comment) }}</div>
</div>
</div>
<div class="container global-evaluation-container">
<div class="row">
{{ form_label(form.disagdur_global) }}
<div class="col">{{ form_widget(form.disagdur_global) }}</div>
<div class="col">{{ form_row(form.disagdur_global_comment) }}</div>
</div>
</div>
<br/>
<br/>
<br/>
<h2><i class="fas fa-map-marker-alt"></i> Localité des produits</h2>
<div class="container">
<div class="row">
{{ form_label(form.localite_probru) }}
<div class="col">{{ form_widget(form.localite_probru) }}</div>
<div class="col">{{ form_row(form.localite_probru_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.localite_protra) }}
<div class="col">{{ form_widget(form.localite_protra) }}</div>
<div class="col">{{ form_row(form.localite_protra_comment) }}</div>
</div>
</div>
<div class="container global-evaluation-container">
<div class="row">
{{ form_label(form.localite_global) }}
<div class="col">{{ form_widget(form.localite_global) }}</div>
<div class="col">{{ form_row(form.localite_global_comment) }}</div>
</div>
</div>
<br/>
<br/>
{{ form_end(form) }}
{% endblock %}
\ No newline at end of file
{% extends '@kohinos/common/layout.html.twig' %}
{% block content %}
<div class='container' style='max-width: 800px;'>
<h1>Inscription point de vente (1/2) : identification</h1>
{{ form_start(form) }}
{{ form_end(form) }}
</div>
{% endblock %}
\ No newline at end of file
{# Custom form theme based on file : Resources/views/Form/bootstrap_4_layout.html.twig
where unique change is use of filter |raw on line
{{- label is not same as(false) ? (translation_domain is same as(false) ? label|raw : label|trans(label_translation_parameters, translation_domain))|raw -}}
This is to allow use of html in choice type choices label,
as suggested here : https://stackoverflow.com/questions/45562135/html-in-label-choice-form
#}
{% block checkbox_radio_label -%}
{#- Do not display the label if widget is not defined in order to prevent double label rendering -#}
{%- if widget is defined -%}
{% set is_parent_custom = parent_label_class is defined and ('checkbox-custom' in parent_label_class or 'radio-custom' in parent_label_class or 'switch-custom' in parent_label_class) %}
{% set is_custom = label_attr.class is defined and ('checkbox-custom' in label_attr.class or 'radio-custom' in label_attr.class or 'switch-custom' in label_attr.class) %}
{%- if is_parent_custom or is_custom -%}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' custom-control-label')|trim}) -%}
{%- else %}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-check-label')|trim}) -%}
{%- endif %}
{%- if not compound -%}
{% set label_attr = label_attr|merge({'for': id}) %}
{%- endif -%}
{%- if required -%}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%}
{%- endif -%}
{%- if label is not same as(false) and label is empty -%}
{%- if label_format is not empty -%}
{%- set label = label_format|replace({
'%name%': name,
'%id%': id,
}) -%}
{%- else -%}
{%- set label = name|humanize -%}
{%- endif -%}
{%- endif -%}
{{ widget|raw }}
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
{{- label is not same as(false) ? (translation_domain is same as(false) ? label|raw : label|trans(label_translation_parameters, translation_domain))|raw -}}
{{- form_errors(form) -}}
</label>
{%- endif -%}
{%- endblock checkbox_radio_label %}
\ No newline at end of file
{% extends '@kohinos/common/layout.html.twig' %}
{% block content %}
<h2>Vous avez terminé votre demande d'inscription, merci !</h2>
<h2>Nous vous contacterons prochainement.</h2>
{% endblock %}
\ No newline at end of file
{% extends '@kohinos/common/layout.html.twig' %}
{% block content %}
{# Form theme use is mandatory to insert non-text stuff (such as html, icons...) in the choice type choices label. #}
{% form_theme form '@kohinos/tav/prestaquiz_form_theme.html.twig' %}
<h1>Inscription point de vente (2/2) : auto-évaluation</h1>
{{ form_start(form) }}
{# includes twig common to distributors and producers #}
{% include '@kohinos/tav/selfeval_prestaquiz.html.twig' %}
<br/>
<br/>
<br/>
<h2><i class="fas fa-seedling"></i> Pratiques agricoles durables</h2>
<div class="container">
<div class="row">
{{ form_label(form.proagdur_labels) }}
<div class="col">{{ form_widget(form.proagdur_labels) }}</div>
<div class="col">{{ form_row(form.proagdur_labels_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.proagdur_valbio) }}
<div class="col">{{ form_widget(form.proagdur_valbio) }}</div>
<div class="col">{{ form_row(form.proagdur_valbio_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.proagdur_ecorec) }}
<div class="col">{{ form_widget(form.proagdur_ecorec) }}</div>
<div class="col">{{ form_row(form.proagdur_ecorec_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.proagdur_pertes) }}
<div class="col">{{ form_widget(form.proagdur_pertes) }}</div>
<div class="col">{{ form_row(form.proagdur_pertes_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.proagdur_climat) }}
<div class="col">{{ form_widget(form.proagdur_climat) }}</div>
<div class="col">{{ form_row(form.proagdur_climat_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.proagdur_geneti) }}
<div class="col">{{ form_widget(form.proagdur_geneti) }}</div>
<div class="col">{{ form_row(form.proagdur_geneti_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.proagdur_prosol) }}
<div class="col">{{ form_widget(form.proagdur_prosol) }}</div>
<div class="col">{{ form_row(form.proagdur_prosol_comment) }}</div>
</div>
</div>
<div class="container global-evaluation-container">
<div class="row">
{{ form_label(form.proagdur_global) }}
<div class="col">{{ form_widget(form.proagdur_global) }}</div>
<div class="col">{{ form_row(form.proagdur_global_comment) }}</div>
</div>
</div>
<br/>
<br/>
{{ form_end(form) }}
{% endblock %}
\ No newline at end of file
{# View for prestataire questionnaire sections that are common to distributors and producers #}
<br/>
<br/>
<h2><i class="fas fa-universal-access"></i> Accessibilité et Inclusivité</h2>
<div class="container">
<div class="row">
{{ form_label(form.accessib_geophy) }}
<div class="col">{{ form_widget(form.accessib_geophy) }}</div>
<div class="col">{{ form_row(form.accessib_geophy_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.accessib_tempor) }}
<div class="col">{{ form_widget(form.accessib_tempor) }}</div>
<div class="col">{{ form_row(form.accessib_tempor_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.accessib_edupop) }}
<div class="col">{{ form_widget(form.accessib_edupop) }}</div>
<div class="col">{{ form_row(form.accessib_edupop_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.accessib_divers) }}
<div class="col">{{ form_widget(form.accessib_divers) }}</div>
<div class="col">{{ form_row(form.accessib_divers_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.accessib_vulner) }}
<div class="col">{{ form_widget(form.accessib_vulner) }}</div>
<div class="col">{{ form_row(form.accessib_vulner_comment) }}</div>
</div>
</div>
<div class="container global-evaluation-container">
<div class="row">
{{ form_label(form.accessib_global) }}
<div class="col">{{ form_widget(form.accessib_global) }}</div>
<div class="col">{{ form_row(form.accessib_global_comment) }}</div>
</div>
</div>
<br/>
<br/>
<br/>
<h2><i class="fas fa-heart"></i> Bien-être au travail</h2>
<div class="container">
<div class="row">
{{ form_label(form.bienetre_format) }}
<div class="col">{{ form_widget(form.bienetre_format) }}</div>
<div class="col">{{ form_row(form.bienetre_format_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.bienetre_impgou) }}
<div class="col">{{ form_widget(form.bienetre_impgou) }}</div>
<div class="col">{{ form_row(form.bienetre_impgou_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.bienetre_bienet) }}
<div class="col">{{ form_widget(form.bienetre_bienet) }}</div>
<div class="col">{{ form_row(form.bienetre_bienet_comment) }}</div>
</div>
</div>
<div class="container">
<div class="row">
{{ form_label(form.bienetre_recben) }}
<div class="col">{{ form_widget(form.bienetre_recben) }}</div>
<div class="col">{{ form_row(form.bienetre_recben_comment) }}</div>
</div>
</div>
<div class="container global-evaluation-container">
<div class="row">
{{ form_label(form.bienetre_global) }}
<div class="col">{{ form_widget(form.bienetre_global) }}</div>
<div class="col">{{ form_row(form.bienetre_global_comment) }}</div>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment