forgot.blade.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. @extends('layouts.blank')
  2. @push('styles')
  3. <link href="{{ mix('css/landing.css') }}" rel="stylesheet">
  4. <link rel="preload" as="image" href="{{ url('/_landing/bg.jpg')}}" />
  5. @endpush
  6. @section('content')
  7. <div class="page-wrapper">
  8. <div class="container mt-4">
  9. <div class="row justify-content-center">
  10. <div class="col-xl-6 col-lg-5 col-md-7 col-12">
  11. <div class="text-center">
  12. <a href="/">
  13. <img src="/img/pixelfed-icon-white.svg" height="60px">
  14. </a>
  15. <h1 class="pt-4 pb-1">Forgot Email</h1>
  16. <p class="font-weight-light pb-2">Recover your account by sending an email to an associated username</p>
  17. </div>
  18. @if(session('status'))
  19. <div class="alert alert-success">
  20. <div class="d-flex align-items-center font-weight-bold" style="gap:1rem;">
  21. <i class="far fa-check-circle fa-lg" style="opacity:70%"></i>
  22. {{ session('status') }}
  23. </div>
  24. </div>
  25. @endif
  26. @if ($errors->any())
  27. @foreach ($errors->all() as $error)
  28. <div class="alert alert-danger bg-danger text-white border-danger">
  29. <div class="d-flex align-items-center font-weight-bold" style="gap:1rem;">
  30. <i class="far fa-exclamation-triangle fa-2x" style="opacity:70%"></i>
  31. {{ $error }}
  32. </div>
  33. </div>
  34. @endforeach
  35. @endif
  36. <div class="card bg-glass">
  37. <div class="card-header bg-transparent p-3 text-center font-weight-bold" style="border-bottom:1px solid #ffffff20">{{ __('Recover Email') }}</div>
  38. <div class="card-body">
  39. <form id="passwordReset" method="POST" action="{{ route('email.forgot') }}">
  40. @csrf
  41. <div class="form-group row">
  42. <div class="col-md-12">
  43. <label class="font-weight-bold small text-muted">Username</label>
  44. <input
  45. id="username"
  46. type="text"
  47. class="form-control form-control-lg bg-glass text-white"
  48. name="username"
  49. maxlength="15"
  50. placeholder="{{ __('Your username') }}" required>
  51. @if ($errors->has('username') )
  52. <span class="text-danger small mb-3">
  53. <strong>{{ $errors->first('username') }}</strong>
  54. </span>
  55. @endif
  56. </div>
  57. </div>
  58. @if((bool) config_cache('captcha.enabled'))
  59. <label class="font-weight-bold small text-muted">Captcha</label>
  60. <div class="d-flex flex-grow-1">
  61. {!! Captcha::display(['data-theme' => 'dark']) !!}
  62. </div>
  63. @if ($errors->has('h-captcha-response'))
  64. <div class="text-danger small mb-3">
  65. <strong>{{ $errors->first('h-captcha-response') }}</strong>
  66. </div>
  67. @endif
  68. @endif
  69. <div class="form-group row pt-4 mb-0">
  70. <div class="col-md-12">
  71. <button type="button" id="sbtn" class="btn btn-primary btn-block rounded-pill font-weight-bold" onclick="event.preventDefault();handleSubmit()">
  72. {{ __('Send Email Reminder') }}
  73. </button>
  74. </div>
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. <div class="mt-3 d-flex justify-content-between align-items-center">
  80. <a class="btn btn-link text-white font-weight-bold text-decoration-none" href="{{ route('login') }}">
  81. <i class="far fa-long-arrow-left fa-lg mr-1"></i> {{ __('Back to Login') }}
  82. </a>
  83. <a href="{{ route('password.request') }}" class="text-white font-weight-bold text-decoration-none">Forgot password?</a>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. @endsection
  90. @push('scripts')
  91. <script type="text/javascript">
  92. function handleSubmit() {
  93. let username = document.getElementById('username');
  94. username.classList.add('disabled');
  95. let btn = document.getElementById('sbtn');
  96. btn.classList.add('disabled');
  97. btn.setAttribute('disabled', 'disabled');
  98. btn.innerHTML = '<div class="spinner-border spinner-border-sm" role="status"><span class="sr-only">Loading...</span></div>';
  99. document.getElementById('passwordReset').submit()
  100. }
  101. </script>
  102. @endpush
  103. @push('styles')
  104. <style>
  105. .bg-glass:focus {
  106. background: rgba(255, 255, 255, 0.05) !important;
  107. box-shadow: none !important;
  108. border-color: rgba(255, 255, 255, 0.3);
  109. }
  110. </style>
  111. @endpush