Skip to content

Commit

Permalink
Move tips/sidebar to separate templates.
Browse files Browse the repository at this point in the history
Also apply to UK council cobrands.
Fixes #926, more food for #344.
  • Loading branch information
dracos committed Nov 19, 2014
1 parent a5bef35 commit a8f45b9
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 68 deletions.
6 changes: 3 additions & 3 deletions templates/web/base/report/new/fill_in_details_form.html
Expand Up @@ -2,10 +2,10 @@ <h1>[% loc('Report your problem') %]</h1>

[% IF report.used_map %]
<p class="change_location">[% loc('Wrong location? Just click again on the map.') %]</p>
[% END %]

[% IF partial_token %]
<p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
[% END %]
[% IF partial_token %]
<p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
[% END %]

[% IF js %]
Expand Down
5 changes: 1 addition & 4 deletions templates/web/base/report/new/fill_in_details_text.html
@@ -1,9 +1,6 @@
[%
IF area_ids_to_list.size != 0;
loc('Please fill in details of the problem below. The council won\'t be able
to help unless you leave as much detail as you can, so please describe the exact location of
the problem (e.g. on a wall), what it is, how long it has been there, a description (and a
photo of the problem if you have one), etc.');
loc('The council won&rsquo;t be able to help unless you leave as much detail as you can. Please describe the exact location of the problem (e.g. on a wall), what it is, how long it has been there, a description (and a photo of the problem if you have one), etc.');
IF category_extras;
' ' _ loc('Some categories may require additional information.');
END;
Expand Down
10 changes: 0 additions & 10 deletions templates/web/eastsussex/report/new/fill_in_details_text.html

This file was deleted.

12 changes: 12 additions & 0 deletions templates/web/fixmystreet-uk-councils/report/new/inline-tips.html
@@ -0,0 +1,12 @@
<div class="description_tips">
<h4>Tips for successful reports:</h4>
<ul class="do">
<li>Be polite</li>
<li>Use exact locations</li>
<li>Say how long the issue’s been&nbsp;present</li>
</ul>
<ul class="dont">
<li>Don’t leave abusive or libellous&nbsp;messages</li>
<li>Don’t include private contact details in the&nbsp;description</li>
</ul>
</div>
Empty file.
12 changes: 12 additions & 0 deletions templates/web/fixmystreet.com/report/new/inline-tips.html
@@ -0,0 +1,12 @@
<div class="description_tips">
<h4>Tips for successful reports:</h4>
<ul class="do">
<li>Be polite</li>
<li>Use exact locations</li>
<li>Say how long the issue’s been&nbsp;present</li>
</ul>
<ul class="dont">
<li>Don’t leave abusive or libellous&nbsp;messages</li>
<li>Don’t include private contact details in the&nbsp;description</li>
</ul>
</div>
Empty file.
40 changes: 5 additions & 35 deletions templates/web/fixmystreet/report/new/fill_in_details_form.html
Expand Up @@ -17,30 +17,11 @@ <h1>[% loc('Report your problem') %]</h1>
[% PROCESS 'report/new/councils_text.html' %]
[% END %]

[% IF c.cobrand.moniker == "fixmystreet" && report.used_map && partial_token %]
[% IF report.used_map && partial_token %]
<p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
[% END %]

[% IF c.cobrand.moniker != "fixmystreet" && (c.cobrand.moniker != 'fixmybarangay' || ( c.user && c.user.from_body ) ) %]
<div id="report-a-problem-sidebar">
<div class="sidebar-tips">
[% IF report.used_map AND partial_token %]
<p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
[% END %]

<p>
[% IF report.used_map %]
[% INCLUDE 'report/new/fill_in_details_text.html' %]
[% ELSE %]
[% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %]
[% END %]
</p>
</div>
<div class="sidebar-notes">
[% INCLUDE 'report/new/notes.html' %]
</div>
</div>
[% END %]
[% TRY %][% PROCESS 'report/new/sidebar.html' %][% CATCH file %][% END %]

[% INCLUDE 'errors.html' %]

Expand All @@ -65,20 +46,7 @@ <h1>[% loc('Report your problem') %]</h1>
[% END %]
<textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Explain what’s wrong, exactly where it is, and how long it’s been there…') %]" required>[% report.detail | html %]</textarea>

[% IF c.cobrand.moniker == "fixmystreet" %]
<div class="description_tips">
<h4>Tips for successful reports:</h4>
<ul class="do">
<li>Be polite</li>
<li>Use exact locations</li>
<li>Say how long the issue’s been&nbsp;present</li>
</ul>
<ul class="dont">
<li>Don’t leave abusive or libellous&nbsp;messages</li>
<li>Don’t include private contact details in the&nbsp;description</li>
</ul>
</div>
[% END %]
[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %]

[% IF js %]
<div id="form_category_row">
Expand Down Expand Up @@ -121,6 +89,8 @@ <h4>Tips for successful reports:</h4>
<input type="file" name="photo" id="form_photo">
[% END %]

[% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %]

[% IF c.user_exists %]
[% PROCESS "report/new/form_user_loggedin.html" %]
[% ELSE %]
Expand Down
10 changes: 0 additions & 10 deletions templates/web/fixmystreet/report/new/fill_in_details_text.html

This file was deleted.

14 changes: 14 additions & 0 deletions templates/web/fixmystreet/report/new/sidebar.html
@@ -0,0 +1,14 @@
<div id="report-a-problem-sidebar">
<div class="sidebar-tips">
<p>
[% IF report.used_map %]
[% INCLUDE 'report/new/fill_in_details_text.html' %]
[% ELSE %]
[% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %]
[% END %]
</p>
</div>
<div class="sidebar-notes">
[% INCLUDE 'report/new/notes.html' %]
</div>
</div>
3 changes: 3 additions & 0 deletions templates/web/oxfordshire/report/new/after_photo.html
@@ -0,0 +1,3 @@
<p><small>Please be aware that you can only attach one picture so ensure that
you provide a picture that clearly shows the location not just the fault.
</small></p>

This file was deleted.

12 changes: 12 additions & 0 deletions templates/web/oxfordshire/report/new/inline-tips.html
@@ -0,0 +1,12 @@
<div class="description_tips">
<h4>Tips for successful reports:</h4>
<ul class="do">
<li>Be polite</li>
<li>Use exact locations (e.g. carriageway)</li>
<li>Say how long the issue’s been&nbsp;present</li>
</ul>
<ul class="dont">
<li>Don’t leave abusive or libellous&nbsp;messages</li>
<li>Don’t include private contact details in the&nbsp;description</li>
</ul>
</div>

0 comments on commit a8f45b9

Please sign in to comment.