Skip to content

Commit 7615f38

Browse files
committed
fix(entries-controller): fix Entries saving issue
1 parent e344796 commit 7615f38

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

app/Controllers/EntriesController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ public function edit(Request $request, Response $response) : Response
738738
],
739739
'buttons' => [
740740
'save_entry' => [
741+
'id' => 'form',
741742
'link' => 'javascript:;',
742743
'title' => __('admin_save'),
743744
'type' => 'action'
@@ -818,8 +819,9 @@ public function edit(Request $request, Response $response) : Response
818819
],
819820
'buttons' => [
820821
'save_entry' => [
821-
'link' => 'javascript:;',
822-
'title' => __('admin_save'),
822+
'id' => 'form',
823+
'link' => 'javascript:;',
824+
'title' => __('admin_save'),
823825
'type' => 'action'
824826
],
825827
]
@@ -873,7 +875,7 @@ public function editProcess(Request $request, Response $response) : Response
873875
isset($data['slug']) and Arr::delete($data, 'slug');
874876
isset($data['csrf_value']) and Arr::delete($data, 'csrf_value');
875877
isset($data['csrf_name']) and Arr::delete($data, 'csrf_name');
876-
isset($data['action']) and Arr::delete($data, 'action');
878+
isset($data['form-save-action']) and Arr::delete($data, 'form-save-action');
877879
isset($data['trumbowyg-icons-path']) and Arr::delete($data, 'trumbowyg-icons-path');
878880
isset($data['trumbowyg-locale']) and Arr::delete($data, 'trumbowyg-locale');
879881
isset($data['flatpickr-date-format']) and Arr::delete($data, 'flatpickr-date-format');

templates/partials/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350

351351
{% include "plugins/admin/templates/partials/modules/codemirror.html" %}
352352
{% include "plugins/admin/templates/partials/modules/tippy.html" %}
353-
{% include "plugins/admin/templates/partials/modules/forms-save.html" %}
353+
{% include "plugins/admin/templates/partials/modules/entries-editor.html" %}
354354
{% include "plugins/admin/templates/partials/modules/slugify.html" %}
355355
{% include "plugins/admin/templates/partials/modules/swal2.html" %}
356356
{% include "plugins/admin/templates/partials/modules/clipboard.html" %}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
22
$('.js-save-form-submit').click(function () {
3-
$("#form").submit();
3+
$("form").submit();
44
});
5-
</script>
5+
</script>

0 commit comments

Comments
 (0)