From 61739ce26603a55fddbe06decedc37cf3a465e20 Mon Sep 17 00:00:00 2001 From: Russell West Date: Thu, 15 Apr 2021 13:39:42 +0100 Subject: [PATCH] Pirep delete confirmation (#1143) * adds 100ll option to airport admin * Adds mogas field too * adds basic confirmation when deleting pirep --- resources/views/admin/pireps/actions.blade.php | 3 ++- resources/views/layouts/default/pireps/fields.blade.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/views/admin/pireps/actions.blade.php b/resources/views/admin/pireps/actions.blade.php index b4b3e064..b94046b6 100644 --- a/resources/views/admin/pireps/actions.blade.php +++ b/resources/views/admin/pireps/actions.blade.php @@ -31,7 +31,8 @@ {{ Form::open(['url' => route('admin.pireps.destroy', [$pirep->id]), 'method' => 'delete', 'name' => 'delete_'.$pirep->id, - 'id' => $pirep->id.'_delete' + 'id' => $pirep->id.'_delete', + 'onclick' => "return confirm('Are you sure?')" ]) }} {{ Form::button('Delete', ['type' => 'submit', 'class' => 'btn btn-danger']) }} {{ Form::close() }} diff --git a/resources/views/layouts/default/pireps/fields.blade.php b/resources/views/layouts/default/pireps/fields.blade.php index 9164bb97..08729ef2 100644 --- a/resources/views/layouts/default/pireps/fields.blade.php +++ b/resources/views/layouts/default/pireps/fields.blade.php @@ -327,7 +327,8 @@ flight reports that have been filed. You've been warned! 'name' => 'submit', 'value' => 'Delete', 'class' => 'btn btn-warning', - 'type' => 'submit']) + 'type' => 'submit', + 'onclick' => "return confirm('Are you sure you want to delete this PIREP?')"]) }} @endif