Skip to content

Commit

Permalink
Merge branch 'private327-pro-terms'
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Dec 2, 2024
2 parents 5232f38 + 8df7b67 commit e2b21c3
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/views/alaveteli_pro/pages/_legal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
Usage
</h2>

<p>
Commercial and for-profit use of WhatDoTheyKnow requires a
<%= link_to 'WhatDoTheyKnow Pro', account_request_index_path %>
subscription.
</p>

<p>
We reserve the right to block, without warning, usage which violates any
of our <a href="<%= help_house_rules_path %>">House Rules</a>.
Expand Down
3 changes: 2 additions & 1 deletion lib/views/help/house_rules.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<a href="https://ico.org.uk/for-organisations/guidance-index/freedom-of-information-and-environmental-information-regulations/dealing-with-vexatious-requests-section-14/" title="Guidance from the Information Commissioner on vexatious requests">
guidance on this type of request</a>.</li>
<li>Don't use WhatDoTheyKnow to ask for other people's personal information. Don't include this type of information in requests, comments or follow-ups, unless it's fair to do so.</li>
<li>Don't try to get around the actions of site administrators. For example, don't make new accounts to avoid a ban or limits on how many requests you can make. Don't repost things you know moderators have removed.</li>
<li>Don't try to get around the site limits or actions of site administrators. For example, don't make new accounts to avoid a ban or limits on how many requests you can make. Don't repost things you know moderators have removed.</li>
<li>Commercial and for-profit use requires a <%= link_to 'WhatDoTheyKnow Pro', account_request_index_path %> subscription.</li>
</ul>

<p>If you break these rules, you could be banned from the site. We may also remove your requests or annotations. We'll usually contact you first to give advice on how to use the service better.</p>
Expand Down
78 changes: 78 additions & 0 deletions lib/views/user/_signup.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<div id="signup" class="signup">
<%= form_tag signup_path, id: 'signup_form' do %>
<%= foi_error_messages_for :user_signup %>

<p>
<label class="form_label" for="user_signup_name">
<%= _('Your name:') %>
</label>

<%= text_field 'user_signup', 'name', size: 20, tabindex: 10, autocomplete: 'off' %>
</p>

<div class="form_item_note">
<%= _('Your <strong>name will appear publicly</strong> ' \
'(<a href="{{why_url}}">why?</a>) on this website and in search ' \
'engines. <a href="{{help_url}}">Thinking of using a ' \
'pseudonym?</a>',
why_url: help_privacy_path(anchor: 'public_request').html_safe,
help_url: help_privacy_path(anchor: 'real_name').html_safe) %>
</div>

<p>
<label class="form_label" for="user_signup_email">
<%= _('Your e-mail:') %>
</label>

<%= text_field 'user_signup', 'email', size: 20, tabindex: 20 %>
</p>

<div class="form_item_note">
<%= _('We will not reveal your email address to anybody unless ' \
'<a href="{{url}}">you or the law tell us to</a>.',
url: help_privacy_path) %>
</div>

<p>
<label class="form_label" for="user_signup_password">
<%= _('Password:') %>
</label>

<%= password_field 'user_signup', 'password', size: 15, tabindex: 30, autocomplete: 'off' %>
</p>

<div class="form_item_note">
<%= _('12 characters minimum. 72 characters maximum.') %>
</div>

<p>
<label class="form_label" for="user_signup_password_confirmation">
<%= _('Confirm password:') %>
</label>

<%= password_field 'user_signup', 'password_confirmation', size: 15, tabindex: 40, autocomplete: 'off' %>
</p>

<% if @request_from_foreign_country %>
<%= recaptcha_tags %>
<% end %>

<div class="form_button">
<%= hidden_field_tag 'token', params[:token], id: 'signup_token' %>
<%= hidden_field_tag :modal, params[:modal], id: 'signup_modal' %>

<%= submit_tag _('Sign up'),
tabindex: 50,
data: { disable_with: _('Sending...') } %>
</div>

<div class="form_item_note">
<%= _('By signing up you agree to our ' \
'<a href="{{house_rules_url}}">house rules</a>. Commercial and ' \
'for-profit use requires a ' \
'<a href="{{pro_url}}">WhatDoTheyKnow Pro</a> subscription.',
house_rules_url: help_house_rules_path,
pro_url: account_request_index_path) %>
</div>
<% end %>
</div>
50 changes: 50 additions & 0 deletions lib/views/user/rate_limited.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<% @title = _('Too many requests') %>

<h1><%= @title %></h1>

<p>
<%= _('You have hit the rate limit on new requests. Users are ordinarily ' \
'limited to {{max_requests_per_user_per_day}} requests in any ' \
'rolling 24-hour period. You will be able to make another request ' \
'in {{can_make_another_request}}.',
max_requests_per_user_per_day: AlaveteliConfiguration.max_requests_per_user_per_day,
can_make_another_request: distance_of_time_in_words(Time.zone.now, @next_request_permitted_at)) %>
</p>

<p>
<%= _('There is a limit on the number of requests you can make in a day, ' \
'because we don’t want public authorities to be bombarded with ' \
'large numbers of inappropriate requests. If you feel you have a ' \
'good reason to ask for the limit to be lifted in your case, ' \
'please <a href="{{help_contact_path}}">get in touch</a>.',
help_contact_path: help_contact_path) %>
</p>

<% if feature_enabled?(:alaveteli_pro) %>
<p>
<%= _('<strong>Journalist, Campaigner or Researcher?</strong> ' \
'{{pro_site_link}} is an all-in-one FOI toolkit including ' \
'everything you need to keep on top of complex FOI-driven ' \
'investigations.',
pro_site_link: link_to(pro_site_name, account_request_index_path)) %>
</p>

<p>
<%= _('Commercial and for-profit use requires a ' \
'{{pro_site_link}} subscription.',
pro_site_link: link_to(pro_site_name, account_request_index_path)) %>
</p>
<% end %>

<% if @info_request %>
<p>
<%= _('Here is the message you wrote, in case you would like to copy ' \
'the text and save it for later.') %>
</p>

<div class="correspondence box">
<div class="correspondence_text">
<%= @info_request.outgoing_messages[0].get_body_for_html_display %>
</div>
</div>
<% end %>

0 comments on commit e2b21c3

Please sign in to comment.