diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-01-31 21:13:33 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-23 09:26:41 +0200 |
commit | 2041810adbc6e663e4520337805c0003c77762e2 (patch) | |
tree | 1715a1e57a0275efe0970807c65f424def897034 /src/Wallabag/GroupBundle/Form/NewGroupType.php | |
parent | b115623e2c536bcfd59760347f22b4d70e1d0661 (diff) | |
download | wallabag-2041810adbc6e663e4520337805c0003c77762e2.tar.gz wallabag-2041810adbc6e663e4520337805c0003c77762e2.tar.zst wallabag-2041810adbc6e663e4520337805c0003c77762e2.zip |
WIP
Diffstat (limited to 'src/Wallabag/GroupBundle/Form/NewGroupType.php')
-rw-r--r-- | src/Wallabag/GroupBundle/Form/NewGroupType.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Wallabag/GroupBundle/Form/NewGroupType.php b/src/Wallabag/GroupBundle/Form/NewGroupType.php index 29b20fe0..55eebc46 100644 --- a/src/Wallabag/GroupBundle/Form/NewGroupType.php +++ b/src/Wallabag/GroupBundle/Form/NewGroupType.php | |||
@@ -3,10 +3,13 @@ | |||
3 | namespace Wallabag\GroupBundle\Form; | 3 | namespace Wallabag\GroupBundle\Form; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\PasswordType; | ||
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | 8 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
7 | use Symfony\Component\Form\Extension\Core\Type\TextType; | 9 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
8 | use Symfony\Component\Form\FormBuilderInterface; | 10 | use Symfony\Component\Form\FormBuilderInterface; |
9 | use Symfony\Component\OptionsResolver\OptionsResolver; | 11 | use Symfony\Component\OptionsResolver\OptionsResolver; |
12 | use Wallabag\GroupBundle\Entity\Group; | ||
10 | 13 | ||
11 | class NewGroupType extends AbstractType | 14 | class NewGroupType extends AbstractType |
12 | { | 15 | { |
@@ -17,6 +20,31 @@ class NewGroupType extends AbstractType | |||
17 | 'required' => true, | 20 | 'required' => true, |
18 | 'label' => 'group.form.name_label', | 21 | 'label' => 'group.form.name_label', |
19 | ]) | 22 | ]) |
23 | ->add('defaultRole', ChoiceType::class, [ | ||
24 | 'label' => 'group.form.role_label', | ||
25 | 'choices' => [ | ||
26 | 'group.roles.readonly' => Group::ROLE_READ_ONLY, | ||
27 | 'group.roles.write' => Group::ROLE_WRITE, | ||
28 | 'group.roles.manage_entries' => Group::ROLE_MANAGE_ENTRIES, | ||
29 | 'group.roles.manage_users' => Group::ROLE_MANAGE_USERS, | ||
30 | 'group.roles.admin' => Group::ROLE_ADMIN, | ||
31 | ], | ||
32 | ]) | ||
33 | ->add('acceptSystem', ChoiceType::class, [ | ||
34 | 'label' => 'group.form.access_label', | ||
35 | 'choices' => [ | ||
36 | 'group.access.open' => Group::ACCESS_OPEN, | ||
37 | 'group.access.request' => Group::ACCESS_REQUEST, | ||
38 | 'group.access.password' => Group::ACCESS_PASSWORD, | ||
39 | 'group.access.invitation' => Group::ACCESS_INVITATION_ONLY, | ||
40 | 'group.access.hidden' => Group::ACCESS_HIDDEN, | ||
41 | ], | ||
42 | ]) | ||
43 | ->add('plainPassword', PasswordType::class, [ | ||
44 | 'label' => 'group.form.password_label', | ||
45 | 'required' => false, | ||
46 | 'attr' => ['autocomplete' => 'off'], | ||
47 | ]) | ||
20 | ->add('save', SubmitType::class, [ | 48 | ->add('save', SubmitType::class, [ |
21 | 'label' => 'group.form.save', | 49 | 'label' => 'group.form.save', |
22 | ]) | 50 | ]) |