Skip to content

Commit

Permalink
Add a check in case the owner is null
Browse files Browse the repository at this point in the history
  • Loading branch information
corowne committed Apr 4, 2020
1 parent 14c4eda commit 9c3adfd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions resources/views/widgets/_bank_select_row.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<div id="bankRowData" class="hide">
<table class="table table-sm">
@foreach($owners as $owner)
<tbody id="{{ strtolower($owner->logType) }}Row-{{ $owner->id }}">
<tr class="bank-row">
<td>{!! Form::select('currency_id['.strtolower($owner->logType).'-'.$owner->id.'][]', $owner->getCurrencySelect(isset($isTransferrable) ? $isTransferrable : false), null, ['class' => 'form-control selectize', 'placeholder' => 'Select Currency']) !!}</td>
<td>{!! Form::text('currency_quantity['.strtolower($owner->logType).'-'.$owner->id.'][]', 0, ['class' => 'form-control']) !!}</td>
<td class="text-right"><a href="#" class="btn btn-danger remove-currency-button">Remove</a></td>
</tr>
</tbody>
@if($owner)
<tbody id="{{ strtolower($owner->logType) }}Row-{{ $owner->id }}">
<tr class="bank-row">
<td>{!! Form::select('currency_id['.strtolower($owner->logType).'-'.$owner->id.'][]', $owner->getCurrencySelect(isset($isTransferrable) ? $isTransferrable : false), null, ['class' => 'form-control selectize', 'placeholder' => 'Select Currency']) !!}</td>
<td>{!! Form::text('currency_quantity['.strtolower($owner->logType).'-'.$owner->id.'][]', 0, ['class' => 'form-control']) !!}</td>
<td class="text-right"><a href="#" class="btn btn-danger remove-currency-button">Remove</a></td>
</tr>
</tbody>
@endif
@endforeach
</table>
</div>

0 comments on commit 9c3adfd

Please sign in to comment.