fixes #1241
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
class StaticController < ApplicationController
|
||||
def terms_of_service
|
||||
end
|
||||
|
||||
def accept_terms_of_service
|
||||
cookies.permanent[:accepted_tos] = "1"
|
||||
redirect_to(params[:url] || posts_path)
|
||||
end
|
||||
|
||||
def error
|
||||
end
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<%= render "users/upgrade_notice" %>
|
||||
<% end %>
|
||||
|
||||
<% if !CurrentUser.is_privileged? && CurrentUser.user.created_at > 2.weeks.ago %>
|
||||
<% if cookies["accepted_tos"].blank? && !CurrentUser.is_privileged? %>
|
||||
<%= render "users/tos" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
<p>Danbooru will not disclose the IP address, email address, password, or DMails of any user except to the staff.</p>
|
||||
<p>Danbooru is allowed to make public everything else, including but not limited to: uploaded posts, favorited posts, comments, forum posts, wiki edits, and note edits.</p>
|
||||
</div>
|
||||
|
||||
<%= form_tag(accept_terms_of_service_path) do %>
|
||||
<%= hidden_field_tag :url, params[:url] %>
|
||||
<%= submit_tag "I have read and agree to these rules" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="ui-corner-all ui-state-highlight" id="tos-notice">
|
||||
<h1><%= link_to "Read the rules before proceeding!", terms_of_service_path %></h1>
|
||||
<h1><%= link_to "Read the rules before proceeding!", terms_of_service_path(:url => request.fullpath) %></h1>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user