aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/base/alert/index.html2
-rw-r--r--templates/web/base/around/postcode_form.html2
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js10
3 files changed, 7 insertions, 7 deletions
diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html
index 5c61e93d9..acef89a78 100644
--- a/templates/web/base/alert/index.html
+++ b/templates/web/base/alert/index.html
@@ -27,7 +27,7 @@ within a certain distance of a particular location.', "%s is the site name"), si
[% 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">
+<form method="get" action="/alert/list" class="form-box js-geolocate">
<fieldset>
<div class="form-txt-submit-box">
<input class="form-control" type="text" name="pc" value="[% pc | html %]" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
diff --git a/templates/web/base/around/postcode_form.html b/templates/web/base/around/postcode_form.html
index 135a70294..69c95d311 100644
--- a/templates/web/base/around/postcode_form.html
+++ b/templates/web/base/around/postcode_form.html
@@ -6,7 +6,7 @@
question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area');
%]
- <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
+ <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm" class="js-geolocate">
<label for="pc">[% question %]:</label>
<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) %]">
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index bc1d7d9a0..a5b09f2c7 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -383,13 +383,13 @@ $.extend(fixmystreet.set_up, {
if (!geo_position_js.init()) {
return;
}
- if ($('#postcodeForm').length) {
- var link = '<a href="LINK" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
- $('form[action="/alert/list"]').append(link.replace('LINK','/alert/list'));
+ if ($('.js-geolocate').length) {
+ var link = $('.js-geolocate').attr('action');
+ link = '<a href="' + link + '" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
if ($('body.frontpage').length) {
- $('#postcodeForm').after(link.replace('LINK','/around'));
+ $('.js-geolocate').after(link);
} else{
- $('#postcodeForm').append(link.replace('LINK','/around'));
+ $('.js-geolocate').append(link);
}
fixmystreet.geolocate.setup(function(pos) {
var latitude = pos.coords.latitude;