Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 922c8e3

Browse files
committed
page del
- add condition for page ajax remove to avoid errors when its already removed (deletePageAndNests)
1 parent 31e85ce commit 922c8e3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/resources/views/admin/bulma/pages/index.blade.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,15 @@
6969
<td>
7070
<a href="{{ route($crud_prefix.'.pages.edit',[$page->id]) }}" class="button is-info is-inline-block">@lang('SimpleMenu::messages.app_edit')</a>
7171
<a class="is-inline-block">
72-
{{ Form::open(['method' => 'DELETE', 'route' => [$crud_prefix.'.pages.destroy', $page->id], 'data-id'=>'item-'.$page->id ,'@submit.prevent'=>'DelItem($event,"'.$page->title.'")']) }}
73-
{{ Form::submit(trans('SimpleMenu::messages.app_delete'), ['class' => 'button is-danger']) }}
74-
{{ Form::close() }}
72+
@if (config('simpleMenu.deletePageAndNests'))
73+
{{ Form::open(['method' => 'DELETE', 'route' => [$crud_prefix.'.pages.destroy', $page->id]]) }}
74+
{{ Form::submit(trans('SimpleMenu::messages.app_delete'), ['class' => 'button is-danger']) }}
75+
{{ Form::close() }}
76+
@else
77+
{{ Form::open(['method' => 'DELETE', 'route' => [$crud_prefix.'.pages.destroy', $page->id], 'data-id'=>'item-'.$page->id ,'@submit.prevent'=>'DelItem($event,"'.$page->title.'")']) }}
78+
{{ Form::submit(trans('SimpleMenu::messages.app_delete'), ['class' => 'button is-danger']) }}
79+
{{ Form::close() }}
80+
@endif
7581
</a>
7682
</td>
7783
</tr>

0 commit comments

Comments
 (0)