| 1 | <% content_for :title, "Set a new password" %> |
| 2 | |
| 3 | <div class="min-h-screen bg-surface-900 flex flex-col items-center justify-center px-4 py-16"> |
| 4 | |
| 5 | <div class="mb-10 flex flex-col items-center gap-3"> |
| 6 | <%= link_to root_path, class: "flex items-center gap-3 text-gray-100 hover:text-brand-500 transition-colors" do %> |
| 7 | <img src="/icon.png" alt="siGit" class="h-9 w-auto"> |
| 8 | <span class="text-xl font-semibold tracking-tight">Code & Deploy</span> |
| 9 | <% end %> |
| 10 | <p class="text-sm text-gray-500">Choose a new password</p> |
| 11 | </div> |
| 12 | |
| 13 | <div class="w-full max-w-sm"> |
| 14 | <div class="border border-surface-500 rounded bg-surface-700 px-8 py-8"> |
| 15 | |
| 16 | <% if flash[:alert].present? %> |
| 17 | <div class="mb-5 flex items-start gap-2.5 rounded border border-red-800/40 bg-red-900/20 px-3.5 py-3 text-sm text-red-400" role="alert"> |
| 18 | <svg class="w-4 h-4 mt-0.5 shrink-0" viewBox="0 0 16 16" fill="currentColor"> |
| 19 | <path d="M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1zm0 3.75a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0v-3.5A.75.75 0 0 0 8 4.75zm0 7.5a.875.875 0 1 0 0-1.75.875.875 0 0 0 0 1.75z"/> |
| 20 | </svg> |
| 21 | <span><%= flash[:alert] %></span> |
| 22 | </div> |
| 23 | <% end %> |
| 24 | |
| 25 | <%= form_tag edit_password_path, method: :post, class: "space-y-5" do %> |
| 26 | <%= hidden_field_tag :reset_password_token, @reset_password_token %> |
| 27 | |
| 28 | <div> |
| 29 | <label for="password" class="form-label">New password</label> |
| 30 | <input type="password" id="password" name="password" |
| 31 | class="form-input" autocomplete="new-password" |
| 32 | minlength="8" placeholder="At least 8 characters" |
| 33 | autofocus required> |
| 34 | </div> |
| 35 | |
| 36 | <div> |
| 37 | <label for="password_confirmation" class="form-label">Confirm new password</label> |
| 38 | <input type="password" id="password_confirmation" name="password_confirmation" |
| 39 | class="form-input" autocomplete="new-password" |
| 40 | minlength="8" required> |
| 41 | </div> |
| 42 | |
| 43 | <button type="submit" class="btn-primary w-full justify-center py-2.5 mt-2"> |
| 44 | Set new password |
| 45 | </button> |
| 46 | |
| 47 | <% end %> |
| 48 | </div> |
| 49 | |
| 50 | <p class="mt-6 text-center text-xs text-gray-500"> |
| 51 | Back to |
| 52 | <%= link_to "Sign in", signin_path, class: "text-gray-400 hover:text-gray-200 underline underline-offset-2" %> |
| 53 | </p> |
| 54 | </div> |
| 55 | |
| 56 | </div> |