forked from fixin.me/fixin.me
Add registration form
This commit is contained in:
@@ -1,29 +1,12 @@
|
||||
<h2>Sign up</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= tabular_form_for resource, url: user_registration_path do |f| %>
|
||||
<%= render "users/shared/error_messages", resource: resource %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||
</div>
|
||||
<%= f.email_field :email, required: true, size: 30, autofocus: true, autocomplete: "email" %>
|
||||
<%= f.password_field :password, required: true, size: 30, minlength: @minimum_password_length,
|
||||
autocomplete: "new-password",
|
||||
hint: ("(#{@minimum_password_length} characters minimum)" if @minimum_password_length) %>
|
||||
<%= f.password_field :password_confirmation, label: t('.password_confirmation'),
|
||||
required: true, size: 30, autocomplete: "new-password" %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password %>
|
||||
<% if @minimum_password_length %>
|
||||
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
||||
<% end %><br />
|
||||
<%= f.password_field :password, autocomplete: "new-password" %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Sign up" %>
|
||||
</div>
|
||||
<%= f.submit t(:register) %>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%= tabular_form_for resource, as: resource_name, url: session_path(resource_name) do |f| %>
|
||||
<%= f.email_field :email, required: true, size: 32, autofocus: true, autocomplete: "email" %>
|
||||
<%= f.password_field :password, required: true, size: 32, autocomplete: "current-password" %>
|
||||
<%= tabular_form_for resource, url: user_session_path do |f| %>
|
||||
<%= f.email_field :email, required: true, size: 30, autofocus: true, autocomplete: "email" %>
|
||||
<%= f.password_field :password, required: true, size: 30, autocomplete: "current-password" %>
|
||||
|
||||
<% if devise_mapping.rememberable? %>
|
||||
<%= f.check_box :remember_me, label: t('.remember_me') %>
|
||||
@@ -8,5 +8,3 @@
|
||||
|
||||
<%= f.submit t(:sign_in) %>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Log in", new_session_path(resource_name) %><br />
|
||||
<% end %>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user