aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/oxfordshire/around/_postcode_form_examples.html0
-rw-r--r--templates/web/oxfordshire/around/_postcode_submit_button.html1
-rw-r--r--templates/web/oxfordshire/around/postcode_form.html16
3 files changed, 12 insertions, 5 deletions
diff --git a/templates/web/oxfordshire/around/_postcode_form_examples.html b/templates/web/oxfordshire/around/_postcode_form_examples.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/oxfordshire/around/_postcode_form_examples.html
diff --git a/templates/web/oxfordshire/around/_postcode_submit_button.html b/templates/web/oxfordshire/around/_postcode_submit_button.html
new file mode 100644
index 000000000..e06579b0f
--- /dev/null
+++ b/templates/web/oxfordshire/around/_postcode_submit_button.html
@@ -0,0 +1 @@
+<input type="submit" [% attr | safe %] value="Find">
diff --git a/templates/web/oxfordshire/around/postcode_form.html b/templates/web/oxfordshire/around/postcode_form.html
index ea15809d8..42655ebd4 100644
--- a/templates/web/oxfordshire/around/postcode_form.html
+++ b/templates/web/oxfordshire/around/postcode_form.html
@@ -10,22 +10,28 @@
<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm" class="js-geolocate">
<label for="pc">[% question %]:</label>
+ [% INCLUDE 'around/_postcode_form_examples.html' %]
<div>
- <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]" required>
- <input type="submit" value="[% loc('Find') %]" id="sub">
+ <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]" required aria-describedby="pc-hint">
+ [% INCLUDE 'around/_postcode_submit_button.html' attr='id="sub"' %]
</div>
[% IF partial_token %]
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
- [% IF c.get_param('filter_category') %]
+ [% IF c.get_param('filter_category') OR c.get_param('filter_group') %]
<input type="hidden" name="filter_category" value="[% c.get_param('filter_category') | html %]">
+ <input type="hidden" name="filter_group" value="[% c.get_param('filter_group') | html %]">
[% ELSIF c.user_exists AND c.user.categories.size %]
- <input type="hidden" name="filter_category" value="[% c.user.categories.join(",") | html %]">
+ <input type="hidden" name="filter_category" value="[% c.user.categories_string | html %]">
[% END %]
</form>
- <a href="[% c.uri_for('/around') %]" id="geolocate_link">[% loc('Or use my location') %]</a>
+ [%~ SET link_params = {};
+ IF c.get_param('filter_category'); link_params.filter_category = c.get_param('filter_category'); END;
+ IF c.get_param('filter_group'); link_params.filter_group = c.get_param('filter_group'); END;
+ %]
+ <a href="[% c.uri_for('/around', link_params) %]" id="geolocate_link">[% loc('Or use my location') %]</a>
[% UNLESS possible_location_matches %]
[% INCLUDE 'around/_postcode_form_post.html' %]