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'; public const STATUS_REQUIRED = 'required';
const DEFAULT_FOR_PERSON = 'person'; public const DEFAULT_FOR_PERSON = 'person';
const DEFAULT_FOR_3PARTY = 'thirdparty'; public const DEFAULT_FOR_3PARTY = 'thirdparty';
/** /**
* @ORM\Column(type="boolean", nullable=true) * @ORM\Column(type="boolean", nullable=true)

View File

@ -71,6 +71,17 @@ final class LocationTypeType extends AbstractType
], ],
'expanded' => true, '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>{{ 'Address required'|trans }}</th>
<th>{{ 'Contact data'|trans }}</th> <th>{{ 'Contact data'|trans }}</th>
<th>{{ 'Active'|trans }}</th> <th>{{ 'Active'|trans }}</th>
<th>{{ 'Default for'|trans }}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -33,6 +34,7 @@
<i class="fa fa-square-o"></i> <i class="fa fa-square-o"></i>
{%- endif -%} {%- endif -%}
</td> </td>
<td>{{ entity.defaultFor|trans }}</td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>

View File

@ -212,6 +212,10 @@ Location type: Type de localisation
Phonenumber1: Numéro de téléphone Phonenumber1: Numéro de téléphone
Phonenumber2: Autre numéro de téléphone Phonenumber2: Autre numéro de téléphone
Configure location and location type: Configuration des localisations 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 # circles / scopes
Choose the circle: Choisir le cercle Choose the circle: Choisir le cercle