mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
some tweaks into PickAddressType
This commit is contained in:
@@ -89,28 +89,6 @@ class ThirdPartyType extends AbstractType
|
||||
])
|
||||
;
|
||||
|
||||
/*
|
||||
$builder
|
||||
/*
|
||||
->add('address', HiddenType::class)
|
||||
->get('address')
|
||||
->addModelTransformer(new CallbackTransformer(
|
||||
function (?Address $address): string {
|
||||
if (null === $address) {
|
||||
return '';
|
||||
}
|
||||
return $address->getId();
|
||||
},
|
||||
function (?string $addressId): ?Address {
|
||||
if (null === $addressId) {
|
||||
return null;
|
||||
}
|
||||
return $this->om
|
||||
->getRepository(Address::class)
|
||||
->findOneBy(['id' => (int) $addressId]);
|
||||
}
|
||||
))*/
|
||||
|
||||
// Contact Person ThirdParty (child)
|
||||
if (ThirdParty::KIND_CONTACT === $options['kind'] || ThirdParty::KIND_CHILD === $options['kind']) {
|
||||
$builder
|
||||
@@ -152,6 +130,12 @@ class ThirdPartyType extends AbstractType
|
||||
->add('address', PickAddressType::class, [
|
||||
'label' => 'Address'
|
||||
])
|
||||
->add('address2', PickAddressType::class, [
|
||||
'label' => 'Address',
|
||||
'use_valid_from' => true,
|
||||
'use_valid_to' => true,
|
||||
'mapped' => false,
|
||||
])
|
||||
->add('nameCompany', TextType::class, [
|
||||
'label' => 'thirdparty.NameCompany',
|
||||
'required' => false
|
||||
|
Reference in New Issue
Block a user