% if flash[:notice] %>
<%= flash[:notice] %>
<% end %>
<% if flash[:alert] %>
<%= flash[:alert] %>
<% end %>
<% if @redirect_url %>
We need you to log in before we can show you the page that you are trying to
view.
<% end %>
<%= form_for @session, url: session_path do |f| %>
<%= f.label :email, 'Email Address' %>
<%= f.email_field :email, autofocus: true, required: true,
placeholder: 'your@email.com' %>
<%= f.label :password %>
<%= f.password_field :password %>
<%= f.button 'Log in', name: 'login', value: 'requested' %>
<%= f.button 'Reset Password', name: 'reset_password',
value: 'requested', formaction: reset_password_session_path %>
<% if @redirect_url %>
<%= hidden_field_tag :redirect_url, @redirect_url %>
<% end %>
<% end %>