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:
@@ -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'));
|
||||
|
Reference in New Issue
Block a user