aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm1
-rw-r--r--t/app/controller/rss.t1
-rw-r--r--templates/web/base/report/display_tools.html2
3 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm
index 183b233a8..28f1aba43 100755
--- a/perllib/FixMyStreet/App/Controller/Rss.pm
+++ b/perllib/FixMyStreet/App/Controller/Rss.pm
@@ -207,6 +207,7 @@ sub generate : Private {
$out =~ s{(<link>.*?</link>)}{$1<uri>$uri</uri>};
$c->response->header('Content-Type' => 'application/xml; charset=utf-8');
+ $c->response->header('Access-Control-Allow-Origin' => '*');
$c->response->body( $out );
}
diff --git a/t/app/controller/rss.t b/t/app/controller/rss.t
index 8b39219fa..4f737dda7 100644
--- a/t/app/controller/rss.t
+++ b/t/app/controller/rss.t
@@ -50,6 +50,7 @@ FixMyStreet::override_config {
};
$mech->content_contains( "Testing, 10th October" );
$mech->content_lacks( 'Nearest road to the pin' );
+is $mech->response->header('Access-Control-Allow-Origin'), '*';
$report->geocode(
{
diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html
index 82f7d0ac3..f12e9dbc7 100644
--- a/templates/web/base/report/display_tools.html
+++ b/templates/web/base/report/display_tools.html
@@ -43,7 +43,9 @@
<fieldset>
<label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
<div class="form-txt-submit-box">
+ [% IF NOT c.user_exists %]
<input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
+ [% END %]
<input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
</div>
<input type="hidden" name="token" value="[% csrf_token %]">