From 03141f9b9548bca117136ba5bdcf811d9e59b155 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Oct 2016 17:46:44 +0200 Subject: Cleanup & add link on baggy menu --- .../CoreBundle/Controller/ConfigController.php | 2 - src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 58 ---------------------- .../Resources/views/themes/baggy/layout.html.twig | 1 + 3 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 src/Wallabag/CoreBundle/Form/Type/NewUserType.php (limited to 'src') diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 51d8bdd1..91cdcae5 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -2,8 +2,6 @@ namespace Wallabag\CoreBundle\Controller; -use FOS\UserBundle\Event\UserEvent; -use FOS\UserBundle\FOSUserEvents; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php deleted file mode 100644 index 6a6f63d1..00000000 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ /dev/null @@ -1,58 +0,0 @@ -add('username', TextType::class, [ - 'required' => true, - 'label' => 'config.form_new_user.username_label', - ]) - ->add('plainPassword', RepeatedType::class, [ - 'type' => PasswordType::class, - 'invalid_message' => 'validator.password_must_match', - 'first_options' => ['label' => 'config.form_new_user.password_label'], - 'second_options' => ['label' => 'config.form_new_user.repeat_new_password_label'], - 'constraints' => [ - new Constraints\Length([ - 'min' => 8, - 'minMessage' => 'validator.password_too_short', - ]), - new Constraints\NotBlank(), - ], - 'label' => 'config.form_new_user.plain_password_label', - ]) - ->add('email', EmailType::class, [ - 'label' => 'config.form_new_user.email_label', - ]) - ->add('save', SubmitType::class, [ - 'label' => 'config.form.save', - ]) - ; - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'data_class' => 'Wallabag\UserBundle\Entity\User', - ]); - } - - public function getBlockPrefix() - { - return 'new_user'; - } -} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig index 4fd4d317..30fd0d85 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig @@ -42,6 +42,7 @@ -->
  • {{ 'menu.left.config'|trans }}
  • {% if is_granted('ROLE_SUPER_ADMIN') %} +
  • {{ 'menu.left.users_management'|trans }}
  • {{ 'menu.left.internal_settings'|trans }}
  • {% endif %}
  • {{ 'menu.left.import'|trans }}
  • -- cgit v1.2.3