1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-24 13:52:56 +02:00

chore(admin-plugin): add more data on create new fieldset

This commit is contained in:
Awilum
2019-10-26 01:42:53 +03:00
parent ea2283e608
commit 9653862fd6

View File

@@ -76,7 +76,21 @@ class FieldsetsController extends Controller
Arr::delete($data, 'csrf_value');
$id = $this->slugify->slugify($data['id']);
$data = ['title' => $data['title']];
$data = ['title' => $data['title'],
'default_field' => 'title',
'icon' => 'far fa-file-alt',
'sections' => [
'main' => [
'title' => 'Main',
'fields' => [
'title' => [
'title' => 'admin_title',
'type' => 'text',
'size' => '12'
],
],
],
]];
if ($this->fieldsets->create($id, $data)) {
$this->flash->addMessage('success', __('admin_message_fieldset_created'));