email.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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">Reset Password</h1>
  16. <p class="font-weight-light pb-2">Send a password reset mail to reset your password</p>
  17. </div>
  18. @if(session('status') || $errors->has('email'))
  19. <div class="alert alert-info">
  20. <div class="d-flex align-items-center font-weight-bold" style="gap:1rem;">
  21. <i class="far fa-exclamation-triangle fa-2x" style="opacity:70%"></i>
  22. {{ session('status') ?? $errors->first('email') }}
  23. </div>
  24. </div>
  25. @endif
  26. <div class="card bg-glass">
  27. <div class="card-header bg-transparent p-3 text-center font-weight-bold" style="border-bottom:1px solid #ffffff20">{{ __('Reset Password') }}</div>
  28. <div class="card-body">
  29. <form id="passwordReset" method="POST" action="{{ route('password.email') }}">
  30. @csrf
  31. <div class="form-group row">
  32. <div class="col-md-12">
  33. <label class="font-weight-bold small text-muted">Email</label>
  34. <input
  35. id="email"
  36. type="email"
  37. class="form-control form-control-lg bg-glass text-white"
  38. name="email"
  39. placeholder="{{ __('E-Mail Address') }}"
  40. required>
  41. @if ($errors->has('email') && $errors->first('email') === 'The email must be a valid email address.')
  42. <span class="text-danger small mb-3">
  43. <strong>{{ $errors->first('email') }}</strong>
  44. </span>
  45. @endif
  46. </div>
  47. </div>
  48. @if((bool) config_cache('captcha.enabled'))
  49. <label class="font-weight-bold small text-muted">Captcha</label>
  50. <div class="d-flex flex-grow-1">
  51. {!! Captcha::display(['data-theme' => 'dark']) !!}
  52. </div>
  53. @if ($errors->has('h-captcha-response'))
  54. <div class="text-danger small mb-3">
  55. <strong>{{ $errors->first('h-captcha-response') }}</strong>
  56. </div>
  57. @endif
  58. @endif
  59. <div class="form-group row pt-4 mb-0">
  60. <div class="col-md-12">
  61. <button type="button" id="sbtn" class="btn btn-primary btn-block rounded-pill font-weight-bold" onclick="event.preventDefault();handleSubmit()">
  62. {{ __('Send Password Reset Link') }}
  63. </button>
  64. </div>
  65. </div>
  66. </form>
  67. </div>
  68. </div>
  69. <div class="mt-3 d-flex justify-content-between align-items-center">
  70. <a class="btn btn-link text-white font-weight-bold text-decoration-none" href="{{ route('login') }}">
  71. <i class="far fa-long-arrow-left fa-lg mr-1"></i> {{ __('Back to Login') }}
  72. </a>
  73. <a href="{{route('email.forgot')}}" class="text-white font-weight-bold text-decoration-none">Forgot email?</a>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. @endsection
  80. @push('scripts')
  81. <script type="text/javascript">
  82. function handleSubmit() {
  83. let email = document.getElementById('email');
  84. email.classList.add('disabled');
  85. let btn = document.getElementById('sbtn');
  86. btn.classList.add('disabled');
  87. btn.setAttribute('disabled', 'disabled');
  88. btn.innerHTML = '<div class="spinner-border spinner-border-sm" role="status"><span class="sr-only">Loading...</span></div>';
  89. document.getElementById('passwordReset').submit()
  90. }
  91. </script>
  92. @endpush
  93. @push('styles')
  94. <style>
  95. .bg-glass:focus {
  96. background: rgba(255, 255, 255, 0.05) !important;
  97. box-shadow: none !important;
  98. border-color: rgba(255, 255, 255, 0.3);
  99. }
  100. </style>
  101. @endpush