Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: contact validation #181

Merged
merged 1 commit into from
Dec 6, 2021
Merged
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
89 changes: 37 additions & 52 deletions templates/web/popravitodev/contact/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,66 +56,51 @@ <h2 class="page-subtitle">Pošalji poruku našem timu</h2>
<input type="hidden" name="token" value="[% csrf_token %]" />
<input type="hidden" name="s" value="[% s %]" />
<fieldset>
[% INCLUDE 'errors.html' %]
<!--
[% IF update %]
[% INCLUDE 'errors.html' %] [% IF update %]

<p>
[% loc('You are reporting the following update for being abusive, containing personal information, or similar:') %]
</p>

<blockquote>
<cite>
[% IF update.anonymous %]
[% tprintf( loc('Update below added anonymously at %s'), prettify_dt( update.confirmed ) ) %]
[% ELSE %]
[% tprintf( loc('Update below added by %s at %s'), update.name, prettify_dt( update.confirmed ) ) | html %]
[% END %]
</cite>

<p>
[%~ update.text | html ~%]
</p>

</blockquote>
<input type="hidden" name="update_id" value="[% update.id %]">
<input type="hidden" name="id" value="[% update.problem_id %]">

[% ELSIF problem %]
[% IF moderation_complaint %]
<input type="hidden" name="m" value="[% moderation_complaint %]">
<p>[% loc('You are complaining that this problem report was unnecessarily moderated:') %]</p>
[% ELSIF rejecting_report %]
[% INCLUDE 'contact/rejecting-text.html' %]
[% ELSE %]
[% INCLUDE 'contact/unsuitable-text.html' %]
[% END %]

<blockquote>
<h2>[% problem.title_safe | html %]</h2>
<p>
[% loc('You are reporting the following update for being abusive,
containing personal information, or similar:') %]
</p>

<cite>
[% IF problem.anonymous %]
[% tprintf( loc('Reported anonymously at %s'), prettify_dt( problem.confirmed ) ) %]
[% ELSE %]
[% tprintf( loc('Reported by %s at %s'), problem.name, prettify_dt( problem.confirmed ) ) | html %]
[% END %]
</cite>
<blockquote>
<cite>
[% IF update.anonymous %] [% tprintf( loc('Update below added
anonymously at %s'), prettify_dt( update.confirmed ) ) %] [% ELSE %]
[% tprintf( loc('Update below added by %s at %s'), update.name,
prettify_dt( update.confirmed ) ) | html %] [% END %]
</cite>

<p>
[%~ problem.detail | html ~%]
</p>
<p>[%~ update.text | html ~%]</p>
</blockquote>
<input type="hidden" name="update_id" value="[% update.id %]" />
<input type="hidden" name="id" value="[% update.problem_id %]" />

</blockquote>
<input type="hidden" name="id" value="[% problem.id %]">
[% ELSIF problem %] [% IF moderation_complaint %]
<input type="hidden" name="m" value="[% moderation_complaint %]" />
<p>
[% loc('You are complaining that this problem report was unnecessarily
moderated:') %]
</p>
[% ELSIF rejecting_report %] [% INCLUDE 'contact/rejecting-text.html' %]
[% ELSE %] [% INCLUDE 'contact/unsuitable-text.html' %] [% END %]

[% ELSE %]
<blockquote>
<h2>[% problem.title_safe | html %]</h2>

[% INCLUDE 'contact/blurb.html' %]
<cite>
[% IF problem.anonymous %] [% tprintf( loc('Reported anonymously at
%s'), prettify_dt( problem.confirmed ) ) %] [% ELSE %] [% tprintf(
loc('Reported by %s at %s'), problem.name, prettify_dt(
problem.confirmed ) ) | html %] [% END %]
</cite>

[% END %] -->
<p>[%~ problem.detail | html ~%]</p>
</blockquote>
<input type="hidden" name="id" value="[% problem.id %]" />

[% INCLUDE 'contact/who.html' %]
[% ELSE %] [% INCLUDE 'contact/blurb.html' %] [% END %] [% INCLUDE
'contact/who.html' %]

<input
type="radio"
Expand Down