mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
firstname field added to twig form for child or contact types
This commit is contained in:
parent
00787adf2b
commit
a24cd693e3
@ -463,12 +463,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
return $this->email;
|
return $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getId(): ?int
|
||||||
* Get id.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getId()
|
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
@ -478,16 +473,16 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
return $this->kind;
|
return $this->kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getName(): string
|
||||||
* Get name.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getName()
|
|
||||||
{
|
{
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFirstname(): string
|
||||||
|
{
|
||||||
|
return $this->firstname;
|
||||||
|
}
|
||||||
|
|
||||||
public function getNameCompany(): ?string
|
public function getNameCompany(): ?string
|
||||||
{
|
{
|
||||||
return $this->nameCompany;
|
return $this->nameCompany;
|
||||||
@ -782,20 +777,20 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function setName($name): self
|
||||||
* Set name.
|
|
||||||
*
|
|
||||||
* @param string $name
|
|
||||||
*
|
|
||||||
* @return ThirdParty
|
|
||||||
*/
|
|
||||||
public function setName($name)
|
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setFirstname($firstname): self
|
||||||
|
{
|
||||||
|
$this->firstname = $firstname;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $nameCompany
|
* @param string $nameCompany
|
||||||
*/
|
*/
|
||||||
|
@ -102,6 +102,10 @@ class ThirdPartyType extends AbstractType
|
|||||||
// Contact Person ThirdParty (child)
|
// Contact Person ThirdParty (child)
|
||||||
if (ThirdParty::KIND_CONTACT === $options['kind'] || ThirdParty::KIND_CHILD === $options['kind']) {
|
if (ThirdParty::KIND_CONTACT === $options['kind'] || ThirdParty::KIND_CHILD === $options['kind']) {
|
||||||
$builder
|
$builder
|
||||||
|
->add('firstname', TextType::class, [
|
||||||
|
'label' => 'firstname',
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
->add('civility', PickCivilityType::class, [
|
->add('civility', PickCivilityType::class, [
|
||||||
'label' => 'thirdparty.Civility',
|
'label' => 'thirdparty.Civility',
|
||||||
'placeholder' => 'thirdparty.choose civility',
|
'placeholder' => 'thirdparty.choose civility',
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
{{ form_row(form.civility) }}
|
{{ form_row(form.civility) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if form.firstname is defined %}
|
||||||
|
{{ form_row(form.firstname) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{{ form_row(form.name) }}
|
{{ form_row(form.name) }}
|
||||||
|
|
||||||
{% if form.nameCompany is defined %}
|
{% if form.nameCompany is defined %}
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
{{ form_errors(form.civility) }}
|
{{ form_errors(form.civility) }}
|
||||||
{{ form_label(form.civility) }}
|
{{ form_label(form.civility) }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-md-5 mb-3">
|
||||||
|
{{ form_widget(form.firstname) }}
|
||||||
|
{{ form_errors(form.firstname) }}
|
||||||
|
{{ form_label(form.firstname) }}
|
||||||
|
</div>
|
||||||
<div class="form-group col-md-5 mb-3">
|
<div class="form-group col-md-5 mb-3">
|
||||||
{{ form_widget(form.name) }}
|
{{ form_widget(form.name) }}
|
||||||
{{ form_errors(form.name) }}
|
{{ form_errors(form.name) }}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<dt>{{ 'Name'|trans }}</dt>
|
<dt>{{ 'Name'|trans }}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{% if thirdParty.isLeaf == true %}{{ thirdParty.civility }}{% endif %}
|
{% if thirdParty.isLeaf == true %}{{ thirdParty.civility }}{% endif %}
|
||||||
{{ thirdParty.name }}
|
{{ thirdParty.firstname ~ ' ' ~ thirdParty.name }}
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
{% if thirdParty.kind == 'company' %}
|
{% if thirdParty.kind == 'company' %}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
Third party: Tiers
|
Third party: Tiers
|
||||||
Third parties: Tiers
|
Third parties: Tiers
|
||||||
third parties: tiers
|
third parties: tiers
|
||||||
|
firstname: Prénom
|
||||||
name: Nom
|
name: Nom
|
||||||
telephone: Téléphone
|
telephone: Téléphone
|
||||||
adress: Adresse
|
adress: Adresse
|
||||||
|
Loading…
x
Reference in New Issue
Block a user