Merge pull request #16243 from marcusmoore/chore/migrate-form-open-pt3
Replace Form::open and Form::close pt3
This commit is contained in:
commit
c9de9ebbab
7 changed files with 57 additions and 45 deletions
|
@ -252,18 +252,21 @@
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
|
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
|
||||||
{{ Form::open([
|
<form
|
||||||
'method' => 'POST',
|
method="POST"
|
||||||
'route' => ['hardware/bulkedit'],
|
action="{{ route('hardware/bulkedit') }}"
|
||||||
'class' => 'form-inline',
|
accept-charset="UTF-8"
|
||||||
'target'=>'_blank',
|
class="form-inline"
|
||||||
'id' => 'bulkForm']) }}
|
target="_blank"
|
||||||
|
id="bulkForm"
|
||||||
|
>
|
||||||
|
@csrf
|
||||||
<input type="hidden" name="bulk_actions" value="labels" />
|
<input type="hidden" name="bulk_actions" value="labels" />
|
||||||
<input type="hidden" name="ids[{{$asset->id}}]" value="{{ $asset->id }}" />
|
<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').'"' : '') !!}>
|
<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" />
|
<x-icon type="assets" />
|
||||||
{{ trans_choice('button.generate_labels', 1) }}</button>
|
{{ trans_choice('button.generate_labels', 1) }}</button>
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@can('delete', $asset)
|
@can('delete', $asset)
|
||||||
|
@ -1230,11 +1233,14 @@
|
||||||
@if ($asset->assignedAssets->count() > 0)
|
@if ($asset->assignedAssets->count() > 0)
|
||||||
|
|
||||||
|
|
||||||
{{ Form::open([
|
<form
|
||||||
'method' => 'POST',
|
method="POST"
|
||||||
'route' => ['hardware/bulkedit'],
|
action="{{ route('hardware/bulkedit') }}"
|
||||||
'class' => 'form-inline',
|
accept-charset="UTF-8"
|
||||||
'id' => 'bulkForm']) }}
|
class="form-inline"
|
||||||
|
id="bulkForm"
|
||||||
|
>
|
||||||
|
@csrf
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<label for="bulk_actions"><span class="sr-only">{{ trans('general.bulk_actions')}}</span></label>
|
<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">
|
<select name="bulk_actions" class="form-control select2" style="width: 150px;" aria-label="bulk_actions">
|
||||||
|
@ -1272,7 +1278,7 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
|
|
|
@ -6,11 +6,13 @@
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 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
|
||||||
'method' => 'POST',
|
method="POST"
|
||||||
'route' => ['upload/'.$item_type, $item_id],
|
action="{{ route('upload/' . $item_type, $item_id) }}"
|
||||||
'files' => true,
|
accept-charset="UTF-8"
|
||||||
'class' => 'form-horizontal' ]) }}
|
class="form-horizontal"
|
||||||
|
enctype="multipart/form-data"
|
||||||
|
>
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
@ -46,7 +48,7 @@
|
||||||
<a href="#" class="pull-left" data-dismiss="modal">{{ trans('button.cancel') }}</a>
|
<a href="#" class="pull-left" data-dismiss="modal">{{ trans('button.cancel') }}</a>
|
||||||
<button type="submit" class="btn btn-primary">{{ trans('button.upload') }}</button>
|
<button type="submit" class="btn btn-primary">{{ trans('button.upload') }}</button>
|
||||||
</div>
|
</div>
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ Form::close() }}
|
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -98,7 +98,6 @@
|
||||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||||
}'>
|
}'>
|
||||||
</table>
|
</table>
|
||||||
{{ Form::close() }}
|
|
||||||
</div> <!-- /.tab-pane assets -->
|
</div> <!-- /.tab-pane assets -->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<div id="{{ (isset($id_divname)) ? $id_divname : 'assetsBulkEditToolbar' }}" style="min-width:400px">
|
<div id="{{ (isset($id_divname)) ? $id_divname : 'assetsBulkEditToolbar' }}" style="min-width:400px">
|
||||||
{{ Form::open([
|
<form
|
||||||
'method' => 'POST',
|
method="POST"
|
||||||
'route' => ['hardware/bulkedit'],
|
action="{{ route('hardware/bulkedit') }}"
|
||||||
'class' => 'form-inline',
|
accept-charset="UTF-8"
|
||||||
'id' => (isset($id_formname)) ? $id_formname : 'assetsBulkForm',
|
class="form-inline"
|
||||||
]) }}
|
id="{{ (isset($id_formname)) ? $id_formname : 'assetsBulkForm' }}"
|
||||||
|
>
|
||||||
|
@csrf
|
||||||
|
|
||||||
{{-- The sort and order will only be used if the cookie is actually empty (like on first-use) --}}
|
{{-- The sort and order will only be used if the cookie is actually empty (like on first-use) --}}
|
||||||
<input name="sort" type="hidden" value="assets.id">
|
<input name="sort" type="hidden" value="assets.id">
|
||||||
|
@ -34,5 +36,5 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<button class="btn btn-primary" id="{{ (isset($id_button)) ? $id_button : 'bulkAssetEditButton' }}" disabled>{{ trans('button.go') }}</button>
|
<button class="btn btn-primary" id="{{ (isset($id_button)) ? $id_button : 'bulkAssetEditButton' }}" disabled>{{ trans('button.go') }}</button>
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
@can('delete', \App\Models\Location::class)
|
@can('delete', \App\Models\Location::class)
|
||||||
<div id="locationsBulkEditToolbar">
|
<div id="locationsBulkEditToolbar">
|
||||||
{{ Form::open([
|
<form
|
||||||
'method' => 'POST',
|
method="POST"
|
||||||
'route' => ['locations.bulkdelete.show'],
|
action="{{ route('locations.bulkdelete.show') }}"
|
||||||
'class' => 'form-inline',
|
accept-charset="UTF-8"
|
||||||
'id' => 'locationsBulkForm']) }}
|
class="form-inline"
|
||||||
|
id="locationsBulkForm"
|
||||||
|
>
|
||||||
|
@csrf
|
||||||
<div id="locations-toolbar">
|
<div id="locations-toolbar">
|
||||||
<label for="bulk_actions" class="sr-only">{{ trans('general.bulk_actions') }}</label>
|
<label for="bulk_actions" class="sr-only">{{ trans('general.bulk_actions') }}</label>
|
||||||
<select name="bulk_actions" class="form-control select2" style="width: 200px;" aria-label="bulk_actions">
|
<select name="bulk_actions" class="form-control select2" style="width: 200px;" aria-label="bulk_actions">
|
||||||
|
@ -14,7 +16,7 @@
|
||||||
<button class="btn btn-primary" id="bulkLocationsEditButton" disabled>{{ trans('button.go') }}</button>
|
<button class="btn btn-primary" id="bulkLocationsEditButton" disabled>{{ trans('button.go') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<div id="modelsBulkEditToolbar">
|
<div id="modelsBulkEditToolbar">
|
||||||
{{ Form::open([
|
<form
|
||||||
'method' => 'POST',
|
method="POST"
|
||||||
'route' => ['models.bulkedit.index'],
|
action="{{route('models.bulkedit.index')}}"
|
||||||
'class' => 'form-inline',
|
accept-charset="UTF-8"
|
||||||
'id' => 'modelsBulkForm']) }}
|
class="form-inline"
|
||||||
|
id="modelsBulkForm"
|
||||||
|
>
|
||||||
|
@csrf
|
||||||
@if (request('status')!='deleted')
|
@if (request('status')!='deleted')
|
||||||
@can('delete', \App\Models\AssetModel::class)
|
@can('delete', \App\Models\AssetModel::class)
|
||||||
<div id="models-toolbar">
|
<div id="models-toolbar">
|
||||||
|
@ -17,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
@endif
|
@endif
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue