create.blade.php 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. @extends('layouts.main')
  2. @section('content')
  3. <!-- CONTENT HEADER -->
  4. <section class="content-header">
  5. <div class="container-fluid">
  6. <div class="row mb-2">
  7. <div class="col-sm-6">
  8. <h1>{{__('Store')}}</h1>
  9. </div>
  10. <div class="col-sm-6">
  11. <ol class="breadcrumb float-sm-right">
  12. <li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
  13. <li class="breadcrumb-item"><a href="{{route('admin.store.index')}}">{{__('Store')}}</a></li>
  14. <li class="breadcrumb-item"><a class="text-muted"
  15. href="{{route('admin.store.create')}}">{{__('Create')}}</a>
  16. </li>
  17. </ol>
  18. </div>
  19. </div>
  20. </div>
  21. </section>
  22. <!-- END CONTENT HEADER -->
  23. <!-- MAIN CONTENT -->
  24. <section class="content">
  25. <div class="container-fluid">
  26. <div class="row">
  27. <div class="col-lg-6">
  28. <div class="card">
  29. <div class="card-body">
  30. <form action="{{route('admin.store.store')}}" method="POST">
  31. @csrf
  32. <div class="d-flex flex-row-reverse">
  33. <div class="custom-control custom-switch">
  34. <input type="checkbox" name="disabled"
  35. class="custom-control-input custom-control-input-danger"
  36. id="switch1">
  37. <label class="custom-control-label" for="switch1">{{__('Disabled')}} <i
  38. data-toggle="popover"
  39. data-trigger="hover"
  40. data-content="{{__('Will hide this option from being selected')}}"
  41. class="fas fa-info-circle"></i></label>
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label for="type">{{__('Type')}}</label>
  46. <select required name="type" id="type"
  47. class="custom-select @error('name') is-invalid @enderror">
  48. <option selected value="Credits">{{ $credits_display_name }}</option>
  49. <option value="Server slots">{{__("Server Slots")}}</option>
  50. </select>
  51. @error('name')
  52. <div class="text-danger">
  53. {{$message}}
  54. </div>
  55. @enderror
  56. </div>
  57. <div class="form-group">
  58. <label for="currency_code">{{__('Currency code')}}</label>
  59. <select required name="currency_code" id="currency_code"
  60. class="custom-select @error('name') is-invalid @enderror">
  61. @foreach($currencyCodes as $code)
  62. <option @if($code == 'EUR') selected
  63. @endif value="{{$code}}">{{$code}}</option>
  64. @endforeach
  65. </select>
  66. @error('currency_code')
  67. <div class="text-danger">
  68. {{$message}}
  69. </div>
  70. @enderror
  71. <div class="text-muted">
  72. {{__('Checkout the paypal docs to select the appropriate code')}} <a
  73. target="_blank"
  74. href="https://developer.paypal.com/docs/api/reference/currency-codes/">link</a>
  75. </div>
  76. </div>
  77. <div class="form-group">
  78. <label for="price">{{__('Price')}}</label>
  79. <input value="{{old('price')}}" id="price" name="price"
  80. type="number"
  81. placeholder="10.00"
  82. step="any"
  83. class="form-control @error('price') is-invalid @enderror"
  84. required="required">
  85. @error('price')
  86. <div class="invalid-feedback">
  87. {{$message}}
  88. </div>
  89. @enderror
  90. </div>
  91. <div class="form-group">
  92. <label for="quantity">{{__('Quantity')}}</label>
  93. <input value="{{old('quantity')}}" id="quantity" name="quantity"
  94. type="number"
  95. placeholder="1000"
  96. class="form-control @error('quantity') is-invalid @enderror"
  97. required="required">
  98. @error('quantity')
  99. <div class="invalid-feedback">
  100. {{$message}}
  101. </div>
  102. @enderror
  103. <div class="text-muted">
  104. {{__('Amount given to the user after purchasing')}}
  105. </div>
  106. </div>
  107. <div class="form-group">
  108. <label for="display">{{__('Display')}}</label>
  109. <input value="{{old('display')}}" id="display" name="display"
  110. type="text"
  111. placeholder="750 + 250"
  112. class="form-control @error('display') is-invalid @enderror"
  113. required="required">
  114. @error('display')
  115. <div class="invalid-feedback">
  116. {{$message}}
  117. </div>
  118. @enderror
  119. <div class="text-muted">
  120. {{__('This is what the user sees at store and checkout')}}
  121. </div>
  122. </div>
  123. <div class="form-group">
  124. <label for="description">{{__('Description')}}</label>
  125. <input value="{{old('description')}}" id="description" name="description"
  126. type="text"
  127. placeholder="{{__('Adds 1000 credits to your account')}}"
  128. class="form-control @error('description') is-invalid @enderror"
  129. required="required">
  130. @error('description')
  131. <div class="invalid-feedback">
  132. {{$message}}
  133. </div>
  134. @enderror
  135. <div class="text-muted">
  136. {{__('This is what the user sees at checkout')}}
  137. </div>
  138. </div>
  139. <div class="form-group text-right">
  140. <button type="submit" class="btn btn-primary">
  141. {{__('Submit')}}
  142. </button>
  143. </div>
  144. </form>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </section>
  151. <!-- END CONTENT -->
  152. @endsection