瀏覽代碼

Correction route switch-merchant

reduction
Guillaume 4 年之前
父節點
當前提交
a0c09c4d96
共有 3 個檔案被更改,包括 4 行新增4 行删除
  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 查看文件

@@ -101,7 +101,7 @@ class MerchantController extends AdminController
$em->flush();
}
}
return $this->redirect('admin/dashboard') ;
return $this->redirect('/admin/dashboard') ;
}

}

+ 2
- 2
ShopBundle/Resources/config/shop_routes.yaml 查看文件

@@ -1,6 +1,6 @@

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

lc_api:

+ 1
- 1
ShopBundle/Resources/views/backend/default/layout.html.twig 查看文件

@@ -74,7 +74,7 @@

<div id="switch-merchant">
{% 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">
{% for merchant in merchants %}
<option value="{{merchant.id}}" {% if current_merchant and current_merchant.id == merchant.id %}selected="selected"{% endif %}>{{merchant.title}}</option>

Loading…
取消
儲存