mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-17 00:32:53 +00:00
Moving to github
This commit is contained in:
4
app/views/password_resets/create.html.erb
Normal file
4
app/views/password_resets/create.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<h1 class="font-bold text-4xl">PasswordResets#create</h1>
|
||||
<p>Find me in app/views/password_resets/create.html.erb</p>
|
||||
</div>
|
||||
34
app/views/password_resets/edit.html.erb
Normal file
34
app/views/password_resets/edit.html.erb
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="max-w-md mx-auto">
|
||||
<h1 class="text-3xl font-bold mb-6">Reset Your Password</h1>
|
||||
|
||||
<p class="text-gray-600 mb-6">
|
||||
Enter your new password below.
|
||||
</p>
|
||||
|
||||
<%= form_with model: @user, url: password_reset_path(params[:id]), method: :patch, class: "space-y-4" do |f| %>
|
||||
<% if @user.errors.any? %>
|
||||
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded">
|
||||
<ul>
|
||||
<% @user.errors.full_messages.each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<%= f.label :password, "New Password", class: "block text-sm font-medium text-gray-700" %>
|
||||
<%= f.password_field :password, autofocus: true, required: true, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500" %>
|
||||
<p class="mt-1 text-sm text-gray-500">At least 8 characters</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.label :password_confirmation, "Confirm New Password", class: "block text-sm font-medium text-gray-700" %>
|
||||
<%= f.password_field :password_confirmation, required: true, class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500" %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.submit "Reset Password", class: "w-full px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
40
app/views/password_resets/new.html.erb
Normal file
40
app/views/password_resets/new.html.erb
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="max-w-md mx-auto">
|
||||
<h1 class="text-3xl font-bold mb-6">Forgot Your Password?</h1>
|
||||
|
||||
<p class="text-gray-600 mb-6">
|
||||
Enter your email address and we'll send you instructions to reset your password.
|
||||
</p>
|
||||
|
||||
<%= form_with url: password_resets_path, method: :post, class: "space-y-4" do |f| %>
|
||||
<div>
|
||||
<%= f.label :email, class: "block text-sm font-medium text-gray-700" %>
|
||||
<%= f.email_field :email, autofocus: true, required: true, placeholder: "your@email.com", class: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500" %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.submit "Send Reset Instructions", class: "w-full px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="mt-6 text-center space-y-2">
|
||||
<%= link_to "← Back to Login", login_path, class: "text-indigo-600 hover:text-indigo-800" %>
|
||||
</div>
|
||||
|
||||
<% if Rails.env.development? %>
|
||||
<div class="mt-8 p-4 bg-blue-50 border-l-4 border-blue-400 rounded">
|
||||
<div class="flex">
|
||||
<div class="flex-shrink-0">
|
||||
<svg class="h-5 w-5 text-blue-400" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<p class="text-sm text-blue-700">
|
||||
<strong>Development Mode:</strong> Password reset emails are being captured by Mailpit.
|
||||
View them at <a href="http://localhost:8025" target="_blank" class="underline font-semibold">localhost:8025</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
4
app/views/password_resets/update.html.erb
Normal file
4
app/views/password_resets/update.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<h1 class="font-bold text-4xl">PasswordResets#update</h1>
|
||||
<p>Find me in app/views/password_resets/update.html.erb</p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user