Authentication/Static
Please enter a new password to update and secure your account.
<div class="h-screen min-h-[600px] flex flex-col items-center justify-center bg-cover bg-center px-4" style="background-image: url('<%= asset_url('railsui/fusion.png') %>')">
<div class="sm:flex-1 flex flex-col justify-center sm:w-[428px] w-full">
<div>
<div class="flex justify-center">
<a href="/" class="size-12 flex justify-center">
<%= icon Railsui.config.theme, custom_path: "/themes/#{Railsui.config.theme}/logo.svg", class: "w-10 h-auto fill-current text-primary-600 hover:text-primary-700 duration-300 transition ease-in-out dark:hover:text-primary-500", variant: :solid %>
<span class="sr-only">Fleet Management</span>
</a>
</div>
<div class="mt-6">
<div class="text-center">
<h1 class="md:h3 h4 my-3">Change your password</h1>
<p class="mb-6 text-slate-700 dark:text-slate-200 max-w-sm mx-auto">Please enter a new password to update and secure your account.</p>
</div>
</div>
<div class="bg-white dark:bg-slate-900/50 dark:border-slate-700/80 shadow-xs rounded-lg p-8 border border-slate-300/60">
<form action="#">
<input autocomplete="off" type="hidden" value="x" name="user[reset_password_token]" id="user_reset_password_token">
<div class="form-group">
<label class="form-label" for="user_password">New password</label>
<div class="relative">
<input autofocus="autofocus" autocomplete="new-password" class="form-input focus:pl-10 peer transition" type="password" name="user[password]" id="user_password">
<%= icon "lock-closed", class: "size-5 absolute translate-x-0 top-3 text-slate-300 peer-focus:text-primary-500/80 opacity-0 transition transform peer-focus:opacity-100 peer-focus:translate-x-3 dark:peer-focus:text-primary-400" %>
</div>
<p class="mt-1 text-xs text-slate-600 dark:text-slate-400">6 characters minimum</p>
</div>
<div class="form-group">
<label class="form-label" for="user_password_confirmation">Confirm new password</label>
<div class="relative">
<input autocomplete="new-password" class="form-input focus:pl-10 peer transition" type="password" name="user[password_confirmation]" id="user_password_confirmation">
<%= icon "lock-closed", class: "size-5 absolute translate-x-0 top-3 text-slate-300 peer-focus:text-primary-500/80 opacity-0 transition transform peer-focus:opacity-100 peer-focus:translate-x-3 dark:peer-focus:text-primary-400" %>
</div>
</div>
<input type="submit" name="commit" value="Change password" class="btn btn-primary hover:cursor-pointer w-full">
</form>
</div>
<div class="mt-4">
<div class="text-center mb-1">
<a class="text-sm text-slate-600 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-500" href="/users/confirmation/new">Didn't receive confirmation instructions?</a>
</div>
<div class="text-center mb-2">
<a class="text-sm text-slate-600 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-500" href="/users/unlock/new">Didn't receive unlock instructions?</a>
</div>
</div>
</div>
</div>
</div>
<!-- app/views/users/passwords/edit.html.erb -->
<%= render "users/auth_layout" do %>
<%= form_with(model: @user, method: :put) do |f| %>
<%= f.hidden_field :reset_password_token %>
<div class="form-group">
<%= f.label :password, "New password", class: "form-label" %>
<div class="relative">
<%= f.password_field :password, autofocus: true, autocomplete: "new-password", class: "form-input focus:pl-10 peer transition" %>
<%= icon "lock-closed", class: "size-5 absolute translate-x-0 top-3 text-slate-300 peer-focus:text-primary-500/80 opacity-0 transition transform peer-focus:opacity-100 peer-focus:translate-x-3 dark:peer-focus:text-primary-400" %>
</div>
<% if @minimum_password_length %>
<p class="mt-1 text-sm text-slate-600 dark:text-slate-400"><%= @minimum_password_length %> characters minimum</p>
<% end %>
</div>
<div class="form-group">
<%= f.label :password_confirmation, "Confirm new password", class: "form-label" %>
<div class="relative">
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-input focus:pl-10 peer transition" %>
<%= icon "lock-closed", class: "size-5 absolute translate-x-0 top-3 text-slate-300 peer-focus:text-primary-500/80 opacity-0 transition transform peer-focus:opacity-100 peer-focus:translate-x-3 dark:peer-focus:text-primary-400" %>
</div>
</div>
<%= f.submit "Change password", class: "btn btn-primary hover:cursor-pointer w-full" %>
<% end %>
<% end %>
<% content_for :masthead do %>
<div class="text-center">
<h1 class="md:h3 h4 my-3">Change your password</h1>
<p class="mb-6 text-slate-700 dark:text-slate-200 max-w-sm mx-auto">Please enter a new password to update and secure your account.</p>
</div>
<%= render "rui/shared/error_messages", resource: @user %>
<% end %>
<% content_for :links do %>
<div class="text-center mb-1">
<a class="text-sm text-slate-600 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-500" href="/users/confirmation/new">Didn't receive confirmation instructions?</a>
</div>
<div class="text-center mb-2">
<a class="text-sm text-slate-600 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-500" href="/users/unlock/new">Didn't receive unlock instructions?</a>
</div>
<% end %>
/ app/views/users/passwords/edit.html.erb
= render "users/auth_layout" do
= form_with(model: @user, method: :put) do |f|
= f.hidden_field :reset_password_token
.form-group
= f.label :password, "New password", class: "form-label"
.relative
= f.password_field :password, autofocus: true, autocomplete: "new-password", class: "form-input focus:pl-10 peer transition"
= icon "lock-closed", class: "size-5 absolute translate-x-0 top-3 text-slate-300 peer-focus:text-primary-500/80 opacity-0 transition transform peer-focus:opacity-100 peer-focus:translate-x-3 dark:peer-focus:text-primary-400"
- if @minimum_password_length
%p.mt-1.text-sm.text-slate-600.dark:text-slate-400
= @minimum_password_length
characters minimum
.form-group
= f.label :password_confirmation, "Confirm new password", class: "form-label"
.relative
= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-input focus:pl-10 peer transition"
= icon "lock-closed", class: "size-5 absolute translate-x-0 top-3 text-slate-300 peer-focus:text-primary-500/80 opacity-0 transition transform peer-focus:opacity-100 peer-focus:translate-x-3 dark:peer-focus:text-primary-400"
= f.submit "Change password", class: "btn btn-primary hover:cursor-pointer w-full"
- content_for :masthead do
.text-center
%h1.md:h3.h4.my-3 Change your password
%p.mb-6.text-slate-700.dark:text-slate-200.max-w-sm.mx-auto Please enter a new password to update and secure your account.
= render "rui/shared/error_messages", resource: @user
- content_for :links do
.text-center.mb-1
%a.text-sm.text-slate-600.hover:text-slate-800.dark:text-slate-400.dark:hover:text-slate-500{href: "/users/confirmation/new"} Didn't receive confirmation instructions?
.text-center.mb-2
%a.text-sm.text-slate-600.hover:text-slate-800.dark:text-slate-400.dark:hover:text-slate-500{href: "/users/unlock/new"} Didn't receive unlock instructions?