Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
# Format html files with djlint
3698b97c143c773639dd0e75617cd8d8fb034131
# Format with prettier
43bc670f81530fa7f62d1e4f5c1b5f8c8edbb92a
43bc670f81530fa7f62d1e4f5c1b5f8c8edbb92a
# revert/bring back request flow
2bd30cb88398f0f2a02190d81ceeb129dbe0808c
9483cfdeb3e6b3a036b460c78d9da074f16a020a
26 changes: 11 additions & 15 deletions froide/foirequest/templates/foirequest/request.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,16 @@
<template data-slot="campaigns">
{% for campaign in campaigns %}
<div class="col-12 col-sm-6 col-md-4 mb-4">
<div class="card h-100">
<div class="card-body d-flex flex-column">
{% if campaign.logo %}
<img src="{{ campaign.logo.url }}"
alt=""
class="campaign-logo d-block object-fit-contain w-100 mb-3" />
{% endif %}
<h2 class="fs-4">{% blocktrans with name=campaign.name %}Participate in {{ name }}{% endblocktrans %}</h2>
{% if campaign.short_description %}<div class="fs-6">{{ campaign.short_description|markdown }}</div>{% endif %}
<div class="mt-auto">
<a href="{{ campaign.url }}" class="btn btn-primary w-100">{% trans "Make a request" %}</a>
</div>
<div class="d-flex flex-column border border-2 border-light h-100 p-3">
{% if campaign.logo %}
<img src="{{ campaign.logo.url }}"
alt=""
class="campaign-logo d-block object-fit-contain w-100 mb-3" />
{% endif %}
<h2 class="h5">{% blocktrans with name=campaign.name %}Participate in {{ name }}{% endblocktrans %}</h2>
{% if campaign.short_description %}<div class="fs-6">{{ campaign.short_description|markdown }}</div>{% endif %}
<div class="mt-auto">
<a href="{{ campaign.url }}" class="btn btn-outline-primary w-100">{% trans "Make a request" %}</a>
</div>
</div>
</div>
Expand All @@ -88,9 +86,7 @@ <h2>{% blocktrans %}Choose public body{% endblocktrans %}</h2>
{% include "foirequest/snippets/request_publicbody_search_hint.html" %}
</template>
<template data-slot="publicbody-help-text">
<p>
{% blocktrans %}Which public body do you want to request information at? Here you can search and filter all available public bodies.{% endblocktrans %}
</p>
{% include "foirequest/snippets/request_publicbody_helptext.html" %}
</template>
<template data-slot="publicbody-missing">
<h3 class="fs-6">{% trans "Can’t find a specific public body?" %}</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@ <h3 class="h6">{% blocktrans %}Important Notes:{% endblocktrans %}</h3>
{% blocktrans %}Keep it <strong>focused and concise</strong>.{% endblocktrans %}
</li>
<li>
{% blocktrans %}This site is <strong>public</strong>. Everything you type and any response will be published.{% endblocktrans %}
{% blocktrans %}Do <strong>not include or ask for</strong> personal information in your request.{% endblocktrans %}
</li>
<li>
{% blocktrans %}Do <strong>not include</strong> personal information in your request.{% endblocktrans %}
</li>
<li>
{% blocktrans %}Do <strong>not ask</strong> for personal information.{% endblocktrans %}
</li>
<li>{% blocktrans %}Please use proper spelling.{% endblocktrans %}</li>
<li>{% blocktrans %}Please stay polite.{% endblocktrans %}</li>
<li>{% blocktrans %}Please use proper spelling and stay polite.{% endblocktrans %}</li>
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% load i18n %}
<p>
{% blocktrans %}Which public body do you want to request information at? Here you can search and filter all available public bodies.{% endblocktrans %}
</p>
26 changes: 12 additions & 14 deletions froide/foirequest/views/make_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ class MakeRequestView(FormView):
form_class = RequestForm
template_name = "foirequest/request.html"
FORM_CONFIG_PARAMS = (
"hide_similar",
"hide_public",
"hide_draft",
"hide_publicbody",
"hide_full_text",
"hide_editing",
"hide_similar", # hide similar request search
"hide_public", # hide option to make request non-public
"hide_draft", # hide button to save request as draft
"hide_publicbody", # hide option to change public body. use on public-body specific request url
"hide_full_text", # hide option to edit the request boilerplate text
"hide_editing", # hide step to write request text. use together with body param
)

draft = None
Expand Down Expand Up @@ -404,13 +404,9 @@ def get_js_context(self):
"notSentToPb": _("(not sent to public body)"),
"terms": _("Terms of Use"),
"searchToPbName": _("to %(name)s") % {"name": "${name}"},
"searchToProject": _(
'to <a href="%(url)s">%(name)s</a> and <a href="%(urlp)s">%(count)s other public bodies</a>'
)
"searchToProject": _("to %(name)s and %(count)s other public bodies")
% {
"name": "${name}",
"url": "${url}",
"urlp": "${urlp}",
"count": "${count}",
},
"notYetSet": _("Not yet set"),
Expand All @@ -419,10 +415,12 @@ def get_js_context(self):
"dateRangeFrom": _("From"),
"dateRangeTo": _("Until"),
"campaign": _("Campaign"),
"noCampaign": _("No campaign"),
"toggleCollapse": _("Toggle collapse"),
"searchText": pgettext("Search input", "Text"),
"login": pgettext("Make request", "Log in"),
"searchRequests": _("Search requests"),
"showEntireMessage": _("Show entire message"),
},
"regex": {
"greetings": [_("Dear Sir or Madam")],
Expand Down Expand Up @@ -792,9 +790,9 @@ def get_context_data(self, **kwargs):
if self.request.GET.get("single") is not None:
is_multi = False

# skip "i confirm" nag heuristically for all who can multi-request
# TODO: find better heuristic for "trusted users"?
confirm_required = not is_multi
# skip "i confirm this is a foi request" for users who can multi-request
# or if editing is hidden (less friction for pre-written requests)
confirm_required = not (config.get("hide_editing") or is_multi)

campaigns = Campaign.objects.get_active()

Expand Down
Loading