Browse Source

Fix for "Create and Add" button to pick up active sub class

tom0 13 năm trước cách đây
mục cha
commit
789d51bfd4
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      Controller/CRUDController.php

+ 5 - 1
Controller/CRUDController.php

@@ -303,7 +303,11 @@ class CRUDController extends Controller
         }
 
         if ($this->get('request')->get('btn_create_and_create')) {
-            $url = $this->admin->generateUrl('create');
+            $params = array();
+            if ($this->admin->hasActiveSubClass()) {
+                $params['subclass'] = $this->get('request')->get('subclass');
+            }
+            $url = $this->admin->generateUrl('create', $params);
         }
 
         if (!$url) {