Skip to content

Commit

Permalink
Merge pull request #181 from barbaraperic/develop
Browse files Browse the repository at this point in the history
FIX: contact validation
  • Loading branch information
schlos committed Dec 6, 2021
2 parents 53efef9 + 0ea923e commit 45af5dd
Showing 1 changed file with 37 additions and 52 deletions.
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

0 comments on commit 45af5dd

Please sign in to comment.