main: LocationType: add new property defaultFor in the admin

This commit is contained in:
nobohan 2021-11-23 10:57:43 +01:00
parent 32af076986
commit 7eeb2f2a7d
4 changed files with 20 additions and 3 deletions

View File

@ -29,8 +29,8 @@ class LocationType
public const STATUS_REQUIRED = 'required';
const DEFAULT_FOR_PERSON = 'person';
const DEFAULT_FOR_3PARTY = 'thirdparty';
public const DEFAULT_FOR_PERSON = 'person';
public const DEFAULT_FOR_3PARTY = 'thirdparty';
/**
* @ORM\Column(type="boolean", nullable=true)

View File

@ -71,6 +71,17 @@ final class LocationTypeType extends AbstractType
],
'expanded' => true,
]
);
)
->add(
'defaultFor',
ChoiceType::class,
[
'choices' => [
'none' => null,
'person' => LocationType::DEFAULT_FOR_PERSON,
'thirdparty' => LocationType::DEFAULT_FOR_3PARTY,
],
'expanded' => true
]);
}
}

View File

@ -11,6 +11,7 @@
<th>{{ 'Address required'|trans }}</th>
<th>{{ 'Contact data'|trans }}</th>
<th>{{ 'Active'|trans }}</th>
<th>{{ 'Default for'|trans }}</th>
</tr>
</thead>
<tbody>
@ -33,6 +34,7 @@
<i class="fa fa-square-o"></i>
{%- endif -%}
</td>
<td>{{ entity.defaultFor|trans }}</td>
<td>
<ul class="record_actions">
<li>

View File

@ -212,6 +212,10 @@ Location type: Type de localisation
Phonenumber1: Numéro de téléphone
Phonenumber2: Autre numéro de téléphone
Configure location and location type: Configuration des localisations
Default for: Type de localisation par défaut pour
none: aucun
person: usager
thirdparty: tiers
# circles / scopes
Choose the circle: Choisir le cercle