Commit bb5e5309 authored by Mat's avatar Mat
Browse files

remplace le champs 'logoPath' par 'origine'

dans la db et dans le code
parent 3cb00ccd
......@@ -42,9 +42,9 @@ class Legume
/**
* @var string
*
* @ORM\Column(name="logo_path", type="string", length=100, nullable=true)
* @ORM\Column(name="origine", type="string", length=100, nullable=true)
*/
private $logoPath;
private $origine;
/**
* @var string
......@@ -194,27 +194,27 @@ class Legume
}
/**
* Set logoPath
* Set origine
*
* @param string $logoPath
* @param string $origine
*
* @return Legume
*/
public function setLogoPath($logoPath)
public function setOrigine($origine)
{
$this->logoPath = $logoPath;
$this->origine = $origine;
return $this;
}
/**
* Get logoPath
* Get origine
*
* @return string
*/
public function getLogoPath()
public function getOrigine()
{
return $this->logoPath;
return $this->origine;
}
/**
......
......@@ -36,7 +36,7 @@ class LegumeType extends AbstractType
'class' => 'form-control form-control-sm',
),
));
$builder->add('logoPath', TextType::class, array(
$builder->add('origine', TextType::class, array(
'required' => false,
'label' => "Origine",
'label_attr' => array('class' => 'col-form-label'),
......
......@@ -30,9 +30,9 @@
{{ form_errors(formLegume.description) }}</div>
<div class="form-group row">
<div class="col-sm-4">{{ form_label(formLegume.logoPath) }}</div>
<div class="col-sm-8">{{ form_widget(formLegume.logoPath) }}</div>
{{ form_errors(formLegume.logoPath) }}</div>
<div class="col-sm-4">{{ form_label(formLegume.origine) }}</div>
<div class="col-sm-8">{{ form_widget(formLegume.origine) }}</div>
{{ form_errors(formLegume.origine) }}</div>
<div class="form-group row">
<div class="col-sm-4">{{ form_label(formLegume.imageFile) }}</div>
......
......@@ -27,11 +27,11 @@
<div class="form-group row">
<div class="col-sm-4">
{{ form_label(formLegume.logoPath) }}
{{ form_label(formLegume.origine) }}
</div>
<div class="col-sm-8">
{{ form_widget(formLegume.logoPath) }}
{{ form_errors(formLegume.logoPath) }}
{{ form_widget(formLegume.origine) }}
{{ form_errors(formLegume.origine) }}
</div>
</div>
......
......@@ -31,9 +31,9 @@
{{ form_errors(formLegume.description) }}</div>
<div class="form-group row">
<div class="col-sm-4">{{ form_label(formLegume.logoPath) }}</div>
<div class="col-sm-8">{{ form_widget(formLegume.logoPath) }}</div>
{{ form_errors(formLegume.logoPath) }}</div>
<div class="col-sm-4">{{ form_label(formLegume.origine) }}</div>
<div class="col-sm-8">{{ form_widget(formLegume.origine) }}</div>
{{ form_errors(formLegume.origine) }}</div>
<div class="form-group row">
<div class="col-sm-4">{{ form_label(formLegume.imageFile) }}</div>
......
......@@ -32,7 +32,7 @@ CREATE TABLE `legume` (
`id` int(11) NOT NULL,
`nom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`logo_path` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`origine` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`unite` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
`quantite_min` double DEFAULT NULL,
`quantite_max` double DEFAULT NULL,
......@@ -44,7 +44,7 @@ CREATE TABLE `legume` (
-- Déchargement des données de la table `legume`
--
INSERT INTO `legume` (`id`, `nom`, `description`, `logo_path`, `unite`, `quantite_min`, `quantite_max`, `quantite_step`, `prix_unitaire`) VALUES
INSERT INTO `legume` (`id`, `nom`, `description`, `origine`, `unite`, `quantite_min`, `quantite_max`, `quantite_step`, `prix_unitaire`) VALUES
(1, 'Courgettes', 'Jeunes courgettes en vrac', NULL, 'kg', 0.2, 30, 0.2, 4),
(2, 'Persil', 'Botte de persil plat', NULL, 'botte', 1, 10, NULL, 1.4),
(3, 'Chou pointu', "", NULL, 'pièce', NULL, NULL, NULL, 2.2),
......
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