first-login.blade.php 9.1 KB

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