Skip to content

Commit

Permalink
ログイン、サインアップ画面のマークアップと機能の実装
Browse files Browse the repository at this point in the history
  • Loading branch information
yumayo14 committed Jan 23, 2018
1 parent d9e58b7 commit ea5d962
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/views/devise/confirmations/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<h2>Resend confirmation instructions</h2>

<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>

<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
</div>

<div class="actions">
<%= f.submit "Resend confirmation instructions" %>
</div>
<% end %>
<%= render "devise/shared/links" %>
37 changes: 37 additions & 0 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<div class="container">
<nav class="navbar navbar-expand-lg navbar-light bg-faded">
<div class="navbar-brand">
<a class="nav-link" data-method="get" href="/">e-Navigator</a>
</div>
</nav>
<h2>ユーザー登録</h2>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>

<div class="field">
<%= f.label :email, class: "user_email" %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control", id: "user_email" %>
</div>

<div class="field">
<%= f.label :password, class: "user_password", id: "user_password" %>
<% if @minimum_password_length %>
<em>(<%= @minimum_password_length %> characters minimum)</em>
<% end %><br />

<%= f.password_field :password, class: "form-control", id: "user_password", autocomplete: "off" %>
</div>

<div class="field">
<%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation, class: "form-control", id: "user_password_confirmation", autocomplete: "off" %>
</div>
<br>
<div class="actions">
<%= f.submit "登録", class: "btn btn-primary" %>
</div>
<% end %><br>
<%= render "devise/shared/links" %>
</div>

0 comments on commit ea5d962

Please sign in to comment.