diff options
-rw-r--r-- | templates/web/default/alert/index.html | 2 | ||||
-rw-r--r-- | templates/web/default/alert/list.html | 8 | ||||
-rw-r--r-- | templates/web/default/errors.html | 5 | ||||
-rw-r--r-- | templates/web/default/report/new/fill_in_details.html | 8 |
4 files changed, 10 insertions, 13 deletions
diff --git a/templates/web/default/alert/index.html b/templates/web/default/alert/index.html index da057f785..d4fcccf94 100644 --- a/templates/web/default/alert/index.html +++ b/templates/web/default/alert/index.html @@ -12,6 +12,8 @@ within a certain distance of a particular location.') %] <ul class="error"><li>[% loc('That location does not appear to be covered by a council, perhaps it is offshore - please try somewhere more specific.') %]</li></ul> [% ELSIF location_error %] <ul class="error"><li>[% location_error | html %]</li></ul> +[% ELSE %] + [% INCLUDE 'errors.html' %] [% END %] <form method="get" action="/alert/list"> diff --git a/templates/web/default/alert/list.html b/templates/web/default/alert/list.html index 547cd27d3..8c434daf6 100644 --- a/templates/web/default/alert/list.html +++ b/templates/web/default/alert/list.html @@ -29,13 +29,7 @@ [% loc('Select which type of alert you\'d like and click the button for an RSS feed, or enter your email address to subscribe to an email alert') %] </p> - [% IF errors %] - <ul class="error"> - [% FOREACH error IN errors %] - <li>[% error %]</li> - [% END %] - </ul> - [% END %] + [% INCLUDE 'errors.html' %] <p> [% loc('The simplest alert is our geographic one') %] diff --git a/templates/web/default/errors.html b/templates/web/default/errors.html new file mode 100644 index 000000000..e0f484ba5 --- /dev/null +++ b/templates/web/default/errors.html @@ -0,0 +1,5 @@ +[% FOREACH error IN errors %] + [% '<ul class="error">' IF loop.first %] + <li>[% error %]</li> + [% '</ul>' IF loop.last %] +[% END %] diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html index a56cbbd6e..6b8a4aaa9 100644 --- a/templates/web/default/report/new/fill_in_details.html +++ b/templates/web/default/report/new/fill_in_details.html @@ -25,11 +25,7 @@ [% INCLUDE 'report/new/fill_in_details_text.html' %] [% END %] -[% FOREACH error IN errors %] - [% '<ul class="error">' IF loop.first %] - <li>[% error %]</li> - [% '</ul>' IF loop.last %] -[% END %] +[% INCLUDE 'errors.html' %] <div id="problem_form"> @@ -150,4 +146,4 @@ [% map_end %] -[% INCLUDE 'footer.html' %]
\ No newline at end of file +[% INCLUDE 'footer.html' %] |