Migrate Form::open and Form::close on asset view

This commit is contained in:
Marcus Moore 2025-02-12 11:38:19 -08:00
parent c08cfb9b73
commit 93a67847ba
No known key found for this signature in database

View file

@ -252,18 +252,21 @@
@endcan
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
{{ Form::open([
'method' => 'POST',
'route' => ['hardware/bulkedit'],
'class' => 'form-inline',
'target'=>'_blank',
'id' => 'bulkForm']) }}
<form
method="POST"
action="{{ route('hardware/bulkedit') }}"
accept-charset="UTF-8"
class="form-inline"
target="_blank"
id="bulkForm"
>
@csrf
<input type="hidden" name="bulk_actions" value="labels" />
<input type="hidden" name="ids[{{$asset->id}}]" value="{{ $asset->id }}" />
<button class="btn btn-block btn-social btn-sm btn-default" id="bulkEdit"{{ (!$asset->model ? ' disabled' : '') }}{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid').'"' : '') !!}>
<x-icon type="assets" />
{{ trans_choice('button.generate_labels', 1) }}</button>
{{ Form::close() }}
</form>
</div>
@can('delete', $asset)
@ -430,7 +433,7 @@
{{ $asset->assetstatus->name }}
<label class="label label-default">{{ trans('general.deployed') }}</label>
<x-icon type="long-arrow-right" />
<x-icon type="{{ $asset->assignedType() }}" class="fa-fw" />
{!! $asset->assignedTo->present()->nameUrl() !!}
@ -1112,7 +1115,7 @@
{{ ($asset->userRequests) ? (int) $asset->userRequests->count() : '0' }}
</div>
</div>
</div> <!--/end striped container-->
</div> <!-- end col-md-9 -->
</div><!-- end info-stack-container -->
@ -1230,11 +1233,14 @@
@if ($asset->assignedAssets->count() > 0)
{{ Form::open([
'method' => 'POST',
'route' => ['hardware/bulkedit'],
'class' => 'form-inline',
'id' => 'bulkForm']) }}
<form
method="POST"
action="{{ route('hardware/bulkedit') }}"
accept-charset="UTF-8"
class="form-inline"
id="bulkForm"
>
@csrf
<div id="toolbar">
<label for="bulk_actions"><span class="sr-only">{{ trans('general.bulk_actions')}}</span></label>
<select name="bulk_actions" class="form-control select2" style="width: 150px;" aria-label="bulk_actions">
@ -1272,7 +1278,7 @@
</table>
{{ Form::close() }}
</form>
</div>
@else
@ -1420,4 +1426,4 @@
</script>
@include ('partials.bootstrap-table')
@stop
@stop