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
|
||||
|
||||
@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)
|
||||
<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
|
||||
<button type="submit" class="btn btn-danger btn-sm" data-tooltip="true" title="{{ trans('general.delete') }}"><i class="fas fa-trash"></i></button>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
@endcan
|
||||
</nobr>
|
||||
</td>
|
||||
|
@ -192,7 +194,9 @@
|
|||
</td>
|
||||
<td>
|
||||
<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)
|
||||
<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>
|
||||
|
@ -214,7 +218,7 @@
|
|||
@endif
|
||||
|
||||
@endcan
|
||||
{{ Form::close() }}
|
||||
</form>
|
||||
</nobr>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue