mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Migrate Form::open and Form::close in manage custom fields view
This commit is contained in:
parent
3065ba851e
commit
e9d3b9dcde
|
@ -87,13 +87,15 @@
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('delete', $fieldset)
|
@can('delete', $fieldset)
|
||||||
{{ Form::open(['route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete','style' => 'display:inline-block']) }}
|
<form method="POST" action="{{ route('fieldsets.destroy', $fieldset->id) }}" accept-charset="UTF-8" style="display:inline-block">
|
||||||
|
{{ method_field('DELETE') }}
|
||||||
|
@csrf
|
||||||
@if($fieldset->models->count() > 0)
|
@if($fieldset->models->count() > 0)
|
||||||
<button type="submit" class="btn btn-danger btn-sm disabled" data-tooltip="true" title="{{ trans('general.cannot_be_deleted') }}" disabled><i class="fas fa-trash"></i></button>
|
<button type="submit" class="btn btn-danger btn-sm disabled" data-tooltip="true" title="{{ trans('general.cannot_be_deleted') }}" disabled><i class="fas fa-trash"></i></button>
|
||||||
@else
|
@else
|
||||||
<button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}"><i class="fas fa-trash"></i></button>
|
<button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}"><i class="fas fa-trash"></i></button>
|
||||||
@endif
|
@endif
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
@endcan
|
@endcan
|
||||||
</nobr>
|
</nobr>
|
||||||
</td>
|
</td>
|
||||||
|
@ -192,7 +194,9 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<nobr>
|
<nobr>
|
||||||
{{ Form::open(array('route' => array('fields.destroy', $field->id), 'method' => 'delete', 'style' => 'display:inline-block')) }}
|
<form method="POST" action="{{ route('fields.destroy', $field->id) }}" accept-charset="UTF-8" style="display:inline-block">
|
||||||
|
{{ method_field('DELETE') }}
|
||||||
|
@csrf
|
||||||
@can('update', $field)
|
@can('update', $field)
|
||||||
<a href="{{ route('fields.edit', $field->id) }}" class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.update') }}">
|
<a href="{{ route('fields.edit', $field->id) }}" class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.update') }}">
|
||||||
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
||||||
|
@ -214,7 +218,7 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@endcan
|
@endcan
|
||||||
{{ Form::close() }}
|
</form>
|
||||||
</nobr>
|
</nobr>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue