API methods to handle teams and users (#1384)

This commit is contained in:
Kevin Papst
2020-01-28 22:28:31 +01:00
committed by GitHub
parent a31e027c54
commit 836a530b86
24 changed files with 1525 additions and 107 deletions

View File

@@ -29,15 +29,25 @@ class TeamEditForm extends AbstractType
'attr' => [
'autofocus' => 'autofocus'
],
// documentation is for NelmioApiDocBundle
'documentation' => [
'type' => 'string',
'description' => 'Name of the new team',
],
])
->add('teamlead', UserType::class, [
'label' => 'label.teamlead',
'multiple' => false,
'expanded' => false,
// documentation is for NelmioApiDocBundle
'documentation' => [
'type' => 'integer',
'description' => 'User ID for the teamlead',
],
])
->add('users', UserType::class, [
'multiple' => true,
'expanded' => true,
'expanded' => $options['expand_users'],
'by_reference' => false,
])
;
@@ -52,6 +62,7 @@ class TeamEditForm extends AbstractType
'data_class' => Team::class,
'csrf_protection' => true,
'csrf_field_name' => '_token',
'expand_users' => true,
'csrf_token_id' => 'admin_team_edit',
'attr' => [
'data-form-event' => 'kimai.teamUpdate'