first-login.blade.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <!DOCTYPE html>
  2. <html lang="it">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Primo Accesso - Leezard.cloud</title>
  7. <!-- Bootstrap CSS -->
  8. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
  9. <!-- Font Awesome -->
  10. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
  11. <link rel="stylesheet" href="/css/style.css">
  12. <link rel="stylesheet" href="/css/new_style.css">
  13. <style>
  14. body {
  15. /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  16. min-height: 100vh;
  17. /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
  18. }
  19. .first-login-container {
  20. padding: 2rem 0;
  21. min-height: 100vh;
  22. display: flex;
  23. align-items: center;
  24. }
  25. .card {
  26. box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  27. border: none;
  28. border-radius: 15px;
  29. overflow: hidden;
  30. }
  31. .card-header {
  32. background: linear-gradient(135deg, var(--color-blu) 0%, var(--color-blu) 100%);
  33. color: white;
  34. border: none;
  35. padding: 2rem;
  36. text-align: center;
  37. }
  38. .card-header h3 {
  39. margin: 0;
  40. font-weight: 300;
  41. }
  42. .text-primary {
  43. color: var(--color-blu) !important;
  44. }
  45. .btn-primary {
  46. background-color: var(--color-blu);
  47. border-color: var(--color-blu);
  48. padding: 12px 30px;
  49. font-weight: 600;
  50. }
  51. .btn-primary:hover {
  52. background-color: var(--color-blu);
  53. border-color: var(--color-blu);
  54. }
  55. .form-control:focus {
  56. border-color: var(--color-blu);
  57. box-shadow: 0 0 0 0.2rem rgba(12, 97, 151, 0.25);
  58. }
  59. .alert-warning {
  60. background-color: rgba(255, 193, 7, 0.1);
  61. border-color: #ffc107;
  62. color: #856404;
  63. }
  64. .section-header {
  65. border-bottom: 2px solid #f8f9fa;
  66. padding-bottom: 0.5rem;
  67. margin-bottom: 1.5rem;
  68. }
  69. .logout-link {
  70. position: absolute;
  71. top: 20px;
  72. right: 20px;
  73. /* color: white; */
  74. text-decoration: none;
  75. /* background: rgba(255,255,255,0.2); */
  76. /* padding: 8px 15px; */
  77. /* border-radius: 5px; */
  78. /* transition: background 0.3s; */
  79. }
  80. /* .logout-link:hover { */
  81. /* background: rgba(255,255,255,0.3); */
  82. /* color: white; */
  83. /* text-decoration: none; */
  84. /* } */
  85. </style>
  86. </head>
  87. <body>
  88. <a href="/logout" class="logout-link btn btn-primary">
  89. <i class="fas fa-sign-out-alt"></i> Esci
  90. </a>
  91. <div class="login--box d-flex flex-column min-vh-100 justify-content-center align-items-center">
  92. <div class="card--ui mt-5" style="max-width: 600px; width: 100%">
  93. <img src="{{env('LOGO', '')}}" alt="" class="img-fluid" id="login--logo" style="max-width:340px; width: 100%; margin: auto; display: block; margin-bottom: 30px;">
  94. <h4 class="form--title text-center mb-3">Completa il tuo Profilo</h4>
  95. <p class="text-center mb-4">Primo accesso - Configurazione obbligatoria</p>
  96. {{-- Welcome Message --}}
  97. <div class="alert alert-warning mb-4">
  98. <h6><i class="fas fa-exclamation-triangle"></i> <strong>Primo Accesso</strong></h6>
  99. <p class="mb-2">Per motivi di sicurezza, devi <strong>impostare una nuova password</strong> prima di accedere alla piattaforma.</p>
  100. <p class="mb-0">I tuoi dati sono già stati configurati dall'amministratore.</p>
  101. </div>
  102. {{-- Success/Error Messages --}}
  103. @if (session('success'))
  104. <div class="alert alert-success alert-dismissible fade show" role="alert">
  105. <i class="fas fa-check-circle"></i> {{ session('success') }}
  106. <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
  107. </div>
  108. @endif
  109. <form method="POST" action="{{ route('first-login.complete') }}">
  110. @csrf
  111. {{-- <div class="section-header">
  112. <h6 class="text-primary mb-0">
  113. <i class="fas fa-lock"></i> Imposta la Tua Password
  114. </h6>
  115. </div> --}}
  116. {{-- <div class="alert alert-info mb-3">
  117. <i class="fas fa-info-circle"></i>
  118. <strong>Cambia Password:</strong> Sostituisci la password temporanea con una tua password sicura.
  119. </div> --}}
  120. <div class="row mb-4">
  121. <div class="col-md-6">
  122. <div class="form--item input-group">
  123. <label for="password">Nuova Password <span class="text-danger">*</span></label>
  124. <input type="password" class="form-control @error('password') is-invalid @enderror" id="password" name="password" placeholder="Inserisci una password sicura" required>
  125. <span class="input-group-text" id="basic-addon2"><i class="ico--ui lock"></i></span>
  126. </div>
  127. <small class="form-text text-muted">
  128. <i class="fas fa-key"></i> Minimo 6 caratteri
  129. </small>
  130. @error('password')
  131. <div class="invalid-feedback">{{ $message }}</div>
  132. @enderror
  133. </div>
  134. <div class="col-md-6">
  135. <div class="form--item input-group">
  136. <label for="password_confirmation">Conferma password <span class="text-danger">*</span></label>
  137. <input type="password" class="form-control @error('password_confirmation') is-invalid @enderror" id="password_confirmation" name="password_confirmation" placeholder="Ripeti la password" required>
  138. <span class="input-group-text" id="basic-addon2"><i class="ico--ui lock"></i></span>
  139. </div>
  140. @error('password_confirmation')
  141. <div class="invalid-feedback">{{ $message }}</div>
  142. @enderror
  143. </div>
  144. </div>
  145. {{-- Action Buttons --}}
  146. <div class="d-grid gap-2 d-md-block text-center">
  147. <button type="submit" class="btn btn-primary">
  148. {{-- <i class="fas fa-key"></i> --}}
  149. Imposta password e accedi
  150. </button>
  151. </div>
  152. <div class="text-center mt-3">
  153. <small class="text-muted">
  154. <i class="fas fa-shield-alt"></i>
  155. Dopo aver impostato la password, riceverai un'email di conferma dell'attivazione.
  156. </small>
  157. </div>
  158. </form>
  159. </div>
  160. </div>
  161. <!-- Bootstrap JS -->
  162. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
  163. <script>
  164. // Password strength indicator
  165. document.getElementById('password').addEventListener('input', function() {
  166. const password = this.value;
  167. const strength = document.getElementById('password-strength');
  168. if (password.length >= 8) {
  169. this.classList.remove('is-invalid');
  170. this.classList.add('is-valid');
  171. } else {
  172. this.classList.remove('is-valid');
  173. }
  174. });
  175. // Password confirmation check
  176. document.getElementById('password_confirmation').addEventListener('input', function() {
  177. const password = document.getElementById('password').value;
  178. const confirmation = this.value;
  179. if (password === confirmation && confirmation.length >= 8) {
  180. this.classList.remove('is-invalid');
  181. this.classList.add('is-valid');
  182. } else {
  183. this.classList.remove('is-valid');
  184. }
  185. });
  186. </script>
  187. </body>
  188. </html>