aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-04-23 11:55:08 +0100
committerStruan Donald <struan@exo.org.uk>2012-04-23 11:55:08 +0100
commit70b13b5580d354850fde931df1b972e128831f6a (patch)
tree0e6559bc41d39a8d19aba212ad9d771aff92eac2
parent58f598580a1179fe8d1910087e9562230d230713 (diff)
parent0a7f56d9dc36f22659bf786d15c3d7c4b8f33366 (diff)
Merge remote-tracking branch 'origin/bromley' into bromley
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm9
-rwxr-xr-xtemplates/web/bromley/around/display_location.html117
-rw-r--r--templates/web/bromley/footer.html5
-rw-r--r--templates/web/bromley/header.html24
-rw-r--r--templates/web/bromley/index.html24
-rw-r--r--templates/web/bromley/report/display.html11
-rw-r--r--templates/web/bromley/report/new/fill_in_details_form.html42
-rw-r--r--templates/web/bromley/tokens/confirm_problem.html11
-rw-r--r--templates/web/default/report/new/councils_text_all.html2
-rw-r--r--templates/web/fixmystreet/report/new/category.html10
-rw-r--r--templates/web/fixmystreet/report/new/councils_text.html9
-rw-r--r--templates/web/fixmystreet/report/new/councils_text_all.html19
-rw-r--r--templates/web/fixmystreet/report/new/councils_text_none.html20
-rw-r--r--templates/web/fixmystreet/report/new/councils_text_some.html28
-rw-r--r--templates/web/fixmystreet/report/new/form_heading.html0
-rw-r--r--templates/web/fixmystreet/report/new/report_import.html92
-rw-r--r--web/cobrands/bromley/_colours.scss5
-rw-r--r--web/cobrands/bromley/base.scss17
-rw-r--r--web/cobrands/bromley/bromley.scss57
-rw-r--r--web/cobrands/bromley/layout.scss83
-rw-r--r--web/cobrands/bromley/main-menu-hover-home-right.gifbin0 -> 4299 bytes
-rw-r--r--web/cobrands/bromley/main-menu1.gifbin0 -> 12809 bytes
-rw-r--r--web/cobrands/fixmystreet/_base.scss14
-rw-r--r--web/cobrands/fixmystreet/_colours.scss1
-rw-r--r--web/cobrands/fixmystreet/_layout.scss18
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js49
-rw-r--r--web/js/map-OpenLayers.js51
27 files changed, 385 insertions, 333 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index 0293d1610..9014035b6 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -56,9 +56,16 @@ sub council_check {
return 1;
}
my $url = 'http://www.fixmystreet.com/';
- $url .= 'alert' if $context eq 'alert';
+ if ($context eq 'alert') {
+ $url .= 'alert';
+ } else {
+ $url .= 'around';
+ }
$url .= '?pc=' . URI::Escape::uri_escape( $self->{c}->req->param('pc') )
if $self->{c}->req->param('pc');
+ $url .= '?latitude=' . URI::Escape::uri_escape( $self->{c}->req->param('latitude') )
+ . '&amp;longitude=' . URI::Escape::uri_escape( $self->{c}->req->param('longitude') )
+ if $self->{c}->req->param('latitude');
my $error_msg = "That location is not covered by " . $self->council_name . ".
Please visit <a href=\"$url\">the main FixMyStreet site</a>.";
return ( 0, $error_msg );
diff --git a/templates/web/bromley/around/display_location.html b/templates/web/bromley/around/display_location.html
new file mode 100755
index 000000000..9d0a5e6c7
--- /dev/null
+++ b/templates/web/bromley/around/display_location.html
@@ -0,0 +1,117 @@
+[%
+
+ rss_alt = loc('RSS feed');
+ rss_title = loc('RSS feed of recent local problems');
+
+ rss_url
+ = pc
+ ? c.uri_for( "/rss/pc", pc )
+ : c.uri_for( "/rss/l/$short_latitude,$short_longitude" );
+
+ email_url = c.uri_for(
+ '/alert/list',
+ {
+ lat => short_latitude,
+ lon => short_longitude,
+ feed => "local:$short_latitude:$short_longitude",
+ }
+ );
+
+ url_skip = c.uri_for(
+ '/report/new',
+ {
+ pc => pc
+ latitude => short_latitude,
+ longitude => short_longitude,
+ skipped => 1,
+ }
+ );
+
+ PROCESS "maps/${map.type}.html";
+
+ INCLUDE 'header.html',
+ title => loc('Viewing a location')
+ rss => [ loc('Recent local problems, FixMyStreet'), rss_url ],
+ bodyclass => 'mappage',
+ robots => 'noindex,nofollow';
+%]
+
+<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate">
+ [% IF c.req.params.map_override %]
+ <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]">
+ [% END %]
+ <input type="hidden" name="pc" value="[% pc | html %]">
+
+ <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]">
+ <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]">
+
+ [% map_html %]
+
+ <p id='sub_map_links'>
+ [% IF c.req.params.no_pins %]
+ <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a>
+ [% ELSE %]
+ <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a>
+ [% END %]
+ [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %]
+ [% IF c.req.params.all_pins %]
+ <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a>
+ [% ELSE %]
+ <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a>
+ [% END %]
+ [% END %]
+ </p>
+
+ </div>
+
+
+
+
+ <div id="side">
+
+ <h1 class="big-green-banner">[% loc( 'Click map to report a problem' ) %]
+ <span style="">Yellow pins show existing reports</span></h1>
+
+ <p id="skip-this-step">
+ [%
+ tprintf(
+ loc("Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>"),
+ url_skip
+ )
+ %]
+ </p>
+
+ <div class="shadow-wrap">
+ <ul id="key-tools" class="singleton">
+ <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">Get updates</a></li>
+ </ul>
+ </div>
+
+ <section class="full-width">
+ <menu id="problems-nav" class="tab-nav">
+ <ul>
+ <li><a href="#current">[% loc('Problems on the map') %]</a></li>
+ <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li>
+ </ul>
+ </menu>
+
+ <ul id="current" class="issue-list-a tab">
+ [% INCLUDE "around/on_map_list_items.html" %]
+ </ul>
+
+ <ul id="current_near" class="issue-list-a tab">
+ [% INCLUDE "around/around_map_list_items.html" %]
+ </ul>
+ </section>
+ </div>
+
+ <div style="display:none" id="side-form">
+ [% INCLUDE "report/new/fill_in_details_form.html"
+ js = 1,
+ report.used_map = 1
+ report.name = c.user.name
+ %]
+ </div>
+</form>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/bromley/footer.html b/templates/web/bromley/footer.html
index 4ef3011a9..619a6826f 100644
--- a/templates/web/bromley/footer.html
+++ b/templates/web/bromley/footer.html
@@ -1,4 +1,8 @@
</div><!-- .content role=main -->
+ <p id="bromley-powered-by" class="desk-only">
+ <a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/bromley/fms-logo.png" style="height:20px;"></a>
+ </p>
+
</div><!-- .container -->
</div><!-- .table-cell -->
@@ -40,5 +44,6 @@
</div>
+ </div></div>
</body>
</html>
diff --git a/templates/web/bromley/header.html b/templates/web/bromley/header.html
index 292401632..50b0f8fa1 100644
--- a/templates/web/bromley/header.html
+++ b/templates/web/bromley/header.html
@@ -26,6 +26,8 @@
</head>
<body class="[% bodyclass | html IF bodyclass %]">
+ [%# ie_wrapper is to prevent a horizontal scrollbar in IE7, it appears (from Bromley site) %]
+ <div id="bromley-wrapper"><div id="bromley-ie_wrapper">
<div id="bromley-header" class="desk-only">
<ul class="header-nav">
@@ -40,12 +42,14 @@
<a href="http://www.bromley.gov.uk"><img src="/cobrands/bromley/bromley-logo.jpg" alt="London Borough of Bromley logo" width="159" height="114" style="width:159px; height:114px;" /></a>
</div>
- <!-- <div class="sign-in">
- <p>
- You are not signed in. <a href="https://www.bromley.gov.uk/sign_in?referer=%2fa_to_z">Sign in</a>
- or <a href="https://www.bromley.gov.uk/register">register</a>?
- </p>
- </div> -->
+ <div class="sign-in">
+ [% IF c.user_exists %]
+ <p>
+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
+ <a href="/auth/sign_out">[% loc('sign out') %]</a>
+ </p>
+ [% END %]
+ </div>
<div class="main-menu">
<ul>
@@ -57,7 +61,7 @@
%]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
%]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END
%]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[%
- %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
+ %]<li class="last"><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
%]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
</ul>
</div>
@@ -79,14 +83,12 @@
[% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
<a href="/auth/sign_out">[% loc('sign out') %]</a>
</p>
- [% ELSE %]
- <!-- <a href="/auth">[% loc('Sign in') %]</a> -->
[% END %]
</div>
- [% pre_container_extra %]
+ <h1 class="main desk-only">Reporting a problem in Bromley&rsquo;s streets or parks</h1>
<div class="container">
<div class="content[% " $mainclass" | html IF mainclass %]" role="main">
- <!-- [% INCLUDE 'debug_header.html' %] -->
+
diff --git a/templates/web/bromley/index.html b/templates/web/bromley/index.html
index 80217d1f9..370ab3f75 100644
--- a/templates/web/bromley/index.html
+++ b/templates/web/bromley/index.html
@@ -18,14 +18,14 @@ Modernizr.load({
[% INCLUDE 'header.html', title => '' , bodyclass => 'frontpage fullwidthpage' %]
+<h1 class="main mob-only">Reporting a problem in Bromley&rsquo;s streets or parks</h1>
+
[% IF error %]
<p class="error">[% error %]</p>
[% END %]
<div id="front-main">
<div id="front-main-container">
- <h1>Reporting a problem in Bromley&rsquo;s streets or parks</h1>
-
[%
question
= c.cobrand.enter_postcode_text()
@@ -33,22 +33,22 @@ Modernizr.load({
%]
<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
- <label for="pc">Enter a Bromley Council postcode, or street name and area:</label>
+ <label for="pc">Enter a Bromley postcode, or street name and area:</label>
<div>
<input type="text" name="pc" value="" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ā€˜%s’ or ā€˜%s’'), c.cobrand.example_places) %]">
<input type="submit" value="[% loc('Go') %]" id="submit">
</div>
</form>
- <p>This is primarily for reporting physical problems that can be fixed
- like graffiti, fly tipping, or broken paving slabs to report other
- kinds of problems like missed bins use our
- <a href="http://www.bromley.gov.uk/report">online report it forms</a>.
- </p>
-
</div>
</div>
+<p>This is primarily for reporting physical problems that can be fixed
+like graffiti, cleansing issues or road defects. To report other
+kinds of problems like missed bins use our
+<a href="http://www.bromley.gov.uk/report">online report it forms</a>.
+</p>
+
<div class="tablewrapper">
<div id="front-howto">
<h2>[% loc('How to report a problem') %]</h2>
@@ -57,7 +57,7 @@ Modernizr.load({
<li>[% question %]</li>
<li>[% loc('Locate the problem on a map of the area') %]</li>
<li>[% loc('Enter details of the problem') %]</li>
- <li>Confirm the report and it will be sent to Bromley</li>
+ <li>Confirm the report and Bromley Council will investigate</li>
</ol>
<section class="full-width">
@@ -93,10 +93,6 @@ Modernizr.load({
</ul>
</section>
- <p id="bromley-powered-by" class="desk-only">
- <a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/bromley/fms-logo.png" style="height:20px;"></a>
- </p>
-
</div>
[% END %]
</div>
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
index ad06f923b..fd74ac8db 100644
--- a/templates/web/bromley/report/display.html
+++ b/templates/web/bromley/report/display.html
@@ -56,7 +56,7 @@
[% IF c.cobrand.moniker != 'emptyhomes' %]
<div class="general-sidebar-notes">
- <p>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p>
+ <p>If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a></p>
</div>
[% END %]
@@ -129,11 +129,10 @@
<input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>
<div id="form_sign_in">
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- <h2>[% loc("Do you have a FixMyStreet password?") %]</h2>
+ <p>To submit your update you now need to confirm it either by email or by using a FixMyStreet password.</p>
<div id="form_sign_in_no" class="form-box">
- <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
+ <h5>Confirm my report by email</h5>
[% INCLUDE name %]
@@ -150,7 +149,7 @@
</div>
</div>
<div id="form_sign_in_yes" class="form-box">
- <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
+ <h5>Confirm my report with my FixMyStreet password</h5>
<label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
[% IF field_errors.password %]
@@ -199,7 +198,7 @@
<input type="text" value="[% names.last || last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
<div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' UNLESS update.anonymous %]>
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update AND NOT update.anonymous %]>
<label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
</div>
<div class="checkbox-group">
diff --git a/templates/web/bromley/report/new/fill_in_details_form.html b/templates/web/bromley/report/new/fill_in_details_form.html
index 80ee11dd0..9b06425da 100644
--- a/templates/web/bromley/report/new/fill_in_details_form.html
+++ b/templates/web/bromley/report/new/fill_in_details_form.html
@@ -1,6 +1,4 @@
<div id="report-a-problem-main">
- <h1>[% loc('Reporting a problem') %]</h1>
-
[% IF js %]
<p id="councils_text">
[%
@@ -9,7 +7,7 @@
loc('the local council')
);
%]
- [% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %]
+ Details of the problem will be public, plus your name if you give us permission.
</p>
[% ELSE %]
[% PROCESS 'report/new/councils_text.html' %]
@@ -29,17 +27,16 @@
<p>
[% IF report.used_map %]
- [% INCLUDE 'report/new/fill_in_details_text.html' %]
+ We won&rsquo;t be able to help unless you leave as much
+detail as you can. Please describe the exact location of the problem (e.g. on a
+wall), what it is, how long it has been there, a description (and a photo of
+the problem if you have one), etc.
[% ELSE %]
[% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %]
[% END %]
</p>
</div>
- <div class="sidebar-notes">
- [% INCLUDE 'report/new/notes.html' %]
- </div>
-
</div>
[% INCLUDE 'errors.html' %]
@@ -134,10 +131,11 @@
</div>
<div class="general-sidebar-notes">
- <p>[% loc('We never show your email address.') %]</p>
+ <p>[% loc('We never show your email address or phone number.') %]</p>
</div>
- <input type="hidden" value="" name="phone">
+ <label for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
<div class="form-txt-submit-box">
<input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
@@ -152,11 +150,11 @@
<input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required>
<div id="form_sign_in">
- <h3>[% loc("Now to submit your report&hellip;") %]</h3>
- <h2>[% loc("Do you have a FixMyStreet password?") %]</h2>
+
+ <p>To submit your report you now need to confirm it either by email or by using a FixMyStreet password.</p>
<div id="form_sign_in_no" class="form-box">
- <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5>
+ <h5>Confirm my report by email</h5>
[% INCLUDE 'report/new/extra_name.html' %]
@@ -179,12 +177,13 @@
</div>
<div class="general-sidebar-notes form-focus-hidden">
- <p class="dark">[% loc('We never show your email address.') %]</p>
+ <p class="dark">[% loc('We never show your email address or phone number.') %]</p>
<p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
</div>
- <input type="hidden" value="" name="phone">
-
+ <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="form-focus-hidden" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
+
<label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label>
<div class="form-txt-submit-box form-focus-hidden">
@@ -195,7 +194,7 @@
<div id="form_sign_in_yes" class="form-box">
- <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
+ <h5>Confirm my report with my FixMyStreet password</h5>
<label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
<div class="form-txt-submit-box">
@@ -214,12 +213,17 @@
</div>
- <p>[% loc("We will only use your personal information in accordance with our <a href=\"/faq#privacy\">privacy policy.</a>") %]</p>
-
[% END %]
+
+ <p>[% loc("We will only use your personal information in accordance with our <a href=\"/faq#privacy\">privacy policy.</a>") %]</p>
+
</div>
</fieldset>
+ <div class="sidebar-notes">
+ [% INCLUDE 'report/new/notes.html' %]
+ </div>
+
[% IF partial_token %]
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
diff --git a/templates/web/bromley/tokens/confirm_problem.html b/templates/web/bromley/tokens/confirm_problem.html
new file mode 100644
index 000000000..840f0b061
--- /dev/null
+++ b/templates/web/bromley/tokens/confirm_problem.html
@@ -0,0 +1,11 @@
+[% INCLUDE 'header.html', title = loc('Confirmation') %]
+
+<h1>[% loc('Confirmation') %]</h1>
+
+<p class="confirmed">
+Thank you. You have successfully confirmed your report
+and this will now be investigated by the council.
+You can <a href="[% c.uri_for( '/report', problem.id ) %]">view the problem on this site</a>.
+</p>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/report/new/councils_text_all.html b/templates/web/default/report/new/councils_text_all.html
index 8514e0b0a..2f06686d8 100644
--- a/templates/web/default/report/new/councils_text_all.html
+++ b/templates/web/default/report/new/councils_text_all.html
@@ -1,5 +1,5 @@
<p>
-[% IF all_councils.${area_ids_to_list.0}.type == 'LBO' %]
+[% IF all_councils.${area_ids_to_list.0}.type == 'LBO' AND area_ids_to_list.0 != 2482 %]
[%
tprintf(
loc('All the information you provide here will be sent to <strong>%s</strong> or a relevant local body such as <strong>TfL</strong>, via the London Report-It system.'),
diff --git a/templates/web/fixmystreet/report/new/category.html b/templates/web/fixmystreet/report/new/category.html
deleted file mode 100644
index 095cd7c2e..000000000
--- a/templates/web/fixmystreet/report/new/category.html
+++ /dev/null
@@ -1,10 +0,0 @@
-[% FILTER collapse %]
-[% IF category_options.size %]
- <label for='form_category'>[% category_label | html %]</label>
- <select name='category' id='form_category'[% ' onchange="form_category_onchange()"' IF category_extras.size %]>
- [% FOREACH cat_op IN category_options %]
- <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op %]>[% cat_op | html %]</option>
- [% END %]
- </select>
-[% END %]
-[% END -%]
diff --git a/templates/web/fixmystreet/report/new/councils_text.html b/templates/web/fixmystreet/report/new/councils_text.html
deleted file mode 100644
index 1da5746c1..000000000
--- a/templates/web/fixmystreet/report/new/councils_text.html
+++ /dev/null
@@ -1,9 +0,0 @@
-[% FILTER collapse %]
-[% IF area_ids_to_list.size == 0 %]
- [% PROCESS 'report/new/councils_text_none.html' %]
-[% ELSIF area_ids_to_list.size == all_councils.size %]
- [% PROCESS 'report/new/councils_text_all.html' %]
-[% ELSE %]
- [% PROCESS 'report/new/councils_text_some.html' %]
-[% END %]
-[% END -%]
diff --git a/templates/web/fixmystreet/report/new/councils_text_all.html b/templates/web/fixmystreet/report/new/councils_text_all.html
deleted file mode 100644
index 2f06686d8..000000000
--- a/templates/web/fixmystreet/report/new/councils_text_all.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<p>
-[% IF all_councils.${area_ids_to_list.0}.type == 'LBO' AND area_ids_to_list.0 != 2482 %]
-[%
- tprintf(
- loc('All the information you provide here will be sent to <strong>%s</strong> or a relevant local body such as <strong>TfL</strong>, via the London Report-It system.'),
- all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
- );
-%]
-[% ELSE %]
-[%
- tprintf(
- loc('All the information you provide here will be sent to <strong>%s</strong>.'),
- all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
- );
-%]
-[% END %]
-
-[% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %]
-</p>
diff --git a/templates/web/fixmystreet/report/new/councils_text_none.html b/templates/web/fixmystreet/report/new/councils_text_none.html
deleted file mode 100644
index 992d030c0..000000000
--- a/templates/web/fixmystreet/report/new/councils_text_none.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<p>[%
-
- nget(
- "We do not yet have details for the council that covers this location.",
- "We do not yet have details for the councils that cover this location.",
- all_councils.size
- );
-%]
-[%
- loc("If you submit a problem here the subject and details of the problem will be public, but the problem will <strong>not</strong> be reported to the council.");
-%]
-[%
- tprintf(
- loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."),
- all_council_names.join( loc(' or ') ),
- c.cobrand.contact_email,
- c.cobrand.contact_email
- );
-
-%]</p> \ No newline at end of file
diff --git a/templates/web/fixmystreet/report/new/councils_text_some.html b/templates/web/fixmystreet/report/new/councils_text_some.html
deleted file mode 100644
index 9f123fb9a..000000000
--- a/templates/web/fixmystreet/report/new/councils_text_some.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<p>
-[% loc('All the information you provide here will be sent to') %]
-
-[% FOREACH council_id IN area_ids_to_list %]
- [% loc( ' or ') IF ! loop.first %]
- <strong>[% all_councils.$council_id.name %]</strong>
- [%- '.' IF loop.last %]
-[% END %]
-
-[%
- loc('The subject and details of the problem will be public, plus your name if you give us permission.');
-%]
-[%
- nget(
- "We do <strong>not</strong> yet have details for the other council that covers this location.",
- "We do <strong>not</strong> yet have details for the other councils that cover this location.",
- missing_details_councils.size
- );
-%]
-[%
- tprintf(
- loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."),
- missing_details_council_names.join( loc(' or ') ),
- c.cobrand.contact_email,
- c.cobrand.contact_email
- );
-%]
-</p> \ No newline at end of file
diff --git a/templates/web/fixmystreet/report/new/form_heading.html b/templates/web/fixmystreet/report/new/form_heading.html
deleted file mode 100644
index e69de29bb..000000000
--- a/templates/web/fixmystreet/report/new/form_heading.html
+++ /dev/null
diff --git a/templates/web/fixmystreet/report/new/report_import.html b/templates/web/fixmystreet/report/new/report_import.html
deleted file mode 100644
index 7aa105afe..000000000
--- a/templates/web/fixmystreet/report/new/report_import.html
+++ /dev/null
@@ -1,92 +0,0 @@
-[% INCLUDE 'header.html', title => 'External import' %]
-
-<h1>External import</h1>
-
-<p>You may inject problem reports into FixMyStreet programatically using this
-simple interface. Upon receipt, an email will be sent to the address given,
-with a link the user must click in order to check the details of their report,
-add any other information they wish, and then submit to the council.
-
-<p>This interface returns a plain text response; either <samp>SUCCESS</samp> if
-the report has been successfully received, or if not, a list of errors, one per
-line each starting with <samp>ERROR:</samp>.
-
-<p>You may submit the following information by POST to this URL
-(i.e. <samp>[% c.uri_for('/import') %]</samp> ):</p>
-
-<style type="text/css" media="screen">
- input {
- /* Hide the form elements - they are just here for simpler testing */
- display: none;
- }
-</style>
-
-<form method="POST" action="/import" enctype="multipart/form-data">
-
-<dl>
- <dt>service</dt>
- <dd>
- <em>Required</em>.
- Name of application/service using this interface.
- <input type="text" name="service" />
- </dd>
-
- <dt>id</dt>
- <dd>
- Unique ID of a user/device, for possible future use.<br>
- <small>(e.g. used by Flickr import to know which accounts to look at)</small>
- <input type="text" name="id" />
- </dd>
-
- <dt>subject</dt>
- <dd>
- <em>Required</em>. Subject of problem report.
- <input type="text" name="subject" />
- </dd>
-
- <dt>detail</dt>
- <dd>
- Main body and details of problem report.
- <input type="text" name="detail" />
- </dd>
-
- <dt>name</dt>
- <dd>
- <em>Required</em>. Name of problem reporter.
- <input type="text" name="name" />
- </dd>
-
- <dt>email</dt>
- <dd>
- <em>Required</em>. Email address of problem reporter.
- <input type="text" name="email" />
- </dd>
-
- <dt>phone</dt>
- <dd>
- Telephone number of problem reporter.
- <input type="text" name="phone" />
- </dd>
-
- <dt>easting / northing</dt>
- <dt>lat / lon</dt>
- <dd>
- Location of problem report. You can either supply eastings/northings, or WGS84 latitude/longitude.
- <input type="text" name="easting" />
- <input type="text" name="northing" />
- <input type="text" name="lat" />
- <input type="text" name="lon" />
- </dd>
-
- <dt>photo</dt>
- <dd>
- Photo of problem (JPEG only).
- <input type="file" name="photo" />
- </dd>
-</dl>
-
-<input type="submit" />
-
-</form>
-
-[% INCLUDE 'footer.html' %] \ No newline at end of file
diff --git a/web/cobrands/bromley/_colours.scss b/web/cobrands/bromley/_colours.scss
index b76a37609..e178c9db2 100644
--- a/web/cobrands/bromley/_colours.scss
+++ b/web/cobrands/bromley/_colours.scss
@@ -1,8 +1,9 @@
/* COLOURS */
-$primary: rgb(76,120,168);
+$primary: rgb(91,120,147);
$primary_b: #000000;
$primary_text: #ffffff;
-$contrast1: rgb(76,120,168);
+$contrast1: rgb(91,120,147);
+$contrast1_dark: darken(rgb(91,120,147), 10%);
$contrast2: #AA8D11;
diff --git a/web/cobrands/bromley/base.scss b/web/cobrands/bromley/base.scss
index 36815e6e5..9c5ff2b0f 100644
--- a/web/cobrands/bromley/base.scss
+++ b/web/cobrands/bromley/base.scss
@@ -5,6 +5,19 @@
@import "../fixmystreet/_base";
+a, a:visited {
+ color: #369;
+ &:hover, &:active {
+ color: #369;
+ }
+}
+
+h1.main {
+ color: $primary;
+ text-align: center;
+ margin: 0.5em 0;
+}
+
// Want a white header, and logo is slightly bigger
#site-header {
@include background(linear-gradient(#ddd, #fff 10%, #fff));
@@ -41,3 +54,7 @@
.big-green-banner {
text-transform: none;
}
+
+#form_sign_in {
+ margin-top: 1em;
+}
diff --git a/web/cobrands/bromley/bromley.scss b/web/cobrands/bromley/bromley.scss
index 89ab08fd1..d6b2d370d 100644
--- a/web/cobrands/bromley/bromley.scss
+++ b/web/cobrands/bromley/bromley.scss
@@ -5,6 +5,23 @@
@import "compass";
+// Bits of Bromley's forms.css, adjusted
+input[type=text],
+input[type=password],
+input[type=email],
+input[type=file],
+textarea,
+select { background: #fff; border: 1px solid #768b9a; border-color: #768b9a #d1dee8 #d1dee8 #768b9a; color: #333; font: 12px/18px Arial, 'Helvetica Neue', Helvetica, sans-serif; padding: 8px; width: 300px;
+@include border-radius(0); }
+
+.green-btn, button.green-btn, input.green-btn {
+ background: #5b7189 url("http://www.bromley.gov.uk/site/styles/css_img/button.gif") repeat-x 0 -1px; border: 1px solid #8e9eb0; color: #fff; font-family: 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; font-weight: normal; margin: 0; min-height: 23px; outline: 1px solid #405062; padding: 4px 8px; text-transform: uppercase; }
+.green-btn:hover, button.green-btn:hover, input.green-btn:hover { background: #5b7189; border: 1px solid #8e9eb0; }
+.form-txt-submit-box input[type=submit] {
+ padding-top: 0; padding-bottom: 0; width: auto;
+}
+
+
h1, h2, h3, h4, h5, h6, legend { font-family: 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; }
body { color: #333; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 1.4; }
@@ -35,13 +52,13 @@ body { color: #333; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
.main-menu li a:hover, .main-menu li a:active {background:url('http://www.bromley.gov.uk/site/styles/css_img/main-menu-hover.gif') repeat-x;}
.main-menu li.home a:hover, .main-menu li.home a:active {background:url('http://www.bromley.gov.uk/site/styles/css_img/main-menu-hover-home.gif') repeat-x;}
-#search { float: right; padding: 10px 17px; width: 270px; }
-#search label {display:none;}
-#search input { background: #ececec; border: 1px solid #768b9a; border-color: #768b9a #d1dee8 #d1dee8 #768b9a; line-height: 9px; padding: 6px 5px 4px; width: 184px; }
-#search input.button { background: #fff; border: 1px solid #8596a8; color: #333; font-family: 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; font-size:133%; height: 27px; line-height: 27px; padding: 0; vertical-align: top; width: 70px; }
+//#search { float: right; padding: 10px 17px; width: 270px; }
+//#search label {display:none;}
+//#search input { background: #ececec; border: 1px solid #768b9a; border-color: #768b9a #d1dee8 #d1dee8 #768b9a; line-height: 9px; padding: 6px 5px 4px; width: 184px; }
+//#search input.button { background: #fff; border: 1px solid #8596a8; color: #333; font-family: 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; font-size:133%; height: 27px; line-height: 27px; padding: 0; vertical-align: top; width: 70px; }
-// #footer renamed to #bromley-footer, image removed from background, width removed for no scrollbar, fixed font size.
-#bromley-footer { background: #666; clear: both; padding:15px 15px 50px; margin-left:-15px; color:#fff; font-size:11px;}
+// #footer renamed to #bromley-footer, fixed font size.
+#bromley-footer { background: #666 url('http://www.bromley.gov.uk/site/styles/css_img/footer.gif') top center no-repeat; clear: both; width:100%; padding:30px 15px 50px; margin-left:-15px; color:#fff; font-size:92%;}
#bromley-footer a:link,
#bromley-footer a:visited { color: #fff; text-decoration: none; }
#bromley-footer a:hover,
@@ -53,33 +70,41 @@ body { color: #333; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
// Bromley IE specific CSS
.ie6 {
- #search input { padding: 8px 5px 2px; }
- #search input.button { padding: 0; width: 68px; line-height: 24px; }
+ div { zoom: 1; }
+ #bromley-wrapper { padding: 0; }
+ #bromley-footer { margin: 0; }
+ //#search input { padding: 8px 5px 2px; }
+ //#search input.button { padding: 0; width: 68px; line-height: 24px; }
input.button { overflow: visible; width: 1%; }
}
.ie7 {
- #search input { padding: 8px 5px 2px; }
- #search input.button { padding: 0; width: 68px; line-height: 24px; }
+ div { zoom: 1; }
+ //#search input { padding: 8px 5px 2px; }
+ //#search input.button { padding: 0; width: 68px; line-height: 24px; }
input.button { overflow: visible; }
}
.ie8 {
- #search input { padding: 8px 5px 2px; }
- #search input.button { padding: 0; line-height: 24px; }
+ //#search input { padding: 8px 5px 2px; }
+ //#search input.button { padding: 0; line-height: 24px; }
}
// mySociety additions
#bromley-header { font-size: 12px; }
.header-nav ul { margin: 0; }
.header-nav li { list-style-type: none; }
+// Width is actually 637, but that causes wrap-around, need to ask for fixes and corner image
+.main-menu { background: url('/cobrands/bromley/main-menu1.gif') no-repeat; width: 638px; }
.main-menu ul { margin: 0; }
.main-menu li { list-style-type: none; }
-#search input { display: inline; margin: 0; @include border-radius(0em); }
-#search input.button { font-weight: normal; text-transform: none; }
-#bromley-footer { margin: 2em 0 0; }
+.main-menu li.last { padding-right: 0; }
+.main-menu li.last a:hover, .main-menu li.last a:active {background:url('/cobrands/bromley/main-menu-hover-home-right.gif') repeat-x;}
+//#search input { display: inline; margin: 0; @include border-radius(0em); }
+//#search input.button { font-weight: normal; text-transform: none; }
+#bromley-footer { padding-bottom: 60px; }
#bromley-footer .footer-nav li { list-style-type: none; }
#bromley-footer p { margin: 0; }
#bromley-powered-by {
- text-align: right;
+ clear: both;
}
diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss
index e74aab1a3..f773b47f1 100644
--- a/web/cobrands/bromley/layout.scss
+++ b/web/cobrands/bromley/layout.scss
@@ -1,6 +1,10 @@
@import "_colours";
@import "../fixmystreet/_layout";
+body { background: #9b9b9b url('http://www.bromley.gov.uk/site/styles/css_img/repeater.gif') repeat-x; }
+#bromley-wrapper { background: #fff url('http://www.bromley.gov.uk/site/styles/css_img/header-corners.gif') center 110px no-repeat; margin: 1px auto 0; padding: 0 15px; width: 955px;}
+.offline #bromley-wrapper { padding: 0 15px 20px; }
+
// So that map appears underneath the header
.wrapper {
position: relative;
@@ -11,23 +15,17 @@
}
}
-body {
- background: #fff;
-}
-
#front-main {
background: $primary;
@include border-radius(1em 1em 0 0);
+ margin-bottom: 1em;
+ padding-top: 0;
// layout sets this because base has it slightly lighter
h2 {
color: $primary_text;
}
}
-.tablewrapper {
- padding-top: 1em;
-}
-
// Don't want gap that normal site has
body.frontpage {
.table-cell {
@@ -36,18 +34,6 @@ body.frontpage {
}
}
}
-#user-meta {
- p {
- top: -1em;
- }
-}
-body.frontpage {
- #user-meta {
- p {
- top: -2em;
- }
- }
-}
// Don't want FixMyStreet logo on desktop, and we have a skip to content in
// Bromley header
@@ -55,14 +41,18 @@ body.frontpage {
display: none;
}
+#user-meta {
+ display: none;
+}
+
// Currently hiding, but do want some internal navigation somewhere at the end
.nav-wrapper {
display: none;
}
-// White background, so no shadow needed.
+// White background, so no shadow or margin needed.
.content {
- margin-top: 1em;
+ margin: 0;
@include box-shadow(none);
}
.ie6, .ie7, .ie8 {
@@ -70,26 +60,38 @@ body.frontpage {
border: none;
}
}
-// Except on map pages
-body.mappage .content {
- @include box-shadow(0px 0px 6px 1px #000);
-}
-.ie6, .ie7, .ie8 {
- body.mappage .content {
- border: solid 1px #666;
- }
-}
// As map can scroll and isn't at the top, give it an edge
#map_box {
- border-top: solid 1px #999;
- border-bottom: solid 1px #999;
+ border: solid 1px #999;
+ top: 1em;
+ right: 0em;
+ margin: 0;
}
// Perhaps fix map location (should be in central?)
.ie6 #map_box, .ie7 #map_box {
- right: -30em;
- top: 0;
+ right: -32em;
+}
+
+.general-sidebar-notes,
+#report-a-problem-sidebar {
+ position: static;
+ width: auto;
+ @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0);
+ .sidebar-tips,
+ .sidebar-notes {
+ font-size:1em;
+ }
+}
+
+.ie7 .big-green-banner {
+ right: 0;
+}
+
+// Pull OpenLayers navigation down a bit
+#fms_pan_zoom {
+ top: 0.5em !important;
}
// Fix location of aside sidebar
@@ -116,3 +118,14 @@ body.twothirdswidthpage {
}
}
+// So as not to interfere with the Bromley footer, make the fixed nav static.
+.shadow-wrap {
+ position: static;
+ padding-top: 0;
+ margin-bottom: 1em;
+ ul#key-tools {
+ border-top: none;
+ border-bottom: 1px solid $primary;
+ }
+}
+
diff --git a/web/cobrands/bromley/main-menu-hover-home-right.gif b/web/cobrands/bromley/main-menu-hover-home-right.gif
new file mode 100644
index 000000000..80c11c782
--- /dev/null
+++ b/web/cobrands/bromley/main-menu-hover-home-right.gif
Binary files differ
diff --git a/web/cobrands/bromley/main-menu1.gif b/web/cobrands/bromley/main-menu1.gif
new file mode 100644
index 000000000..21ab45668
--- /dev/null
+++ b/web/cobrands/bromley/main-menu1.gif
Binary files differ
diff --git a/web/cobrands/fixmystreet/_base.scss b/web/cobrands/fixmystreet/_base.scss
index c453da80c..4ac6d7d59 100644
--- a/web/cobrands/fixmystreet/_base.scss
+++ b/web/cobrands/fixmystreet/_base.scss
@@ -144,6 +144,10 @@ img {
height:auto;
max-width: 100%;
}
+// So that map popups display correctly
+#popup img {
+ max-width: none;
+}
select, input, textarea {
font-size: 99%;
@@ -305,7 +309,7 @@ label{
margin:0.5em 0;
}
h5 {
- margin:0;
+ margin:0 0 1em;
font: {
size:1.125em;
weight:normal;
@@ -536,7 +540,7 @@ p.label-valid {
size:0.6875em;
family: 'helvetica', 'arial', sans-serif;
}
- &:hover, &.hover, &.active {
+ &:hover, &.hover {
text-decoration:none;
background-color:#333;
color:#fff;
@@ -553,7 +557,7 @@ p.label-valid {
background-image:url('/cobrands/fixmystreet/images/sprite.png');
background-position:center -2716px;
}
- &.hover, &.active {
+ &.hover {
background-image:url('/cobrands/fixmystreet/images/sprite.png');
background-position:center -2064px;
}
@@ -724,7 +728,7 @@ a:hover.button-left {
width: 0;
height: 0;
border-left: 0.5em solid transparent;
- border-bottom: 0.5em solid #4B8304;
+ border-bottom: 0.5em solid $contrast1_dark;
}
}
@@ -760,7 +764,7 @@ a:hover.button-left {
color:#fff;
background: $contrast1;
&:before {
- border-bottom: 0.5em solid #4B8304;
+ border-bottom: 0.5em solid $contrast1_dark;
}
}
}
diff --git a/web/cobrands/fixmystreet/_colours.scss b/web/cobrands/fixmystreet/_colours.scss
index 2463cdeeb..1a62d0282 100644
--- a/web/cobrands/fixmystreet/_colours.scss
+++ b/web/cobrands/fixmystreet/_colours.scss
@@ -5,4 +5,5 @@ $primary_b: #F3B11E;
$primary_text: #222;
$contrast1: #00BD08;
+$contrast1_dark: #4B8304;
$contrast2: #AA8D11;
diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss
index 57b26f42d..af422c790 100644
--- a/web/cobrands/fixmystreet/_layout.scss
+++ b/web/cobrands/fixmystreet/_layout.scss
@@ -198,14 +198,13 @@ h1 {
// .content Is the white box
// The narrow single column box
-.content{
+.content {
width: 27em;
margin-top: 3em;
- background: #fff;
- padding: 1em;
- padding-bottom: 3em;
- margin-left: 0.5em;
margin-bottom: -1em;
+ margin-left: 0.5em;
+ padding: 1em 1em 3em;
+ background: #fff;
@include box-shadow(0px 0px 6px 1px #000);
}
.ie6, .ie7, .ie8 {
@@ -653,9 +652,14 @@ body.twothirdswidthpage {
top:-0.5em;
position: absolute;
border-top: 0.5em solid transparent;
- border-left: 0.5em solid #4B8304;
+ border-left: 0.5em solid $contrast1_dark;
border-bottom:none;
}
+ span {
+ display: block;
+ font-size: 80%;
+ padding-top: 0.5em;
+ }
}
.ie6 .big-green-banner {
background: $contrast1 url(/cobrands/fixmystreet/images/ie_green_chevron.gif) right center no-repeat;
@@ -677,7 +681,7 @@ body.twothirdswidthpage {
background-position:-324px -326px;
background-repeat:no-repeat;
&:before {
- border-bottom: 0.75em solid #4B8304;
+ border-bottom: 0.75em solid $contrast1_dark;
}
}
}
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index be5be08cb..fe2d1a496 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -104,16 +104,17 @@ $(function(){
// Make map full screen on non-mobile sizes.
$html.removeClass('mobile');
if (cobrand == 'bromley') {
- var $window = $(window), $content = $('.content'), o = $content.offset();
- var map_height = $window.height() - o.top;
- if ($html.hasClass('ie6')) {
- map_height = $window.height() - o.top + 32;
+ var bromley_right;
+ if ($html.hasClass('ie6') || $html.hasClass('ie7')) {
+ bromley_right = '-32em';
+ } else {
+ bromley_right = '0em';
}
- $('#map_box').prependTo('.wrapper').css({
- zIndex: 0, position: 'absolute',
- right: 0, top: '1em',
- width: $window.width() - o.left - $content.outerWidth(),
- height: map_height,
+ // Do the same as CSS (in case resized from mobile).
+ $('#map_box').prependTo('.content').css({
+ zIndex: 1, position: 'absolute',
+ top: '1em', left: '', right: bromley_right, bottom: '',
+ width: '29em', height: '29em',
margin: 0
});
} else if ($html.hasClass('ie6')) {
@@ -133,20 +134,25 @@ $(function(){
}
if (typeof fixmystreet !== 'undefined') {
if (cobrand == 'bromley') {
- $('#bromley-footer').hide();
+ //$('#bromley-footer').hide();
+ } else {
+ fixmystreet.state_map = 'full';
}
- fixmystreet.state_map = 'full';
}
if (typeof fixmystreet !== 'undefined' && fixmystreet.page == 'around') {
// Remove full-screen-ness
- if (cobrand != 'bromley') {
+ var banner_text;
+ if (cobrand == 'bromley') {
+ banner_text = 'Click map to report a problem<span>Yellow pins show existing reports</span>';
+ } else {
$('#site-header').show();
+ banner_text = 'Click map to report a problem';
}
$('#fms_pan_zoom').css({ top: '4.75em !important' });
$('.big-green-banner')
.removeClass('mobile-map-banner')
.prependTo('#side')
- .text('Click map to report a problem');
+ .html(banner_text);
}
$('span.report-a-problem-btn').css({ cursor:'' }).off('.reportBtn');
}
@@ -224,10 +230,15 @@ $(function(){
/*
* Show stuff on input focus
*/
- $('.form-focus-hidden').hide();
- $('.form-focus-trigger').on('focus', function(){
- $('.form-focus-hidden').fadeIn(500);
- });
+ var form_focus_data = $('.form-focus-trigger').map(function() {
+ return $(this).val();
+ }).get().join('');
+ if (!form_focus_data) {
+ $('.form-focus-hidden').hide();
+ $('.form-focus-trigger').on('focus', function(){
+ $('.form-focus-hidden').fadeIn(500);
+ });
+ }
/*
* Show on click - pretty generic
@@ -342,12 +353,12 @@ $.fn.drawer = function(id, ajax) {
});
};
- if ($('html.mobile').length) {
+ if ($('html.mobile').length || cobrand == 'bromley') {
$('#council_wards').hide().removeClass('hidden-js').find('h2').hide();
$('#key-tool-wards').click(function(e){
e.preventDefault();
$('#council_wards').slideToggle('800', function(){
- $('#key-tool-wards').toggleClass('active');
+ $('#key-tool-wards').toggleClass('hover');
});
});
} else {
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 8ea54cac3..a92d02c84 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -7,6 +7,32 @@ function fixmystreet_update_pin(lonlat) {
);
document.getElementById('fixmystreet.latitude').value = lonlat.lat || lonlat.y;
document.getElementById('fixmystreet.longitude').value = lonlat.lon || lonlat.x;
+
+ $.getJSON('/report/new/ajax', {
+ latitude: $('#fixmystreet\\.latitude').val(),
+ longitude: $('#fixmystreet\\.longitude').val()
+ }, function(data) {
+ if (data.error) {
+ if (!$('#side-form-error').length) {
+ $('<div id="side-form-error"/>').insertAfter($('#side-form'));
+ }
+ $('#side-form-error').html('<h1>Reporting a problem</h1><p>' + data.error + '</p>').show();
+ $('#side-form').hide();
+ return;
+ }
+ $('#side-form, #site-logo').show();
+ $('#councils_text').html(data.councils_text);
+ $('#form_category_row').html(data.category);
+ if ( data.extra_name_info ) {
+ // there might be a first name field on some cobrands
+ var lb = $('#form_first_name').prev() || $('#form_name').prev();
+ lb.before(data.extra_name_info);
+ }
+ });
+
+ if (!$('#side-form-error').is(':visible')) {
+ $('#side-form, #site-logo').show();
+ }
}
function fixmystreet_activate_drag() {
@@ -420,7 +446,7 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
fixmystreet.markers.addFeatures( markers );
fixmystreet_activate_drag();
}
- fixmystreet_update_pin(lonlat);
+
// check to see if markers are visible. We click the
// link so that it updates the text in case they go
// back
@@ -428,28 +454,15 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
fixmystreet.state_pins_were_hidden = true;
$('#hide_pins_link').click();
}
+
+ // Store pin location in form fields, and check coverage of point
+ fixmystreet_update_pin(lonlat);
+
+ // Already did this first time map was clicked, so no need to do it again.
if (fixmystreet.page == 'new') {
return;
}
- $.getJSON('/report/new/ajax', {
- latitude: $('#fixmystreet\\.latitude').val(),
- longitude: $('#fixmystreet\\.longitude').val()
- }, function(data) {
- if (data.error) {
- // XXX If they then click back and click somewhere in the area, this error will still show.
- $('#side-form').html('<h1>Reporting a problem</h1><p>' + data.error + '</p>');
- return;
- }
- $('#councils_text').html(data.councils_text);
- $('#form_category_row').html(data.category);
- if ( data.extra_name_info ) {
- // there might be a first name field on some cobrands
- var lb = $('#form_first_name').prev() || $('#form_name').prev();
- lb.before(data.extra_name_info);
- }
- });
- $('#side-form, #site-logo').show();
fixmystreet.map.updateSize(); // might have done, and otherwise Firefox gets confused.
/* For some reason on IOS5 if you use the jQuery show method it
* doesn't display the JS validation error messages unless you do this