Browse Source

Correction route switch-merchant

reduction
Guillaume 4 years ago
parent
commit
a0c09c4d96
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      ShopBundle/Controller/Admin/MerchantController.php
  2. +2
    -2
      ShopBundle/Resources/config/shop_routes.yaml
  3. +1
    -1
      ShopBundle/Resources/views/backend/default/layout.html.twig

+ 1
- 1
ShopBundle/Controller/Admin/MerchantController.php View File

$em->flush(); $em->flush();
} }
} }
return $this->redirect('admin/dashboard') ;
return $this->redirect('/admin/dashboard') ;
} }


} }

+ 2
- 2
ShopBundle/Resources/config/shop_routes.yaml View File



switch_merchant:
path: /switch-merchant
admin_switch_merchant:
path: /admin/switch-merchant
controller: Lc\ShopBundle\Controller\Admin\MerchantController::switchMerchantAction controller: Lc\ShopBundle\Controller\Admin\MerchantController::switchMerchantAction


lc_api: lc_api:

+ 1
- 1
ShopBundle/Resources/views/backend/default/layout.html.twig View File



<div id="switch-merchant"> <div id="switch-merchant">
{% if is_granted('ROLE_ADMIN') %} {% if is_granted('ROLE_ADMIN') %}
<form action="{{ path('switch_merchant') }}" method="post">
<form action="{{ path('admin_switch_merchant') }}" method="post">
<select class="form-control" name="id_merchant"> <select class="form-control" name="id_merchant">
{% for merchant in merchants %} {% for merchant in merchants %}
<option value="{{merchant.id}}" {% if current_merchant and current_merchant.id == merchant.id %}selected="selected"{% endif %}>{{merchant.title}}</option> <option value="{{merchant.id}}" {% if current_merchant and current_merchant.id == merchant.id %}selected="selected"{% endif %}>{{merchant.title}}</option>

Loading…
Cancel
Save