mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
rename UserCurrentLocationType to more generic Select2UserLocationType
NB: used 2 times, check that all works
This commit is contained in:
@@ -15,7 +15,7 @@ use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||
use Chill\MainBundle\Entity\GroupCenter;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Form\Type\ComposedGroupCenterType;
|
||||
use Chill\MainBundle\Form\UserCurrentLocationType;
|
||||
use Chill\MainBundle\Form\Type\Select2UserLocationType;
|
||||
use Chill\MainBundle\Form\UserPasswordType;
|
||||
use Chill\MainBundle\Form\UserType;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
@@ -234,7 +234,7 @@ class UserController extends CRUDController
|
||||
public function editCurrentLocationAction(Request $request)
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$form = $this->createForm(UserCurrentLocationType::class, $user)
|
||||
$form = $this->createForm(Select2UserLocationType::class, $user)
|
||||
->add('submit', SubmitType::class, ['label' => 'Save'])
|
||||
->handleRequest($request);
|
||||
|
||||
|
@@ -9,7 +9,7 @@ declare(strict_types=1);
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Form;
|
||||
namespace Chill\MainBundle\Form\Type;
|
||||
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Repository\LocationRepository;
|
||||
@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\FormView;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class UserCurrentLocationType extends AbstractType
|
||||
class Select2UserLocationType extends AbstractType
|
||||
{
|
||||
private LocationRepository $locationRepository;
|
||||
|
||||
@@ -69,6 +69,6 @@ class UserCurrentLocationType extends AbstractType
|
||||
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'user_current_location_type';
|
||||
return 'select2_user_location_type';
|
||||
}
|
||||
}
|
@@ -132,7 +132,7 @@ services:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
Chill\MainBundle\Form\UserCurrentLocationType:
|
||||
Chill\MainBundle\Form\Type\Select2UserLocationType:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
|
Reference in New Issue
Block a user