contact.blade.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. @extends('site.partial.template')
  2. @section('section')
  3. <div class="title">
  4. <h3 class="font-weight-bold">{{__('site.contact-us')}}</h3>
  5. </div>
  6. <hr>
  7. <section>
  8. @auth
  9. <p class="lead">
  10. @if(config('instance.email') && config('instance.contact.enabled'))
  11. You can contact the admins by sending an email to <span class="font-weight-bold">{{config('instance.email')}}</span> or by using the form below.
  12. @elseif(config('instance.email') && !config('instance.contact.enabled'))
  13. You can contact the admins by sending an email to <span class="font-weight-bold">{{config('instance.email')}}</span>.
  14. @elseif(!config('instance.email') && config('instance.contact.enabled'))
  15. You can contact the admins by using the form below.
  16. @else
  17. The admins have not set a contact email address.
  18. @endif
  19. </p>
  20. @if(config('instance.contact.enabled'))
  21. <form method="POST">
  22. @csrf
  23. <div class="form-group">
  24. <label for="input1" class="font-weight-bold">Message</label>
  25. <textarea class="form-control" id="input1" name="message" rows="6" placeholder="" maxlength="500" required>{{old('message')}}</textarea>
  26. <span class="form-text text-muted text-right msg-counter">0/500</span>
  27. </div>
  28. <div class="form-group form-check">
  29. <input type="checkbox" class="form-check-input" id="input2" name="request_response">
  30. <label class="form-check-label" for="input2">Request response from admins</label>
  31. </div>
  32. <button type="submit" class="btn btn-primary font-weight-bold py-0">Submit</button>
  33. </form>
  34. @endif
  35. @else
  36. <p class="lead">
  37. @if(config('instance.email') && config('instance.contact.enabled'))
  38. You can contact the admins by sending an email to <span class="font-weight-bold">{{config('instance.email')}}</span> or log in to send a message.
  39. @elseif (!config('instance.email') && config('instance.contact.enabled'))
  40. The admins have not set a contact email address. Please log in to send a message.
  41. @elseif (config('instance.email') && !config('instance.contact.enabled'))
  42. You can contact the admins by sending an email to <span class="font-weight-bold">{{config('instance.email')}}</span>.
  43. @endif
  44. </p>
  45. @endauth
  46. </section>
  47. @endsection
  48. @auth
  49. @push('styles')
  50. <meta name="csrf-token" content="{{ csrf_token() }}">
  51. @endpush
  52. @push('scripts')
  53. <script type="text/javascript">
  54. $('#input1').on('keyup change paste', function(el) {
  55. let len = el.target.value.length;
  56. $('.msg-counter').text(len + '/500');
  57. });
  58. </script>
  59. @endpush
  60. @endauth