Viewing file: top_up.blade.php (17.37 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('master.front')
@section('title') {{__('All Games')}} @endsection
@section('styleplugins') <style> @media (max-width: 575.98px) { .top_up_section_step_payment { grid-template-columns: repeat(3, 1fr); } .top_up-product-detail-text .games-tilts-type { font-size: 15px; } .top_up-product-detail-img img { width: 100px; height: 100px; } .read-details { font-size: 12px; } .top_up-product-detail-text-des{ font-size: 12px; } .top_up_section_uid{ display: block !important; padding: 32px 10px; } .top_up_section_steps.one{ margin-right: 0px; margin-bottom: 15px; } } </style> @endsection
@section('content')
@php $setting = DB::table('settings')->first(); $footer_email = $setting->footer_email ?? ''; @endphp
<div class="container top_section"> <div class="row"> <div class="col-12"> <form action="{{ route('front.top.up.process') }}" method="POST"> @csrf <div class="row"> <div class="col-lg-7 top_up_section"> <div class="top_up_section_uid d-flex"> <div class="top_up_section_steps one">1</div> <div class="w-100"> @if(isset($game) && isset($game->forms) && !empty(json_decode($game->forms, true))) @foreach (json_decode($game->forms) as $form) <div class="top_up_section_step_one"> {{ Str::upper(str_replace('_', ' ', $form->name)) }} </div> <div class="top_up_section_step_one_form"> <div class="input-group input-email-id mb-4"> @if($form->type == 'text' || $form->type == 'tel' || $form->type == 'number') @if($form->name == 'user_id' || $form->name == 'uid' || $form->name == 'UID' || $form->name == 'identitas' || $form->name == 'identitas' || $form->name == 'Username' || $form->name == 'Account ID') <input type="{{ $form->type }}" id="uid" class="form-control" placeholder="{{ Str::upper(str_replace('_', ' ', $form->name)) }}" name="user_id" autocomplete="off"> @else <input type="{{ $form->type }}" id="uid" class="form-control" placeholder="{{ Str::upper(str_replace('_', ' ', $form->name)) }}" name="{{ $form->name }}" autocomplete="off"> @endif @elseif($form->type == 'option' && isset($form->options)) <select class="form-control" name="{{ $form->name }}"> @foreach($form->options as $option) <option value="{{ $option->value }}">{{ $option->name }}</option> @endforeach </select> @elseif($form->type == 'textarea') <textarea class="form-control" name="{{ $form->name }}" placeholder="{{ Str::upper(str_replace('_', ' ', $form->name)) }}"></textarea> @endif </div> </div> @endforeach @else <div class="top_up_section_step_one"> Email </div> <div class="top_up_section_step_one_form"> <div class="input-group input-email-id mb-4"> <span class="input-group-text input-group-prepend" id="basic-addon1"><i class="fa fa-envelope"></i></span> <input type="text" id="uid" class="form-control" placeholder="Email" name="user_id" autocomplete="off"> </div> </div> @endif </div> </div> <div class="top_up_section_uid"> <div class="top_up_section_step_one"> <div class="top_up_section_steps">2</div> Select Amount </div> <div class="top_up_section_step_two_form mt-4"> <input type="hidden" id="top_up_item_pricing" name="pricing"> <input type="hidden" id="top_up_item_code" name="code"> <div class="top_up_section_step_payment"> @foreach ($items as $item) <button class="top_up_section_step_payment_item" data-code="{{ $item->code }}" data-price="{{ PriceHelper::grandCurrencyPrice($item->price) }}"> {{ $item->name}} </button> @endforeach </div> </div> </div> <div class="top_up_section_uid"> <div class="top_up_section_step_one"> <div class="top_up_section_steps">3</div> Select Payment Channel </div> <div class="top_up_section_step_three_form mt-4"> <div class="top_up_section_step_three_wallet"> <div class="mt-3 top_up_section_step_three_wallet-text">All Payment Channels</div> <div class="top_up_section_step_three_wallet-details mt-3"> <div class="top_up_section_step_three_wallet-type mb-3"> <a class="btn top_up_section_step_three_wallet-type-select" data-bs-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample"> <div class="top_up_section_step_three_wallet-type-select-text"> <div>Wallet</div> <div class="category-charges new_pricing"> 0 </div> </div> </a> <div class="collapse panel-collapse" id="collapseExample"> <div class="payment-channel-button-container"> <div class="payment-channel-button-container-item"> <div class="payment-channel-button-container-item-btn"> <div class="payment-channel-button-container-item-btn-header"> <div class="payment-icon-container"> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ4mJfZvwTY00iYorXG83ejXXrGMTWloBCYSA&s" alt=""> </div> <div class="text-right"> <div class="currency">BDD</div> <div id="new_pricing" class="pricing new_pricing">0</div> </div> </div> <input type="hidden" id="wallet_name" name="wallet_name"> <div class="payment-channel-button-container-item-btn-body">Offline</div> </div> </div> </div> </div> </div> <div class="product-feedback-container text-center"> <div class="product-feedback-container-text mb-4 mt-4"> Please share your valuable feedback </div> <a href="mailto:{{ $footer_email }}" class="btn product-feedback-container-btn mt-3 px-3">Give Feedback</a> </div> </div> </div> </div> </div> </div> <div class="col-lg-5 position-relative"> <div class="position-relative"> <div class="fixed-div"> <div class="top_up_section_uid"> <div class="top_up-product-detail"> <div class="top_up-product-detail-img"> <img src="{{asset('assets/images/'.$game->photo)}}" alt=""> </div> <div class="top_up-product-detail-text"> <div class=""> <div class="games-tilts-name">{{ $game->name }}</div> <div class="games-tilts-type">{{ $game->meta_keywords }}</div> </div> <div class="top_up-product-detail-text-des mt-2 text-white"> {{ Str::words($game->meta_descriptions, 20, '...') }} <a href="#" id="read-details" class="read-details">Read More</a> </div> </div> </div> </div> <div class="top_up_section_uid text-white"> <h4 class="pb-2">Checkout</h4> <div class="row py-1"> <div class="col-6 text-left" style="color: hsla(0, 0%, 100%, .7);">Payment</div> <div class="col-6 text-right new_wallet_name"></div> </div> <div class="row py-1"> <div class="col-6 text-left" style="color: hsla(0, 0%, 100%, .7);">Item</div> <div class="col-6 text-right new_item_name"></div> </div> <div class="row py-1"> <div class="col-6 text-left" style="color: hsla(0, 0%, 100%, .7);">Total</div> <div class="col-6 text-right new_pricing"></div> </div> <button class="btn purchase_now_btn w-100 mt-4" disabled>Purchase Now</button> </div> </div> </div> </div> </div> </form> </div> </div> </div>
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content modal-content-bg-color"> <div class="modal-header"> <h5 class="modal-title" id="modal-titles"></h5> </div> <div class="modal-body mt-3"> <p class="m-0" id="modal-des"></p> <button type="button" class="btn btn-close-modal mt-4 float-right btn-sm" data-bs-dismiss="modal">Ok</button> </div> </div> </div> </div> <div class="modal fade" id="exampleModaldetails" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content modal-content-bg-color"> <div class="modal-header border-bottom"> <h5 class="modal-title">Game Details</h5> </div> <div class="modal-body mt-3"> <div class="top_up-product-detail align-items-center"> <div class="top_up-product-detail-img"> <img src="{{asset('assets/images/'.$game->photo)}}" alt=""> </div> <div class="top_up-product-detail-text"> <div class=""> <div class="games-tilts-name">{{ $game->name }}</div> <div class="games-tilts-type">{{ $game->meta_keywords }}</div> </div> </div> </div> <div class="top_up-product-detail-text-des mt-5 text-white text-center"> {{ $game->meta_descriptions }} </div> <button type="button" class="btn btn-close-modal mt-4 float-right btn-sm" data-bs-dismiss="modal">Ok</button> </div> </div> </div> </div> @endsection
@section('jsplugins') <script>
$(document).on('click','.top_up_section_step_payment_item',function(e){ e.preventDefault(); let pricing = $(this).attr('data-price'); let code = $(this).attr('data-code'); let name = $(this).text(); $('.top_up_section_step_payment_item').removeClass('active'); $(this).addClass('active'); $('#top_up_item_pricing').val(pricing); $('#top_up_item_code').val(code); $('.new_pricing').text(pricing), $('.new_item_name').text(name) }); $(document).on('click','.payment-channel-button-container-item-btn',function(e){ e.preventDefault(); let uid = $('#uid').val(); let price = $('#top_up_item_pricing').val(); if(!uid || !price){ let titles = ""; let des = ""; if(!uid){ titles = "Invalid email"; des = "Please enter your active email."; }else{ titles = "You have to select an amount first"; des = "Please select an item before selecting a payment channel"; } $('#modal-titles').text(titles); $('#modal-des').text(des); $('#exampleModal').modal('show'); }else{ let name = $('.payment-channel-button-container-item-btn-body').text(); $('.new_wallet_name').text(name); $('#wallet_name').val(name); $(".purchase_now_btn").prop("disabled", false); } }); </script> <script> $(document).on('click','#read-details',function(e){ $('#exampleModaldetails').modal('show'); }); </script> @endsection
|