From 9d27f6e191a2d0e91899e7dc9bb0913081987d4e Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 1 Dec 2019 21:06:44 +0300 Subject: [PATCH] feat(admin-plugin): add new heading field #299 --- site/plugins/admin/app/Controllers/EntriesController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site/plugins/admin/app/Controllers/EntriesController.php b/site/plugins/admin/app/Controllers/EntriesController.php index 55227de3..0bea01c8 100644 --- a/site/plugins/admin/app/Controllers/EntriesController.php +++ b/site/plugins/admin/app/Controllers/EntriesController.php @@ -248,6 +248,13 @@ class EntriesController extends Controller $data_result = $data_from_post; } + if ($this->entries->create($id, $data_result)) { + $this->clearEntryCounter($parent_entry_id); + $this->flash->addMessage('success', __('admin_message_entry_created')); + } else { + $this->flash->addMessage('error', __('admin_message_entry_was_not_created')); + } + } else { $this->flash->addMessage('error', __('admin_message_fieldset_not_found')); }