Viewing File: /home/ubuntu/btcthrottle-backend/resources/views/admin/admin_crypto_accounts/_form.blade.php

<!-- Multi Column with Form Separator -->
<div class="card mb-4">
    <h5 class="card-header">{{ $title }}</h5>
    <form id="cryptoAccountForm" class="card-body" action="{{ $route }}" method="POST" enctype="multipart/form-data">
        @csrf
        <hr class="mt-0" />
        <input type="hidden" name="admin_crypto_account_id" value="{{ $admin_crypto_account->id }}">
                <input type="hidden" name="admin_id" value="{{ Auth::guard('admin')->user()->id }}">
        <div class="row g-3">
             <div class="col-md-6 mb-4">
               <label class="required form-label">{{ tr('nickname') }}</label>
                <input class="form-control" type="text" name="nickname" placeholder="{{ tr('nickname') }}" value="{{ old('nickname', $admin_crypto_account->nickname) }}" required title="{{ tr('nickname') }}" />
            </div>
            <div class="col-md-6 mb-4">
           <label class="required form-label">{{ tr('wallet_address') }}</label>
                <input class="form-control" type="text" name="wallet_address" placeholder="{{ tr('wallet_address') }}" value="{{ old('wallet_address', $admin_crypto_account->wallet_address) }}" required title="{{ tr('wallet_address') }}" />
          </div>
          <div class="col-md-6 mb-4">
               <label class="required form-label">{{ tr('token_type') }}</label>
                <input class="form-control" type="text" name="token_type" placeholder="{{ tr('token_type') }}" value="{{ old('token_type', $admin_crypto_account->token_type) }}" required title="{{ tr('token_type') }}" oninput="checkSpace(this)" />
            </div>
             <div class="col-md-6 mb-4">
                <label for="amount" class="required form-label">{{ tr('amount') }}</label>
                <input class="form-control" type="number" step="any" min="0" id="amount" name="amount" placeholder="{{ tr('amount') }}" value="{{ old('amount', $admin_crypto_account->amount) }}" required title="{{ tr('amount') }}" />
            </div>
        <div class="pt-4">
            <button type="submit" class="btn btn-primary me-sm-3 me-1">{{ tr('submit') }}</button>
            <button type="reset" class="btn btn-label-secondary">{{ tr('cancel') }}</button>
        </div>
    </form>
</div>

@section('scripts')
  <script>
  document.getElementById("staticPageForm").addEventListener("submit", function(event) {
      const quill_editor_content = quill_editor.root.innerHTML;
      if (!quill_editor_content || quill_editor_content == "<p><br></p>") {
          notifier("{{tr('field_is_required', strtolower(tr('description')))}}", "error");
          event.preventDefault();
          return false;
      } else {
        $("#description").val(quill_editor_content);
      }
    });

  function checkSpace(input) {
        if (input.value.startsWith(' ')) {
            input.setCustomValidity("Token type cannot start with a space.");
        } else {
            input.setCustomValidity('');
        }
    }
  </script>
@endsection
Back to Directory File Manager