permettre au propriétaire du groupe de changer le propriétaire (ref #146)

This commit is contained in:
afornerot 2020-06-08 09:07:16 +02:00
parent 228993dbd6
commit 920e6d66d3
1 changed files with 20 additions and 22 deletions

View File

@ -58,28 +58,26 @@ class GroupType extends AbstractType
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="delete"?true:false)) "attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="delete"?true:false))
]); ]);
if($options["access"]=="config") { $builder->add('owner',
$builder->add('owner', Select2EntityType::class, array(
Select2EntityType::class, array( 'label' => "Propriétaire",
'label' => "Propriétaire", 'disabled' => ($options["mode"]=="delete"?true:false),
'disabled' => ($options["mode"]=="delete"?true:false), "required" => false,
"required" => false, 'multiple' => false,
'multiple' => false, 'remote_route' => 'cadoles_core_config_user_ajax_selectlist',
'remote_route' => 'cadoles_core_config_user_ajax_selectlist', 'class' => 'Cadoles\coreBundle\Entity\User',
'class' => 'Cadoles\coreBundle\Entity\User', 'primary_key' => 'id',
'primary_key' => 'id', 'text_property' => 'username',
'text_property' => 'username', 'minimum_input_length' => 2,
'minimum_input_length' => 2, 'page_limit' => 10,
'page_limit' => 10, 'allow_clear' => true,
'allow_clear' => true, 'delay' => 250,
'delay' => 250, 'cache' => false,
'cache' => false, 'cache_timeout' => 60000, // if 'cache' is true
'cache_timeout' => 60000, // if 'cache' is true 'language' => 'fr',
'language' => 'fr', 'placeholder' => 'Selectionner un propriétaire',
'placeholder' => 'Selectionner un propriétaire', 'attr' => array("class" => "form-control", "style" => "margin-bottom:15px")
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px") ));
));
}
} }
if($options["access"]=="config") { if($options["access"]=="config") {