Fixed #4408 - requestable assets not working

This commit is contained in:
snipe 2017-11-16 11:09:24 -08:00
parent 876dde1280
commit 38eb16dfea

View file

@ -60,8 +60,7 @@
@foreach ($assets as $asset)
<tr>
<form action="{{route('account/request-item', ['itemType' => 'asset', 'itemId' => $asset->id])}}" method="POST" accept-charset="utf-8">
{{ csrf_field() }}
<td>
@if ($asset->getImageUrl())
<a href="{{ $asset->getImageUrl() }}" data-toggle="lightbox" data-type="image">
@ -96,13 +95,16 @@
<td>{{ $asset->expected_checkin }}</td>
<td>
<form action="{{route('account/request-item', ['itemType' => 'asset', 'itemId' => $asset->id])}}" method="POST" accept-charset="utf-8">
{{ csrf_field() }}
@if ($asset->isRequestedBy(Auth::user()))
{{Form::submit(trans('button.cancel'), ['class' => 'btn btn-danger btn-sm'])}}
@else
{{Form::submit(trans('button.request'), ['class' => 'btn btn-primary btn-sm'])}}
@endif
</td>
</form>
</td>
</tr>
@endforeach
</tbody>