aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/alert
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base/alert')
-rw-r--r--templates/web/base/alert/_index_text.html25
-rw-r--r--templates/web/base/alert/_list.html11
-rw-r--r--templates/web/base/alert/_list_rss_local.html10
-rw-r--r--templates/web/base/alert/index.html26
4 files changed, 38 insertions, 34 deletions
diff --git a/templates/web/base/alert/_index_text.html b/templates/web/base/alert/_index_text.html
new file mode 100644
index 000000000..92e84478e
--- /dev/null
+++ b/templates/web/base/alert/_index_text.html
@@ -0,0 +1,25 @@
+<p>
+[% IF c.cobrand.is_council %]
+[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local
+problems, including alerts for all problems within a particular ward, or all
+problems within a certain distance of a particular location.', "%s is the site name"), site_name) %]
+[% ELSE %]
+[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local problems, including
+alerts for all problems within a particular ward or council, or all problems
+within a certain distance of a particular location.', "%s is the site name"), site_name) %]
+[% END %]
+</p>
+
+[% IF location_error %]
+ <div class="error">[% location_error %]</div>
+[% ELSE %]
+ [% INCLUDE 'errors.html' %]
+[% END %]
+
+<p>
+[% IF c.cobrand.is_council %]
+[% tprintf(loc('To find out what local alerts we have for you, please enter your %s postcode or street name and area:'), c.cobrand.council_area) %]
+[% ELSE %]
+[% loc('To find out what local alerts we have for you, please enter your postcode or street name and area' ) %]
+[% END %]
+</p>
diff --git a/templates/web/base/alert/_list.html b/templates/web/base/alert/_list.html
index b9d955466..3dbd6b8d2 100644
--- a/templates/web/base/alert/_list.html
+++ b/templates/web/base/alert/_list.html
@@ -22,16 +22,7 @@
<h3>[% loc('Problems in an area') %]</h3>
[% END %]
- <p id="rss_local">
- <a href="[% rss_feed_uri %]" class="alerts-rss-link">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed of nearby problems') %]" alt="[% loc('RSS feed') %]">
- </a>
- <label class="label-containing-checkbox" for="[% rss_feed_id %]">
- <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]>
- [% tprintf( loc('Problems within %.1fkm of %s'), population_radius, name_of_location ) %]
- [% loc('(covers roughly 200,000 people)') %]
- </label>
- </p>
+ [% PROCESS 'alert/_list_rss_local.html' %]
<p id="rss_local_alt">
[% SET distance_options = '<a href="' _ rss_feed_2k _ ' ">2km</a> / <a href="' _ rss_feed_5k _ ' ">5km</a> / <a href="' _ rss_feed_10k _ '">10km</a> / <a href="' _ rss_feed_20k _ '">20km</a>' %]
diff --git a/templates/web/base/alert/_list_rss_local.html b/templates/web/base/alert/_list_rss_local.html
new file mode 100644
index 000000000..a7fd82ca2
--- /dev/null
+++ b/templates/web/base/alert/_list_rss_local.html
@@ -0,0 +1,10 @@
+ <p id="rss_local">
+ <a href="[% rss_feed_uri %]" class="alerts-rss-link">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed of nearby problems') %]" alt="[% loc('RSS feed') %]">
+ </a>
+ <label class="label-containing-checkbox" for="[% rss_feed_id %]">
+ <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]>
+ [% tprintf( loc('Problems within %.1fkm of %s'), population_radius, name_of_location ) %]
+ [% loc('(covers roughly 200,000 people)') %]
+ </label>
+ </p>
diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html
index ba3c64baf..3c7ff9e8b 100644
--- a/templates/web/base/alert/index.html
+++ b/templates/web/base/alert/index.html
@@ -3,33 +3,11 @@
<h1>[% loc('Local RSS feeds and email alerts') %]</h1>
-<p>
-[% IF c.cobrand.is_council %]
-[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local
-problems, including alerts for all problems within a particular ward, or all
-problems within a certain distance of a particular location.', "%s is the site name"), site_name) %]
-[% ELSE %]
-[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local problems, including
-alerts for all problems within a particular ward or council, or all problems
-within a certain distance of a particular location.', "%s is the site name"), site_name) %]
-[% END %]
-</p>
-
-[% IF location_error %]
- <div class="error">[% location_error %]</div>
-[% ELSE %]
- [% INCLUDE 'errors.html' %]
-[% END %]
+[% PROCESS 'alert/_index_text.html' %]
-<p>
-[% IF c.cobrand.is_council %]
-[% tprintf(loc('To find out what local alerts we have for you, please enter your %s postcode or street name and area:'), c.cobrand.council_area) %]
-[% ELSE %]
-[% loc('To find out what local alerts we have for you, please enter your postcode or street name and area' ) %]
-[% END %]
-</p>
<form method="get" action="/alert/list" class="form-box js-geolocate">
<fieldset>
+ <legend class="visuallyhidden">[% loc('Search for location of email alert or RSS feed') %]</legend>
<label for="pc">[% loc('Postcode or street name and area') %]</label>
<p class="form-hint" id="pc-hint">[% tprintf(loc('e.g. ā€˜%s’ or ā€˜%s’'), c.cobrand.example_places) %]</p>
<div class="form-txt-submit-box">