remove accompanying period if not used

This commit is contained in:
2018-08-21 16:27:33 +02:00
parent c21b87b9c6
commit b4801734d3
8 changed files with 181 additions and 14 deletions

View File

@@ -1,11 +1,6 @@
chill_person_view:
path: /{_locale}/person/{person_id}/general
defaults: { _controller: ChillPersonBundle:Person:view }
options:
menus:
person:
order: 50
label: Person details
chill_person_general_edit:
path: /{_locale}/person/{person_id}/general/edit
@@ -39,11 +34,6 @@ chill_person_search:
chill_person_accompanying_period_list:
path: /{_locale}/person/{person_id}/accompanying-period
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:list }
options:
menus:
person:
order: 100
label: Accompanying period list
chill_person_accompanying_period_create:
path: /{_locale}/person/{person_id}/accompanying-period/create

View File

@@ -4,3 +4,10 @@ services:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
tags:
- { name: 'chill.menu_builder' }
Chill\PersonBundle\Menu\PersonMenuBuilder:
arguments:
$showAccompanyingPeriod: '%chill_person.accompanying_period%'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@@ -42,7 +42,7 @@ Chill\PersonBundle\Entity\Person:
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33123456789'
- Chill\MainBundle\Validation\Constraint\PhonenumberConstraint:
type: landline
groups: [ general ]
groups: [ general, creation ]
mobilenumber:
- Regex:
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
@@ -50,7 +50,7 @@ Chill\PersonBundle\Entity\Person:
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33623456789'
- Chill\MainBundle\Validation\Constraint\PhonenumberConstraint:
type: mobile
groups: [ general ]
groups: [ general, creation ]
constraints: