Added confirm modal

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-04-16 12:29:48 -07:00
parent 2eeb7ddf58
commit b2940f9915
3 changed files with 43 additions and 1 deletions

View file

@ -0,0 +1,31 @@
<!-- Modal -->
<div class="modal fade" id="confirmAction" tabindex="-1" role="dialog" aria-labelledby="confirmActionLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="confirmActionLabel">{{ trans('general.file_upload') }}</h4>
</div>
{{ Form::open([
'method' => 'POST',
'route' => ['upload/'.$item_type, $item_id],
'files' => true,
'class' => 'form-horizontal' ]) }}
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<div class="modal-body">
<div class="row">
<div class="col-md-12">
Blah
</div>
</div>
</div> <!-- /.modal-body-->
<div class="modal-footer">
<a href="#" class="pull-left" data-dismiss="modal">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-primary">{{ trans('button.upload') }}</button>
</div>
{{ Form::close() }}
</div>
</div>
</div>

View file

@ -4,7 +4,7 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h2 class="modal-title" id="uploadFileModalLabel">{{ trans('general.file_upload') }}</h4> <h4 class="modal-title" id="uploadFileModalLabel">{{ trans('general.file_upload') }}</h4>
</div> </div>
{{ Form::open([ {{ Form::open([
'method' => 'POST', 'method' => 'POST',

View file

@ -25,10 +25,21 @@ Route::group(['prefix' => 'licenses', 'middleware' => ['auth']], function () {
[Licenses\LicenseCheckinController::class, 'store'] [Licenses\LicenseCheckinController::class, 'store']
)->name('licenses.checkin.save'); )->name('licenses.checkin.save');
Route::post(
'{licenseId}/bulkcheckin',
[Licenses\LicenseCheckinController::class, 'bulkCheckin']
)->name('licenses.bulkcheckin');
Route::post(
'{licenseId}/bulkcheckout',
[Licenses\LicenseCheckoutController::class, 'bulkCheckout']
)->name('licenses.bulkcheckout');
Route::post( Route::post(
'{licenseId}/upload', '{licenseId}/upload',
[Licenses\LicenseFilesController::class, 'store'] [Licenses\LicenseFilesController::class, 'store']
)->name('upload/license'); )->name('upload/license');
Route::delete( Route::delete(
'{licenseId}/deletefile/{fileId}', '{licenseId}/deletefile/{fileId}',
[Licenses\LicenseFilesController::class, 'destroy'] [Licenses\LicenseFilesController::class, 'destroy']