diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-29 16:45:01 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-29 16:45:01 -0400 |
commit | a3392e334f15dd852f550411394c27b3327db1e9 (patch) | |
tree | 46b67d2c5fd004d81b936e4d6a68f80f9cc8ff32 /app/views/sessions/new.html.erb | |
parent | 42d6e3b1cc05ef5172081682b53675e4827254d3 (diff) | |
parent | d2da4866962e69fda4f3078afd19dbaf3d245882 (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Conflicts:
app/models/match.rb
lib/scoring/winner_takes_all.rb
Diffstat (limited to 'app/views/sessions/new.html.erb')
-rw-r--r-- | app/views/sessions/new.html.erb | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index ff27762..97f09b6 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,23 +1,26 @@ <h1>Sign in</h1> -<% if @user.nil? %> - <p class="errors"> The email/username or password is incorrect. Verify that CAPS LOCK is not on, and then retype the current email/username and password. </p> -<% end %> - <div class="span6 offset3"> - <%= form_for(:session, url: sessions_path) do |f| %> - <p> - <%= f.label(:username_or_email, "Username/Email") %><br/> - <%= f.text_field :username_or_email%> - </p> - <p> - <%= f.label :password %><br/> - <%= f.password_field :password %> - </p> - <p> - <%= f.submit "Log in", class: "signin" %> - </p> - <% end %> - - <p>New user? <%= link_to("Sign up now!", new_user_path) %></p> - </div> +<div> + <%= form_tag(sessions_path, method: :post, id: :new_session) do %> + <% if params[:action] == "create" %> + <div id="error_explanation"> + <p>The username/password pair you entered did + not match our records. Check your typing and + try again.</p> + </div> + <% end %> + <p> + <%= label_tag(:username_or_email, "Username/Email") %><br/> + <%= text_field_tag(:username_or_email) %> + </p> + <p> + <%= label_tag(:password) %><br/> + <%= password_field_tag(:password) %> + </p> + <p> + <%= submit_tag("Log in", class: :signin) %> + </p> + <% end %> + <p>New user? <%= link_to("Sign up now!", new_user_path) %></p> +</div> |