mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-17 04:02:53 +00:00
Moving to github
This commit is contained in:
45
app/views/users/new.html.erb
Normal file
45
app/views/users/new.html.erb
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="max-w-md mx-auto">
|
||||
<h1 class="text-3xl font-bold mb-6">Sign Up</h1>
|
||||
|
||||
<%= form_with model: @user, url: users_path, 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 :username, class: "block text-sm font-medium text-gray-700" %>
|
||||
<%= f.text_field :username, 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" %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.label :email, class: "block text-sm font-medium text-gray-700" %>
|
||||
<%= f.email_field :email, 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.label :password, class: "block text-sm font-medium text-gray-700" %>
|
||||
<%= f.password_field :password, 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.label :password_confirmation, 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 "Sign Up", class: "w-full px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="mt-4 text-center">
|
||||
<p class="text-gray-600">
|
||||
Already have an account? <%= link_to "Login", login_path, class: "text-indigo-600 hover:text-indigo-800" %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user