disable upgrade button when no key is set
This commit is contained in:
parent
8cfb069f60
commit
54fe21635d
|
@ -221,11 +221,18 @@
|
|||
<div class="card-footer">
|
||||
<div class="col-md-12 text-center">
|
||||
<!-- Upgrade Button trigger modal -->
|
||||
<button type="button" data-toggle="modal" data-target="#UpgradeModal{{ $server->id }}" target="__blank"
|
||||
@if(config("SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN") and Auth::user()->role=="admin")
|
||||
<i data-toggle="popover" data-trigger="hover"
|
||||
data-content="{{ __('To enable the upgrade/downgrade system, please set your Ptero Admin-User API Key in the Settings!') }}"
|
||||
class="fas fa-info-circle"></i>
|
||||
@endif
|
||||
<button type="button" data-toggle="modal" @if(!config("SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN")) disabled @endif data-target="#UpgradeModal{{ $server->id }}" target="__blank"
|
||||
class="btn btn-info btn-md">
|
||||
<i class="fas fa-upload mr-2"></i>
|
||||
<span>{{ __('Upgrade / Downgrade') }}</span>
|
||||
</button>
|
||||
|
||||
|
||||
<!-- Upgrade Modal -->
|
||||
<div style="width: 100%; margin-block-start: 100px;" class="modal fade" id="UpgradeModal{{ $server->id }}" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
|
@ -243,6 +250,7 @@
|
|||
<strong>{{__("YOUR PRODUCT")}} : </strong> {{ $server->product->name }}
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<form action="{{ route('servers.upgrade', ['server' => $server->id]) }}" method="POST">
|
||||
@csrf
|
||||
<select name="product_upgrade" id="product_upgrade" class="form-input2 form-control">
|
||||
|
|
Loading…
Reference in a new issue