mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
remove accompanying period if not used
This commit is contained in:
@@ -74,6 +74,7 @@ class Configuration implements ConfigurationInterface
|
||||
->append($this->addFieldNode('marital_status'))
|
||||
->append($this->addFieldNode('spoken_languages'))
|
||||
->append($this->addFieldNode('address'))
|
||||
->append($this->addFieldNode('accompanying_period'))
|
||||
->end() //children for 'person_fields', parent = array 'person_fields'
|
||||
->end() // person_fields, parent = children of root
|
||||
->end() // children of 'root', parent = root
|
||||
@@ -87,11 +88,20 @@ class Configuration implements ConfigurationInterface
|
||||
{
|
||||
$tree = new TreeBuilder();
|
||||
$node = $tree->root($key, 'enum');
|
||||
|
||||
switch($key) {
|
||||
case 'accompanying_period':
|
||||
$info = "If the accompanying periods are shown";
|
||||
break;
|
||||
default:
|
||||
$info = "If the field $key must be shown";
|
||||
break;
|
||||
}
|
||||
|
||||
$node
|
||||
->values(array('hidden', 'visible'))
|
||||
->defaultValue('visible')
|
||||
->info("If the field $key must be shown")
|
||||
->info($info)
|
||||
->end();
|
||||
|
||||
return $node;
|
||||
|
Reference in New Issue
Block a user