diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/ConfigController.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index ca4acc6a..8bbe4ca0 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -29,7 +29,7 @@ class ConfigController extends Controller | |||
29 | $user = $this->getUser(); | 29 | $user = $this->getUser(); |
30 | 30 | ||
31 | // handle basic config detail (this form is defined as a service) | 31 | // handle basic config detail (this form is defined as a service) |
32 | $configForm = $this->createForm('config', $config); | 32 | $configForm = $this->createForm('config', $config, array('action' => $this->generateUrl('config'))); |
33 | $configForm->handleRequest($request); | 33 | $configForm->handleRequest($request); |
34 | 34 | ||
35 | if ($configForm->isValid()) { | 35 | if ($configForm->isValid()) { |
@@ -49,7 +49,7 @@ class ConfigController extends Controller | |||
49 | } | 49 | } |
50 | 50 | ||
51 | // handle changing password | 51 | // handle changing password |
52 | $pwdForm = $this->createForm(new ChangePasswordType()); | 52 | $pwdForm = $this->createForm(new ChangePasswordType(), null, array('action' => $this->generateUrl('config').'#set4')); |
53 | $pwdForm->handleRequest($request); | 53 | $pwdForm->handleRequest($request); |
54 | 54 | ||
55 | if ($pwdForm->isValid()) { | 55 | if ($pwdForm->isValid()) { |
@@ -65,7 +65,10 @@ class ConfigController extends Controller | |||
65 | } | 65 | } |
66 | 66 | ||
67 | // handle changing user information | 67 | // handle changing user information |
68 | $userForm = $this->createForm(new UserInformationType(), $user, array('validation_groups' => array('Profile'))); | 68 | $userForm = $this->createForm(new UserInformationType(), $user, array( |
69 | 'validation_groups' => array('Profile'), | ||
70 | 'action' => $this->generateUrl('config').'#set3', | ||
71 | )); | ||
69 | $userForm->handleRequest($request); | 72 | $userForm->handleRequest($request); |
70 | 73 | ||
71 | if ($userForm->isValid()) { | 74 | if ($userForm->isValid()) { |
@@ -80,7 +83,7 @@ class ConfigController extends Controller | |||
80 | } | 83 | } |
81 | 84 | ||
82 | // handle rss information | 85 | // handle rss information |
83 | $rssForm = $this->createForm(new RssType(), $config); | 86 | $rssForm = $this->createForm(new RssType(), $config, array('action' => $this->generateUrl('config').'#set2')); |
84 | $rssForm->handleRequest($request); | 87 | $rssForm->handleRequest($request); |
85 | 88 | ||
86 | if ($rssForm->isValid()) { | 89 | if ($rssForm->isValid()) { |
@@ -99,7 +102,10 @@ class ConfigController extends Controller | |||
99 | $newUser = $userManager->createUser(); | 102 | $newUser = $userManager->createUser(); |
100 | // enable created user by default | 103 | // enable created user by default |
101 | $newUser->setEnabled(true); | 104 | $newUser->setEnabled(true); |
102 | $newUserForm = $this->createForm(new NewUserType(), $newUser, array('validation_groups' => array('Profile'))); | 105 | $newUserForm = $this->createForm(new NewUserType(), $newUser, array( |
106 | 'validation_groups' => array('Profile'), | ||
107 | 'action' => $this->generateUrl('config').'#set5', | ||
108 | )); | ||
103 | $newUserForm->handleRequest($request); | 109 | $newUserForm->handleRequest($request); |
104 | 110 | ||
105 | if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { | 111 | if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { |