Skip to content

Commit

Permalink
♻️refactor: hide convert option if no conversions available
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt committed Feb 9, 2024
1 parent 7f58099 commit dc4069a
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions resources/views/home/bank.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,29 @@
<a href="{{ url(Auth::user()->url . '/currency-logs') }}">View logs...</a>
</div>

<h3>Convert Currency</h3>
<p>Converting currency is a way to exchange one currency for another. The conversion rates are set by the site administrators and may change over time.</p>
{!! Form::open(['url' => 'bank/convert']) !!}
<div class="form-group">
<div class="row">
<div class="col-md-6">
{!! Form::label('currency_id', 'Currency to Convert:') !!}
{!! Form::select('currency_id', $convertOptions, null, ['class' => 'form-control', 'placeholder' => 'Select Currency', 'id' => 'convert-currency']) !!}
@if (count($convertOptions))
<h3>Convert Currency</h3>
<p>Converting currency is a way to exchange one currency for another. The conversion rates are set by the site administrators and may change over time.</p>
{!! Form::open(['url' => 'bank/convert']) !!}
<div class="form-group">
<div class="row">
<div class="col-md-6">
{!! Form::label('currency_id', 'Currency to Convert:') !!}
{!! Form::select('currency_id', $convertOptions, null, ['class' => 'form-control', 'placeholder' => 'Select Currency', 'id' => 'convert-currency']) !!}
</div>
</div>
</div>
</div>
<div class="form-group" id="convert-currency-form">
</div>
<div class="form-group" id="convert-currency-form">
</div>

<div class="text-right">
{!! Form::submit('Convert', ['class' => 'btn btn-primary']) !!}
</div>
<div class="text-right">
{!! Form::submit('Convert', ['class' => 'btn btn-primary']) !!}
</div>

{!! Form::close() !!}
{!! Form::close() !!}

<hr />
<hr />
@endif

<h3>Transfer Currency</h3>
<p>If you are transferring currency as part of a trade for on-site resources (items, currency, characters), using the <a href="{{ url('trades/open') }}">trade system</a> is recommended instead to protect yourself from being scammed.</p>
Expand Down

0 comments on commit dc4069a

Please sign in to comment.