Remove the "Remember" checkbox from the login page. Make session cookies permanent instead. Phase out legacy `user_name` and `password_hash` cookies. Previously a user's session cookies would be cleared whenever they closed their browser window, which would log them out of the site. To work around this, when the "Remember" box was checked on the login page (which it was by default), the user's name and password hash (!) would be stored in separate permanent cookies, which would be used to automatically log the user back in when their session cookies were cleared. We can avoid all of this just by making the session cookies themselves permanent.
35 lines
900 B
Plaintext
35 lines
900 B
Plaintext
<div id="c-sessions">
|
|
<div id="a-new">
|
|
<section>
|
|
<h1>Sign in</h1>
|
|
<%= form_tag(session_path, :class => "simple_form") do %>
|
|
<%= hidden_field_tag "url", params[:url] %>
|
|
|
|
<div class="input">
|
|
<label for="name">Name</label>
|
|
<%= text_field_tag :name %>
|
|
</div>
|
|
|
|
<div class="input">
|
|
<label for="password">Password</label>
|
|
<%= password_field_tag :password %>
|
|
</div>
|
|
|
|
<p class="fineprint">
|
|
New to <%= Danbooru.config.app_name %>? <%= link_to "Create a new account", new_user_path %>.
|
|
</p>
|
|
|
|
<div class="input">
|
|
<%= submit_tag "Submit", :data => { :disable_with => "Signing in..." } %>
|
|
</div>
|
|
<% end %>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<% content_for(:page_title) do %>
|
|
Sign in - <%= Danbooru.config.app_name %>
|
|
<% end %>
|
|
|
|
<%= render "secondary_links" %>
|