From 8f9568f0e2c58b83ca53534753d52a5d066f572e Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 25 May 2019 21:37:51 +0300 Subject: [PATCH] Flextype Box Plugin: Admin #125 #117 - Fieldsets Controller/Views implementation --- site/plugins/admin/app/Controllers/FieldsetsController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/site/plugins/admin/app/Controllers/FieldsetsController.php b/site/plugins/admin/app/Controllers/FieldsetsController.php index 918c2d1e..6549b9a4 100644 --- a/site/plugins/admin/app/Controllers/FieldsetsController.php +++ b/site/plugins/admin/app/Controllers/FieldsetsController.php @@ -99,7 +99,13 @@ class FieldsetsController extends Controller public function editProcess($request, $response, $args) { + if ($this->fieldsets->update($request->getParsedBody()['id'], JsonParser::decode($request->getParsedBody()['data']))) { + $this->flash->addMessage('success', __('admin_message_fieldsets_saved')); + } else { + $this->flash->addMessage('error', __('admin_message_fieldsets_was_not_saved')); + } + return $response->withRedirect($this->container->get('router')->pathFor('admin.fieldsets.index')); } public function rename($request, $response, $args) @@ -132,7 +138,6 @@ class FieldsetsController extends Controller } return $response->withRedirect($this->container->get('router')->pathFor('admin.fieldsets.index')); - } public function deleteProcess($request, $response, $args)