bookinventory/resources/views/partials/row.blade.php
Tyler d086b29bcc
All checks were successful
continuous-integration/drone/push Build is passing
A ton of progress, search start
2020-12-26 05:46:23 -05:00

20 lines
1.0 KiB
PHP

<div {!! !empty($id) ? 'id="' . $id . '" ' : '' !!}class="form-row {{ $htmlClass ?? '' }}" data-index="{{ $index ?? '__INDEX__' }}">
<div class="col">
<input name="books[{{ $index ?? '__INDEX__' }}][barcode]" type="text" class="form-control barcode_input" placeholder="Barcode" value="{{ $item['barcode'] ?? '' }}">
</div>
<div class="col-4">
<input name="books[{{ $index ?? '__INDEX__' }}][name]" type="text" class="form-control" placeholder="Name" value="{{ $item['name'] ?? '' }}">
</div>
<div class="col">
<select name="books[{{ $index ?? '__INDEX__' }}][authors][]" class="form-control select2-author" multiple="multiple">
@if(!empty($item['authors']))
@foreach($item['authors'] as $author)
<option value="{{ $author }}" selected="selected">{{ $author }}</option>
@endforeach
@endif
</select>
</div>
<div class="col-1">
<button class="remove-row btn btn-danger">Remove</button>
</div>
</div>