aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App.pm3
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm83
-rw-r--r--t/cobrand/form_extras/templates/report/new/after_photo.html4
-rw-r--r--templates/web/angus/report/new/after_category.html0
-rw-r--r--templates/web/angus/report/new/category_at_top.html1
-rw-r--r--templates/web/base/alert/_list.html2
-rw-r--r--templates/web/base/alert/index.html2
-rw-r--r--templates/web/base/alert/updates.html2
-rw-r--r--templates/web/base/auth/change_email.html2
-rw-r--r--templates/web/base/auth/change_password.html8
-rw-r--r--templates/web/base/auth/general.html8
-rw-r--r--templates/web/base/contact/index.html10
-rw-r--r--templates/web/base/questionnaire/index.html2
-rw-r--r--templates/web/base/report/new/after_photo.html3
-rw-r--r--templates/web/base/report/new/category.html6
-rw-r--r--templates/web/base/report/new/category_extras.html59
-rw-r--r--templates/web/base/report/new/category_wrapper.html2
-rw-r--r--templates/web/base/report/new/councils_extra_text.html1
-rw-r--r--templates/web/base/report/new/councils_text.html13
-rw-r--r--templates/web/base/report/new/councils_text_all.html8
-rw-r--r--templates/web/base/report/new/councils_text_private.html8
-rw-r--r--templates/web/base/report/new/fill_in_details_form.html20
-rw-r--r--templates/web/base/report/new/form_report.html33
-rw-r--r--templates/web/base/report/new/form_user.html15
-rw-r--r--templates/web/base/report/new/form_user_loggedin.html12
-rw-r--r--templates/web/base/report/new/form_user_loggedout.html3
-rw-r--r--templates/web/base/report/new/form_user_loggedout_by_email.html9
-rw-r--r--templates/web/base/report/new/form_user_loggedout_email.html6
-rw-r--r--templates/web/base/report/new/form_user_loggedout_password.html2
-rw-r--r--templates/web/base/report/new/top_message.html9
-rw-r--r--templates/web/base/report/new/top_message_none.html (renamed from templates/web/base/report/new/councils_text_none.html)2
-rw-r--r--templates/web/base/report/new/top_message_some.html (renamed from templates/web/base/report/new/councils_text_some.html)10
-rw-r--r--templates/web/base/report/public_label.html1
-rw-r--r--templates/web/base/report/update/form_name.html4
-rw-r--r--templates/web/base/report/update/form_user_loggedout_email.html4
-rw-r--r--templates/web/bristol/report/new/category_at_top.html1
-rw-r--r--templates/web/bromley/report/new/fill_in_details_form.html214
-rw-r--r--templates/web/bromley/report/new/form_user.html126
-rw-r--r--templates/web/fixamingata/report/new/top_message_none.html (renamed from templates/web/fixamingata/report/new/councils_text_none.html)8
-rw-r--r--templates/web/fixmystreet-uk-councils/report/new/after_category.html1
-rw-r--r--templates/web/fixmystreet-uk-councils/report/new/inline-tips.html3
-rw-r--r--templates/web/fixmystreet.com/report/new/category_at_top.html1
-rw-r--r--templates/web/fixmystreet.com/report/new/inline-tips.html5
-rw-r--r--templates/web/fixmystreet.com/report/new/unresponsive_body.html2
-rw-r--r--templates/web/oxfordshire/report/new/inline-tips.html3
-rw-r--r--templates/web/zurich/report/new/fill_in_details_form.html8
-rw-r--r--web/cobrands/fixmystreet.com/base.scss29
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js8
-rw-r--r--web/cobrands/fixmystreet/images/padlock.pngbin0 -> 148 bytes
-rw-r--r--web/cobrands/fixmystreet/images/padlock.svg1
-rw-r--r--web/cobrands/fixmystreet/images/padlock@2.pngbin0 -> 243 bytes
-rw-r--r--web/cobrands/hart/hart.scss12
-rw-r--r--web/cobrands/oxfordshire/layout.scss11
-rw-r--r--web/cobrands/sass/_base.scss190
-rw-r--r--web/cobrands/sass/_dropzone.scss11
-rw-r--r--web/cobrands/sass/_h5bp.scss4
56 files changed, 467 insertions, 528 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 4036e85ab..40a99b6d3 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -415,8 +415,7 @@ call), use this method.
sub render_fragment {
my ($c, $template, $vars) = @_;
- $vars->{additional_template_paths} = $c->cobrand->path_to_web_templates
- if $vars;
+ $vars = { %{$c->stash}, %$vars } if $vars;
$c->view('Web')->render($c, $template, $vars);
}
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 267f1059d..f26120829 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -180,6 +180,8 @@ sub report_form_ajax : Path('ajax') : Args(0) {
# render templates to get the html
my $category = $c->render_fragment( 'report/new/category.html');
my $councils_text = $c->render_fragment( 'report/new/councils_text.html');
+ my $councils_text_private = $c->render_fragment( 'report/new/councils_text_private.html');
+ my $top_message = $c->render_fragment('report/new/top_message.html');
my $extra_name_info = $c->stash->{extra_name_info}
? $c->render_fragment('report/new/extra_name.html')
: '';
@@ -198,11 +200,13 @@ sub report_form_ajax : Path('ajax') : Args(0) {
my $body = encode_json(
{
councils_text => $councils_text,
+ councils_text_private => $councils_text_private,
category => $category,
extra_name_info => $extra_name_info,
titles_list => $extra_titles_list,
categories => $c->stash->{category_options},
%$contribute_as ? (contribute_as => $contribute_as) : (),
+ $top_message ? (top_message => $top_message) : (),
}
);
@@ -224,6 +228,13 @@ sub category_extras_ajax : Path('category_extras') : Args(0) {
$c->forward('check_for_category');
my $category = $c->stash->{category} || "";
+ $category = '' if $category eq _('-- Pick a category --');
+
+ my $bodies = $c->forward('contacts_to_bodies', [ $category ]);
+ my $vars = {
+ $category ? (list_of_names => [ map { $_->name } @$bodies ]) : (),
+ };
+
my $category_extra = '';
my $generate;
if ( $c->stash->{category_extras}->{$category} && @{ $c->stash->{category_extras}->{$category} } >= 1 ) {
@@ -234,11 +245,17 @@ sub category_extras_ajax : Path('category_extras') : Args(0) {
$generate = 1;
}
if ($generate) {
- $c->stash->{report} = { category => $category };
- $category_extra = $c->render_fragment( 'report/new/category_extras.html');
+ $category_extra = $c->render_fragment('report/new/category_extras.html', $vars);
}
- my $body = encode_json({ category_extra => $category_extra });
+ my $councils_text = $c->render_fragment( 'report/new/councils_text.html', $vars);
+ my $councils_text_private = $c->render_fragment( 'report/new/councils_text_private.html');
+
+ my $body = encode_json({
+ category_extra => $category_extra,
+ councils_text => $councils_text,
+ councils_text_private => $councils_text_private,
+ });
$c->res->content_type('application/json; charset=utf-8');
$c->res->body($body);
@@ -610,7 +627,7 @@ sub setup_categories_and_bodies : Private {
my %seen;
foreach my $contact (@contacts) {
- $bodies_to_list{ $contact->body_id } = 1;
+ $bodies_to_list{ $contact->body_id } = $contact->body;
unless ( $seen{$contact->category} ) {
push @category_options, $contact->category;
@@ -640,9 +657,9 @@ sub setup_categories_and_bodies : Private {
# put results onto stash for display
$c->stash->{bodies} = \%bodies;
$c->stash->{contacts} = \@contacts;
- $c->stash->{all_body_names} = [ map { $_->name } values %bodies ];
- $c->stash->{all_body_urls} = [ map { $_->external_url } values %bodies ];
$c->stash->{bodies_to_list} = [ keys %bodies_to_list ];
+ $c->stash->{bodies_to_list_names} = [ map { $_->name } values %bodies_to_list ];
+ $c->stash->{bodies_to_list_urls} = [ map { $_->external_url } values %bodies_to_list ];
$c->stash->{category_options} = \@category_options;
$c->stash->{category_extras} = \%category_extras;
$c->stash->{non_public_categories} = \%non_public_categories;
@@ -822,34 +839,14 @@ sub process_report : Private {
return 1;
}
- if ($c->stash->{unresponsive}{$report->category} || $c->stash->{unresponsive}{ALL}) {
- # Unresponsive, don't try and send a report.
- $report->bodies_str(-1);
- } else {
- # construct the bodies string:
- my $body_string = do {
- if ( $c->cobrand->can('singleton_bodies_str') && $c->cobrand->singleton_bodies_str ) {
- # Cobrands like Zurich can only ever have a single body: 'x', because some functionality
- # relies on string comparison against bodies_str.
- if (@contacts) {
- $contacts[0]->body_id;
- }
- else {
- '';
- }
- }
- else {
- # 'x,x' - x are body IDs that have this category
- my $bs = join( ',', map { $_->body_id } @contacts );
- $bs;
- };
- };
- $report->bodies_str($body_string);
- # Record any body IDs which might have meant to match, but had no contact
- if ($body_string && @{ $c->stash->{missing_details_bodies} }) {
- my $missing = join( ',', map { $_->id } @{ $c->stash->{missing_details_bodies} } );
- $report->bodies_missing($missing);
- }
+ my $bodies = $c->forward('contacts_to_bodies', [ $report->category ]);
+ my $body_string = join(',', map { $_->id } @$bodies) || '-1';
+
+ $report->bodies_str($body_string);
+ # Record any body IDs which might have meant to match, but had no contact
+ if ($body_string ne '-1' && @{ $c->stash->{missing_details_bodies} }) {
+ my $missing = join( ',', map { $_->id } @{ $c->stash->{missing_details_bodies} } );
+ $report->bodies_missing($missing);
}
my @extra;
@@ -912,6 +909,24 @@ sub process_report : Private {
return 1;
}
+sub contacts_to_bodies : Private {
+ my ($self, $c, $category) = @_;
+
+ my @contacts = grep { $_->category eq $category } @{$c->stash->{contacts}};
+
+ if ($c->stash->{unresponsive}{$category} || $c->stash->{unresponsive}{ALL}) {
+ [];
+ } else {
+ if ( $c->cobrand->can('singleton_bodies_str') && $c->cobrand->singleton_bodies_str ) {
+ # Cobrands like Zurich can only ever have a single body: 'x', because some functionality
+ # relies on string comparison against bodies_str.
+ [ $contacts[0]->body ];
+ } else {
+ [ map { $_->body } @contacts ];
+ }
+ }
+}
+
=head2 check_for_errors
Examine the user and the report for errors. If found put them on stash and
diff --git a/t/cobrand/form_extras/templates/report/new/after_photo.html b/t/cobrand/form_extras/templates/report/new/after_photo.html
index b0c08ba20..89ab0b20c 100644
--- a/t/cobrand/form_extras/templates/report/new/after_photo.html
+++ b/t/cobrand/form_extras/templates/report/new/after_photo.html
@@ -2,11 +2,11 @@
[% IF field_errors.address %]
<p class='form-error'>[% field_errors.address %]</p>
[% END %]
-<input type="text" value="[% report.get_extra_metadata('address') | html %]" name="address" id="form_address" required>
+<input class="form-control" type="text" value="[% report.get_extra_metadata('address') | html %]" name="address" id="form_address" required>
<label for="form_passport">Passport number (optional)</label>
[% IF field_errors.passport %]
<p class='form-error'>[% field_errors.passport %]</p>
[% END %]
-<input type="text" value="[% report.get_extra_metadata('passport') | html %]" name="passport" id="form_passport">
+<input class="form-control" type="text" value="[% report.get_extra_metadata('passport') | html %]" name="passport" id="form_passport">
diff --git a/templates/web/angus/report/new/after_category.html b/templates/web/angus/report/new/after_category.html
deleted file mode 100644
index e69de29bb..000000000
--- a/templates/web/angus/report/new/after_category.html
+++ /dev/null
diff --git a/templates/web/angus/report/new/category_at_top.html b/templates/web/angus/report/new/category_at_top.html
deleted file mode 100644
index 8002eb37a..000000000
--- a/templates/web/angus/report/new/category_at_top.html
+++ /dev/null
@@ -1 +0,0 @@
-[% PROCESS "report/new/category_wrapper.html" %] \ No newline at end of file
diff --git a/templates/web/base/alert/_list.html b/templates/web/base/alert/_list.html
index f94ce84f8..388e0e9bc 100644
--- a/templates/web/base/alert/_list.html
+++ b/templates/web/base/alert/_list.html
@@ -88,7 +88,7 @@ for the county council.', "%s is the site name"), site_name) %]
[% UNLESS c.user_exists %]
<label for="rznvy">[% loc('Your email') %]</label>
- <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]">
+ <input class="form-control" type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]">
[% END %]
<input id="alert_email_button" style="margin-top:1em;" class="green-btn" type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]">
diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html
index 4965a1103..5c61e93d9 100644
--- a/templates/web/base/alert/index.html
+++ b/templates/web/base/alert/index.html
@@ -30,7 +30,7 @@ within a certain distance of a particular location.', "%s is the site name"), si
<form method="get" action="/alert/list" class="form-box">
<fieldset>
<div class="form-txt-submit-box">
- <input type="text" name="pc" value="[% pc | html %]" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
+ <input class="form-control" type="text" name="pc" value="[% pc | html %]" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
<input class="green-btn" type="submit" value="[% loc('Go') %]">
</div>
</fieldset>
diff --git a/templates/web/base/alert/updates.html b/templates/web/base/alert/updates.html
index ecaed37ca..82e99d49a 100644
--- a/templates/web/base/alert/updates.html
+++ b/templates/web/base/alert/updates.html
@@ -19,7 +19,7 @@
<label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
<div class="form-txt-submit-box">
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" placeholder="[% loc('Your email') %]">
+ <input class="form-control" type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" placeholder="[% loc('Your email') %]">
<input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
</div>
diff --git a/templates/web/base/auth/change_email.html b/templates/web/base/auth/change_email.html
index 58c864929..471782e42 100644
--- a/templates/web/base/auth/change_email.html
+++ b/templates/web/base/auth/change_email.html
@@ -24,7 +24,7 @@
<div class="form-field">
<label for="email">[% loc('New email address:') %]</label>
- <input type="email" name="email" id="email" value="[% email | html %]">
+ <input class="form-control" type="email" name="email" id="email" value="[% email | html %]">
</div>
<div class="final-submit">
<input type="submit" value="[% loc('Change email address') %]">
diff --git a/templates/web/base/auth/change_password.html b/templates/web/base/auth/change_password.html
index 80708abb1..50ecc93a2 100644
--- a/templates/web/base/auth/change_password.html
+++ b/templates/web/base/auth/change_password.html
@@ -17,7 +17,7 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass
<form action="[% c.uri_for('change_password') %]" method="post" name="change_password" class="fieldset">
<input type="hidden" name="token" value="[% csrf_token %]">
-
+
<fieldset>
[% IF password_error;
@@ -26,18 +26,18 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass
mismatch => loc('The passwords do not match'),
other => loc('Please check the passwords and try again'),
};
-
+
loc_password_error = errors.$password_error || errors.other; %]
<div class="form-error">[% loc_password_error %]</div>
[% END %]
<div class="form-field">
<label for="new_password">[% loc('New password:') %]</label>
- <input type="password" name="new_password" value="[% new_password | html %]">
+ <input class="form-control" type="password" name="new_password" value="[% new_password | html %]">
</div>
<div class="form-field">
<label for="confirm">[% loc('Again:') %]</label>
- <input type="password" name="confirm" value="[% confirm | html %]">
+ <input class="form-control" type="password" name="confirm" value="[% confirm | html %]">
</div>
<div class="final-submit">
<input type="submit" value="[% loc('Change password') %]">
diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html
index a8bf8f1e0..cf539ff4f 100644
--- a/templates/web/base/auth/general.html
+++ b/templates/web/base/auth/general.html
@@ -52,7 +52,7 @@
[% ELSIF sign_in_error %]
<div class="form-error">[% loc('There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the &lsquo;sign in by email&rsquo; section of the form.') %]</div>
[% END %]
- <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]" autofocus>
+ <input type="email" class="form-control required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]" autofocus>
<div id="form_sign_in">
<h3>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h3>
@@ -82,7 +82,7 @@
<label class="hidden-js n" for="password_sign_in">[% loc('Password:') %]</label>
<div class="form-txt-submit-box">
- <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
+ <input type="password" name="password_sign_in" class="form-control" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
<input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]">
</div>
@@ -104,7 +104,7 @@
<h5>[% loc('<strong>No</strong> let me sign in by email') %]</h5>
<label for="name">[% loc('Name') %]</label>
- <input type="text" name="name" value="" placeholder="[% loc('Your name') %]">
+ <input class="form-control" type="text" name="name" value="" placeholder="[% loc('Your name') %]">
<label for="password_register">[% loc('Password (optional)') %]</label>
@@ -113,7 +113,7 @@
</div>
<div class="form-txt-submit-box">
- <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
+ <input class="form-control" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
<input class="green-btn" type="submit" name="email_sign_in" value="[% loc('Sign in') %]">
</div>
</div>
diff --git a/templates/web/base/contact/index.html b/templates/web/base/contact/index.html
index 86a0cec0d..536b95527 100644
--- a/templates/web/base/contact/index.html
+++ b/templates/web/base/contact/index.html
@@ -11,7 +11,7 @@
[% ELSE %]
<h1>[% loc('Contact the team') %]</h1>
[% END %]
-
+
<form method="post" action="/contact/submit" class="validate">
<fieldset>
[% INCLUDE 'errors.html' %]
@@ -77,21 +77,21 @@
[% IF field_errors.name %]
<div class="form-error">[% field_errors.name %]</div>
[% END %]
- <input type="text" class="required" name="name" id="form_name" value="[% form_name | html %]" size="30">
+ <input type="text" class="form-control required" name="name" id="form_name" value="[% form_name | html %]" size="30">
<label for="form_email">[% loc('Your email') %]</label>
[% IF field_errors.em %]
<div class="form-error">[% field_errors.em %]</div>
[% END %]
- <input type="text" class="required email" name="em" id="form_email" value="[% em | html %]" size="30">
+ <input type="text" class="form-control required email" name="em" id="form_email" value="[% em | html %]" size="30">
<label for="form_subject">[% loc('Subject') %]</label>
[% IF field_errors.subject %]
<div class="form-error">[% field_errors.subject %]</div>
[% END %]
- <input type="text" class="required" name="subject" id="form_subject" value="[% subject | html %]" size="30">
+ <input type="text" class="form-control required" name="subject" id="form_subject" value="[% subject | html %]" size="30">
[% INCLUDE 'contact/who.html' %]
@@ -99,7 +99,7 @@
[% IF field_errors.message %]
<div class="form-error">[% field_errors.message %]</div>
[% END %]
- <textarea class="required" name="message" id="form_message" rows="7" cols="50">[% message | html %]</textarea>
+ <textarea class="form-control required" name="message" id="form_message" rows="7" cols="50">[% message | html %]</textarea>
<input class="final-submit green-btn" type="submit" value="[% loc('Post') %]">
diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html
index 7a7e433a1..217bd827e 100644
--- a/templates/web/base/questionnaire/index.html
+++ b/templates/web/base/questionnaire/index.html
@@ -70,7 +70,7 @@
<p>[% loc('If you wish to leave a public update on the problem, please enter it here
(please note it will not be sent to the council).') %]</p>
-<p><textarea name="update" rows="7" cols="30" placeholder="[% loc('What was your experience of getting the problem fixed?') %]">[% update | html %]</textarea></p>
+<p><textarea class="form-control" name="update" rows="7" cols="30" placeholder="[% loc('What was your experience of getting the problem fixed?') %]">[% update | html %]</textarea></p>
[% IF c.cobrand.allow_photo_upload %]
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
diff --git a/templates/web/base/report/new/after_photo.html b/templates/web/base/report/new/after_photo.html
index fb07ed056..b337977e4 100644
--- a/templates/web/base/report/new/after_photo.html
+++ b/templates/web/base/report/new/after_photo.html
@@ -1,5 +1,4 @@
-<div class="description_tips">
- <h4>[% loc('Tips for perfect photos') %]</h4>
+<div class="description_tips" aria-label="[% loc('Tips for perfect photos') %]">
<ul class="do">
<li>[% loc('For best results include a close-up and a wide shot') %]</li>
</ul>
diff --git a/templates/web/base/report/new/category.html b/templates/web/base/report/new/category.html
index ba6347d39..d63649083 100644
--- a/templates/web/base/report/new/category.html
+++ b/templates/web/base/report/new/category.html
@@ -1,14 +1,14 @@
[% IF category_options.size ~%]
[% IF category;
- category = category | lower;
+ category_lc = category | lower;
END; ~%]
<label for='form_category' id="form_category_label">
[%~ loc('Category') ~%]
</label>[% =%]
- <select name='category' id='form_category'>
+ <select class="form-control" name='category' id='form_category'>
[%~ FOREACH cat_op IN category_options ~%]
[% cat_op_lc = cat_op | lower =%]
- <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc || (category_options.size == 2 AND loop.last) ~%]
+ <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category_lc == cat_op_lc || (category_options.size == 2 AND loop.last) ~%]
>[% IF loop.first %][% cat_op %][% ELSE %][% cat_op | html %][% END %]</option>
[%~ END =%]
</select>
diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html
index c416556e2..6b01f93e0 100644
--- a/templates/web/base/report/new/category_extras.html
+++ b/templates/web/base/report/new/category_extras.html
@@ -1,30 +1,39 @@
-<div id="category_meta">
- [%- category = report.category -%]
+[% DEFAULT list_of_names = bodies_to_list_names %]
- [%- IF unresponsive.$category %]
- [% INCLUDE "report/new/unresponsive_body.html" body_id = unresponsive.$category %]
- [%- END %]
+<div id="category_meta">
+ [%- IF unresponsive.$category %]
+ [%# Note: this is only shown on FMS.com %]
+ [% INCLUDE "report/new/unresponsive_body.html" body_id = unresponsive.$category %]
+ [%- END %]
- [%- IF category_extras.$category.size %]
- <h4>[% loc('Additional Information') %]</h4>
- [%- FOR meta IN category_extras.$category %]
+ [%- IF category_extras.$category.size %]
+ <div class="extra-category-questions full-width">
+ <h2 class="form-section-heading">[% category %]</h2>
+ <p class="form-section-description">
+ [% tprintf(
+ loc('Help <strong>%s</strong> resolve your problem quicker, by providing some extra detail. This extra information will not be published online.'),
+ list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ ); %]
+ </p>
+ [%- FOR meta IN category_extras.$category %]
[%- meta_name = meta.code -%]
- <label for="form_[% meta_name %]">[% meta.description _ ':' %]</label>
- [% IF field_errors.$meta_name %]
- <p class='form-error'>[% field_errors.$meta_name %]</p>
- [% END -%]
- [% IF meta.variable != 'false' %]
- [% IF meta.exists('values') %]
- <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
- [% FOR option IN meta.values %]
- <option value="[% option.key %]"[% IF option.key == report_meta.$meta_name.value %] selected[% END %]>[% option.name %]</option>
- [% END %]
- </select>
- [% ELSE %]
- <input type="text" value="[% report_meta.$meta_name.value | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
- [% END %]
- [% END %]
- [%- END %]
- [%- END %]
+ <label for="form_[% meta_name %]">[% meta.description %]</label>
+ [% IF field_errors.$meta_name %]
+ <p class='form-error'>[% field_errors.$meta_name %]</p>
+ [% END -%]
+ [% IF meta.variable != 'false' %]
+ [% IF meta.exists('values') %]
+ <select class="form-control" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
+ [% FOR option IN meta.values %]
+ <option value="[% option.key %]"[% IF option.key == report_meta.$meta_name.value %] selected[% END %]>[% option.name %]</option>
+ [% END %]
+ </select>
+ [% ELSE %]
+ <input class="form-control" type="text" value="[% report_meta.$meta_name.value | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]>
+ [% END %]
+ [% END %]
+ [%- END %]
+ </div>
+ [%- END %]
</div>
diff --git a/templates/web/base/report/new/category_wrapper.html b/templates/web/base/report/new/category_wrapper.html
index f6bb618f0..85b085999 100644
--- a/templates/web/base/report/new/category_wrapper.html
+++ b/templates/web/base/report/new/category_wrapper.html
@@ -1,7 +1,7 @@
[% IF js %]
<div id="form_category_row">
<label for="form_category">[% loc('Category') %]</label>
- <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select>
+ <select class="form-control" name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select>
</div>
[% ELSE %]
[% IF category_options.size %]
diff --git a/templates/web/base/report/new/councils_extra_text.html b/templates/web/base/report/new/councils_extra_text.html
deleted file mode 100644
index b77758b01..000000000
--- a/templates/web/base/report/new/councils_extra_text.html
+++ /dev/null
@@ -1 +0,0 @@
-[% loc('The summary and description will also be made public (see our <a href="/privacy">privacy policy</a>).') %]
diff --git a/templates/web/base/report/new/councils_text.html b/templates/web/base/report/new/councils_text.html
index 65e41f0d1..bab30e8f9 100644
--- a/templates/web/base/report/new/councils_text.html
+++ b/templates/web/base/report/new/councils_text.html
@@ -1,11 +1,10 @@
[% FILTER collapse %]
-[% IF unresponsive.ALL %]
- [% PROCESS 'report/new/unresponsive_body.html' body_id = unresponsive.ALL %]
-[% ELSIF bodies_to_list.size == 0 %]
- [% PROCESS 'report/new/councils_text_none.html' %]
-[% ELSIF bodies_to_list.size == bodies.size %]
- [% PROCESS 'report/new/councils_text_all.html' %]
+[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
+ [% tprintf(
+ loc('These will be published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
+ '/privacy')
+ %]
[% ELSE %]
- [% PROCESS 'report/new/councils_text_some.html' %]
+ [% PROCESS 'report/new/councils_text_all.html' %]
[% END %]
[% END -%]
diff --git a/templates/web/base/report/new/councils_text_all.html b/templates/web/base/report/new/councils_text_all.html
index 9947625a5..9a11eaae6 100644
--- a/templates/web/base/report/new/councils_text_all.html
+++ b/templates/web/base/report/new/councils_text_all.html
@@ -1,10 +1,12 @@
+[% DEFAULT list_of_names = bodies_to_list_names %]
+
<p>
[%
tprintf(
- loc('All the information you provide here will be sent to <strong>%s</strong>.'),
- all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
+ list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ), '/privacy'
);
%]
-[% INCLUDE 'report/new/councils_extra_text.html' %]
+[% TRY %][% INCLUDE 'report/new/councils_extra_text.html' %][% CATCH file %][% END %]
</p>
diff --git a/templates/web/base/report/new/councils_text_private.html b/templates/web/base/report/new/councils_text_private.html
new file mode 100644
index 000000000..4ee7846f1
--- /dev/null
+++ b/templates/web/base/report/new/councils_text_private.html
@@ -0,0 +1,8 @@
+[% FILTER collapse %]
+[% IF unresponsive.$category OR unresponsive.ALL OR bodies_to_list.size == 0 %]
+ [% loc('These will never be shown online.') %]
+[% ELSE %]
+ [% loc('These will be sent to the council, but will never be shown online.') %]
+[% END %]
+(<a href="/privacy">[% loc('See our privacy policy') %]</a>.)
+[% END -%]
diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html
index 663b13e6a..f8714f573 100644
--- a/templates/web/base/report/new/fill_in_details_form.html
+++ b/templates/web/base/report/new/fill_in_details_form.html
@@ -4,17 +4,9 @@
<p class="change_location">[% loc('Wrong location? Just click again on the map.') %]</p>
[% END %]
-[% IF js %]
- <p id="councils_text">
- [% tprintf(
- loc('All the information you provide here will be sent to <strong>%s</strong>.'),
- loc('the local council')
- ); %]
- [% loc('The summary and description will also be made public (see our <a href="/privacy">privacy policy</a>).') %]
- </p>
-[% ELSE %]
- [% PROCESS 'report/new/councils_text.html' %]
-[% END %]
+<div id="js-top-message">
+ [% PROCESS 'report/new/top_message.html' %]
+</div>
[% IF report.used_map && partial_token %]
<p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
@@ -30,10 +22,6 @@
<fieldset>
<div id="problem_form">
[% PROCESS 'report/new/form_report.html' %]
- [% IF c.user_exists %]
- [% PROCESS "report/new/form_user_loggedin.html" %]
- [% ELSE %]
- [% PROCESS "report/new/form_user_loggedout.html" %]
- [% END %]
+ [% PROCESS 'report/new/form_user.html' %]
</div>
</fieldset>
diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html
index d9320d166..3c36bd0cc 100644
--- a/templates/web/base/report/new/form_report.html
+++ b/templates/web/base/report/new/form_report.html
@@ -4,25 +4,28 @@
<p class='form-error'>[% field_errors.bodies %]</p>
[% END %]
-[% TRY %]
- [%# Useful for amending form contents based on category selection %]
- [% PROCESS 'report/new/category_at_top.html' %]
- [% need_to_show_category_selector = 0 %]
-[% CATCH file %]
- [% need_to_show_category_selector = 1 %]
-[% END %]
+[% PROCESS "report/new/category_wrapper.html" %]
+[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
+
+ <h2 class="form-section-heading">Public details</h2>
+ <div class="form-section-description" id="js-councils_text">
+ [% IF js %]
+ [% PROCESS 'report/new/councils_text_all.html' list_of_names = [ loc('the local council') ] %]
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text.html' %]
+ [% END %]
+ </div>
- <label for="form_title">[% loc('Summarise the problem') %] [% INCLUDE 'report/public_label.html' %]</label>
+ <label for="form_title">[% loc('Summarise the problem') %]</label>
[% IF field_errors.title %]
<p class='form-error'>[% field_errors.title %]</p>
[% END %]
- <input type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% loc('10 inch pothole on Example St, near post box') %]" required>
+ <input class="form-control" type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% loc('10 inch pothole on Example St, near post box') %]" required>
[% IF c.cobrand.allow_photo_upload %]
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
<label for="form_photo">
<span data-singular="[% loc('Photo') %]" data-plural="[% loc('Photos') %]">[% loc('Photo') %]</span>
- [% INCLUDE 'report/public_label.html' %]
</label>
[% IF field_errors.photo %]
@@ -46,20 +49,14 @@
[% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %]
- <label for="form_detail">[% loc('Explain what’s wrong') %] [% INCLUDE 'report/public_label.html' %]</label>
+ <label for="form_detail">[% loc('Explain what’s wrong') %]</label>
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
- <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('This pothole has been here for two months and…') %]" required>[% report.detail | html %]</textarea>
+ <textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('This pothole has been here for two months and…') %]" required>[% report.detail | html %]</textarea>
[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %]
-[% IF need_to_show_category_selector %]
- [% PROCESS "report/new/category_wrapper.html" %]
-[% END %]
-
-[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
-
[% IF partial_token %]
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
diff --git a/templates/web/base/report/new/form_user.html b/templates/web/base/report/new/form_user.html
new file mode 100644
index 000000000..424660aa8
--- /dev/null
+++ b/templates/web/base/report/new/form_user.html
@@ -0,0 +1,15 @@
+<h2 class="form-section-heading form-section-heading--private">Private details</h2>
+<p class="form-section-description" id="js-councils_text_private">
+ [% IF js %]
+ [% loc('These will be sent to the council, but will never be shown online.') %]
+ (<a href="/privacy">[% loc('See our privacy policy') %]</a>.)
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text_private.html' %]
+ [% END %]
+</p>
+
+[% IF c.user_exists %]
+ [% PROCESS "report/new/form_user_loggedin.html" %]
+[% ELSE %]
+ [% PROCESS "report/new/form_user_loggedout.html" %]
+[% END %]
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html
index 34dd4979c..7fc1b1b5f 100644
--- a/templates/web/base/report/new/form_user_loggedin.html
+++ b/templates/web/base/report/new/form_user_loggedin.html
@@ -14,7 +14,7 @@
[% BLOCK form_as %]
<label for="form_as">[% loc('Report as') %]</label>
- <select id="form_as" class="js-contribute-as" name="form_as">
+ <select id="form_as" class="form-control js-contribute-as" name="form_as">
<option value="myself" selected>[% loc('Yourself') %]</option>
[% IF js || can_contribute_as_another_user %]
<option value="another_user">[% loc('Another user') %]</option>
@@ -26,7 +26,7 @@
[% END %]
<label for="form_email">[% loc('Email address') %]</label>
- <input id="form_email"
+ <input class="form-control" id="form_email"
[%- IF js OR can_contribute_as_another_user OR can_contribute_as_body -%]
name="email"
[%- ELSE -%]
@@ -46,7 +46,7 @@
[% IF field_errors.name %]
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" class="validName js-form-name" value="[% report.name | html %]" name="name" id="form_name">
+ <input type="text" class="form-control validName js-form-name" value="[% report.name | html %]" name="name" id="form_name">
[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
@@ -55,11 +55,7 @@
</div>
<label for="form_phone">[% loc('Phone number (optional)') %]</label>
- <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone">
-
- <div class="general-notes">
- <p>[% loc('We never show your email address or phone number.') %]</p>
- </div>
+ <input class="form-control" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone">
<div class="form-txt-submit-box">
<input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
diff --git a/templates/web/base/report/new/form_user_loggedout.html b/templates/web/base/report/new/form_user_loggedout.html
index 889834580..c444ebce4 100644
--- a/templates/web/base/report/new/form_user_loggedout.html
+++ b/templates/web/base/report/new/form_user_loggedout.html
@@ -1,6 +1,4 @@
[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %]
- <h3>[% loc("Now to submit your report&hellip;") %]</h3>
-
[% IF c.config.FACEBOOK_APP_ID %]
<div class="form-box">
<button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook">
@@ -21,7 +19,6 @@
[% PROCESS 'report/new/form_user_loggedout_email.html' required = 0 %]
[% ELSE %]
[% PROCESS 'report/new/form_user_loggedout_email.html' required = 1 %]
- <h3>[% loc("Now to submit your report&hellip;") %]</h3>
[% END %]
<div id="form_sign_in">
diff --git a/templates/web/base/report/new/form_user_loggedout_by_email.html b/templates/web/base/report/new/form_user_loggedout_by_email.html
index 0b2f3859e..409fd4bbf 100644
--- a/templates/web/base/report/new/form_user_loggedout_by_email.html
+++ b/templates/web/base/report/new/form_user_loggedout_by_email.html
@@ -14,7 +14,7 @@
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input type="text" class="form-focus-trigger validName js-form-name" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+ <input type="text" class="form-control form-focus-trigger validName js-form-name" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
[%# if there is nothing in the name field then set check box as default on form %]
<div class="checkbox-group">
@@ -23,10 +23,7 @@
</div>
<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') %]">
- <div class="general-notes form-focus-hidden">
- <p>[% loc('We never show your email address or phone number.') %]</p>
- </div>
+ <input class="form-control 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>
@@ -35,7 +32,7 @@
</div>
<div class="form-txt-submit-box form-focus-hidden">
- <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
+ <input class="form-control" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
<input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
</div>
</div>
diff --git a/templates/web/base/report/new/form_user_loggedout_email.html b/templates/web/base/report/new/form_user_loggedout_email.html
index 4f816f8cc..39e9fd779 100644
--- a/templates/web/base/report/new/form_user_loggedout_email.html
+++ b/templates/web/base/report/new/form_user_loggedout_email.html
@@ -1,9 +1,7 @@
-<label for="form_email">[% loc('Your email') %]
- <span class="muted">([% loc('We never show your email') %])</span>
-</label>
+<label for="form_email">[% loc('Your email') %]</label>
[% IF field_errors.email %]
<p class='form-error'>[% field_errors.email %]</p>
[% END %]
-<input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]"
+<input class="form-control" type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]"
[% IF required %]required[% END %]
class="required">
diff --git a/templates/web/base/report/new/form_user_loggedout_password.html b/templates/web/base/report/new/form_user_loggedout_password.html
index 0f234aeba..a4d1aefe0 100644
--- a/templates/web/base/report/new/form_user_loggedout_password.html
+++ b/templates/web/base/report/new/form_user_loggedout_password.html
@@ -7,7 +7,7 @@
<p class='form-error'>[% field_errors.password %]</p>
[% END %]
<div class="form-txt-submit-box">
- <input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
+ <input class="form-control" type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
<input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
</div>
diff --git a/templates/web/base/report/new/top_message.html b/templates/web/base/report/new/top_message.html
new file mode 100644
index 000000000..2d21c9cee
--- /dev/null
+++ b/templates/web/base/report/new/top_message.html
@@ -0,0 +1,9 @@
+[% FILTER collapse ~%]
+[%~ IF unresponsive.ALL ~%]
+ [% PROCESS 'report/new/unresponsive_body.html' body_id = unresponsive.ALL %]
+[%~ ELSIF bodies_to_list.size == 0 # On a /new page, no bodies ~%]
+ <div class="box-warning">[% PROCESS 'report/new/top_message_none.html' %]</div>
+[%~ ELSIF bodies_to_list.size != bodies.size # On a /new page, some missing bodies ~%]
+ <div class="box-warning">[% PROCESS 'report/new/top_message_some.html' %]</div>
+[%~ END ~%]
+[%~ END ~%]
diff --git a/templates/web/base/report/new/councils_text_none.html b/templates/web/base/report/new/top_message_none.html
index 6a1a2bc67..85caf944c 100644
--- a/templates/web/base/report/new/councils_text_none.html
+++ b/templates/web/base/report/new/top_message_none.html
@@ -7,7 +7,7 @@
);
%]
[%
- 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.");
+ loc("If you submit a problem here the problem will <strong>not</strong> be reported to the council.");
%]
[%
tprintf(
diff --git a/templates/web/base/report/new/councils_text_some.html b/templates/web/base/report/new/top_message_some.html
index 70cb97617..efc8fe4cc 100644
--- a/templates/web/base/report/new/councils_text_some.html
+++ b/templates/web/base/report/new/top_message_some.html
@@ -1,14 +1,4 @@
<p>
-[% loc('All the information you provide here will be sent to') %]
-
-[% FOREACH body_id IN bodies_to_list %]
- [% loc( ' or ') IF ! loop.first %]
- <strong>[% bodies.$body_id.name %]</strong>
- [%- '.' IF loop.last %]
-[% END %]
-
-[% loc('The summary and description will also be made public (see our <a href="/privacy">privacy policy</a>).') %]
-
[%
nget(
"We do <strong>not</strong> yet have details for the other council that covers this location.",
diff --git a/templates/web/base/report/public_label.html b/templates/web/base/report/public_label.html
deleted file mode 100644
index 2e00a79d2..000000000
--- a/templates/web/base/report/public_label.html
+++ /dev/null
@@ -1 +0,0 @@
-<span class="muted label-warning public-warning">[% loc('(public)') %]</span>
diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html
index dd4c12151..19c31998e 100644
--- a/templates/web/base/report/update/form_name.html
+++ b/templates/web/base/report/update/form_name.html
@@ -17,7 +17,7 @@
[% END %]
</select>
<label for="form_email">[% loc('Email address') %]</label>
- <input name="rznvy" id="form_email" type="text" value="[% c.user.email | html %]">
+ <input class="form-control" name="rznvy" id="form_email" type="text" value="[% c.user.email | html %]">
[% END %]
<label for="form_name">[% loc('Name') %]</label>
@@ -25,7 +25,7 @@
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
-<input type="text" class="validName js-form-name"
+<input type="text" class="form-control validName js-form-name"
name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
<div class="checkbox-group">
diff --git a/templates/web/base/report/update/form_user_loggedout_email.html b/templates/web/base/report/update/form_user_loggedout_email.html
index 95a3b5578..38f172148 100644
--- a/templates/web/base/report/update/form_user_loggedout_email.html
+++ b/templates/web/base/report/update/form_user_loggedout_email.html
@@ -1,6 +1,4 @@
-<label for="form_rznvy">[% loc('Your email' ) %]
-<span class="muted">([% loc('We never show your email') %])</span>
-</label>
+<label for="form_rznvy">[% loc('Your email' ) %]</label>
[% IF field_errors.email %]
<p class='form-error'>[% field_errors.email %]</p>
[% END %]
diff --git a/templates/web/bristol/report/new/category_at_top.html b/templates/web/bristol/report/new/category_at_top.html
deleted file mode 100644
index 8002eb37a..000000000
--- a/templates/web/bristol/report/new/category_at_top.html
+++ /dev/null
@@ -1 +0,0 @@
-[% PROCESS "report/new/category_wrapper.html" %] \ No newline at end of file
diff --git a/templates/web/bromley/report/new/fill_in_details_form.html b/templates/web/bromley/report/new/fill_in_details_form.html
deleted file mode 100644
index d89e5d3d5..000000000
--- a/templates/web/bromley/report/new/fill_in_details_form.html
+++ /dev/null
@@ -1,214 +0,0 @@
-<div id="report-a-problem-main">
- [% IF report.used_map %]
- <p class="change_location">[% loc('Wrong location? Just click again on the map.') %]</p>
- [% END %]
-
- [% IF js %]
- <p id="councils_text">
- [%
- tprintf(
- loc('All the information you provide here will be sent to <strong>%s</strong>.'),
- loc('the local council')
- );
- %]
- Details of the problem will be public, plus your name if you give us permission.
- </p>
- [% ELSE %]
- [% PROCESS 'report/new/councils_text.html' %]
- [% END %]
-
- <div>
- [% IF report.used_map %]
- [% IF partial_token %]
- <p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
- [% END %]
- [% ELSE %]
- <p>
- [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %]
- </p>
- [% END %]
- </div>
-
- [% INCLUDE 'errors.html' %]
- <fieldset>
- <div id="problem_form">
-
- [% INCLUDE 'report/new/form_heading.html' %]
-
-
- [% IF field_errors.bodies %]
- <p class='form-error'>[% field_errors.bodies %]</p>
- [% END %]
-
-
-
- <label for="form_title">[% loc('Subject') %]</label>
- [% IF field_errors.title %]
- <p class='form-error'>[% field_errors.title %]</p>
- [% END %]
- <input type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% loc('Provide a title') %]" required>
-
- [% IF c.cobrand.allow_photo_upload %]
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
- <label for="form_photo">
- <span data-singular="[% loc('Photo') %]" data-plural="[% loc('Photos') %]">[% loc('Photo') %]</span>
- </label>
-
- [% IF field_errors.photo %]
- <p class='form-error'>[% field_errors.photo %]</p>
- [% END %]
-
- <div id="form_photos">
- [% IF upload_fileid %]
- <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p>
- [% FOREACH id IN upload_fileid.split(',') %]
- <img align="right" src="/photo/temp.[% id %]" alt="">
- [% END %]
- [% END %]
- <input type="file" name="photo1" id="form_photo">
- <label for="form_photo2">[% loc('Photo') %]</label>
- <input type="file" name="photo2" id="form_photo2">
- <label for="form_photo3">[% loc('Photo') %]</label>
- <input type="file" name="photo3" id="form_photo3">
- </div>
- [% END %]
-
- [% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %]
-
- <label for="form_detail">[% loc('Details') %]</label>
- [% IF report.used_map %]
- <p>
- We won&rsquo;t be able to help unless you leave as much
- detail as you can. <strong>Please remember the content of this report will be public.</strong>
- </p>
- [% END %]
- [% IF field_errors.detail %]
- <p class='form-error'>[% field_errors.detail %]</p>
- [% END %]
- <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please describe the exact location of the report. Example: “2 dumped mattresses outside Number 19 Stockwell Close”') %]" required>[% report.detail | html %]</textarea>
-
- [% PROCESS "report/new/category_wrapper.html" %]
-
- [% IF c.user_exists %]
- <div class="form-box">
- [% INCLUDE 'report/new/extra_name.html' %]
-
- [% names = c.user.split_name %]
- <label for="form_first_name">[% loc('First Name') %]</label>
- [% IF field_errors.first_name %]
- <p class='form-error'>[% field_errors.first_name %]</p>
- [% END %]
- <input class="js-form-name" type="text" value="[% ( first_name || names.first ) | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
-
- <label for="form_last_name">[% loc('Last Name') %]</label>
- [% IF field_errors.last_name %]
- <p class='form-error'>[% field_errors.last_name %]</p>
- [% END %]
- <input class="js-form-name" type="text" value="[% ( last_name || names.last ) | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
-
-
- [%# if there is nothing in the name field then set check box as default on form %]
- <div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- </div>
-
- <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="general-notes">
- <p>[% loc('We never show your email address or phone number.') %]</p>
- </div>
-
- <div class="form-txt-submit-box">
- <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
- </div>
- </div>
- [% ELSE %]
-
- <label for="form_email">[% loc('Your email') %]</label>
- [% IF field_errors.email %]
- <p class='form-error'>[% field_errors.email %]</p>
- [% END %]
- <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">
-
- <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>Confirm my report by email</h5>
-
- [% INCLUDE 'report/new/extra_name.html' %]
-
- <label for="form_first_name">[% loc('First Name') %]</label>
- [% IF field_errors.first_name %]
- <p class='form-error'>[% field_errors.first_name %]</p>
- [% END %]
- <input type="text" class="form-focus-trigger js-form-name" value="[% first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
-
- <label for="form_last_name">[% loc('Last Name') %]</label>
- [% IF field_errors.last_name %]
- <p class='form-error'>[% field_errors.last_name %]</p>
- [% END %]
- <input type="text" class="form-focus-trigger js-form-name" value="[% last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
-
- [%# if there is nothing in the name field then set check box as default on form %]
- <div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- </div>
-
- <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') %]">
-
- <div class="general-notes form-focus-hidden">
- <p>[% loc('We never show your email address or phone number.') %]</p>
- </div>
-
- <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label>
-
- <div class="general-notes form-focus-hidden">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report future problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box form-focus-hidden">
- <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
- </div>
- </div>
-
- <div id="form_sign_in_yes" class="form-box">
-
- <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">
- [% IF field_errors.password %]
- <p class='form-error'>[% field_errors.password %]</p>
- [% END %]
- <input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
- <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
- </div>
-
- <div class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </div>
- </div>
-
- </div>
-
- [% END %]
-
- <p>[% loc("We will only use your personal information in accordance with our <a href=\"/faq#privacy\">privacy policy.</a>") %]</p>
-
- </div>
- </fieldset>
-
- [% IF partial_token %]
- <input type="hidden" name="partial" value="[% partial_token.token %]">
- [% END %]
-
- <input type="hidden" name="submit_problem" value="1">
-</div>
diff --git a/templates/web/bromley/report/new/form_user.html b/templates/web/bromley/report/new/form_user.html
new file mode 100644
index 000000000..71dedc600
--- /dev/null
+++ b/templates/web/bromley/report/new/form_user.html
@@ -0,0 +1,126 @@
+[%#
+ Bromley overrides form_user.html so that they link to their own
+ privacy statement in /faq#privacy, swap the order of the "confirm
+ by email" and "confirm by password" boxes, and ask people for their
+ title, first name, and last name separately.
+%]
+
+<h2 class="form-section-heading form-section-heading--private">Private details</h2>
+<p class="form-section-description">
+ [% tprintf(
+ loc('These will be sent to the council, but will never be shown online. <a href="%s">(See our privacy policy.)</a>')
+ '/faq#privacy'
+ ); %]
+</p>
+
+[% IF c.user_exists %]
+ <div class="form-box">
+ [% INCLUDE 'report/new/extra_name.html' %]
+
+ [% names = c.user.split_name %]
+ <label for="form_first_name">[% loc('First Name') %]</label>
+ [% IF field_errors.first_name %]
+ <p class='form-error'>[% field_errors.first_name %]</p>
+ [% END %]
+ <input class="form-control js-form-name" type="text" value="[% ( first_name || names.first ) | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
+
+ <label for="form_last_name">[% loc('Last Name') %]</label>
+ [% IF field_errors.last_name %]
+ <p class='form-error'>[% field_errors.last_name %]</p>
+ [% END %]
+ <input class="form-control js-form-name" type="text" value="[% ( last_name || names.last ) | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
+
+
+ [%# if there is nothing in the name field then set check box as default on form %]
+ <div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
+ </div>
+
+ <label for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="form-control" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
+
+ <div class="general-notes">
+ <p>[% loc('We never show your email address or phone number.') %]</p>
+ </div>
+
+ <div class="form-txt-submit-box">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
+ </div>
+ </div>
+[% ELSE %]
+
+ <label for="form_email">[% loc('Your email') %]</label>
+ [% IF field_errors.email %]
+ <p class='form-error'>[% field_errors.email %]</p>
+ [% END %]
+ <input class="form-control" 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">
+
+ <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>Confirm my report by email</h5>
+
+ [% INCLUDE 'report/new/extra_name.html' %]
+
+ <label for="form_first_name">[% loc('First Name') %]</label>
+ [% IF field_errors.first_name %]
+ <p class='form-error'>[% field_errors.first_name %]</p>
+ [% END %]
+ <input type="text" class="form-control form-focus-trigger js-form-name" value="[% first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]">
+
+ <label for="form_last_name">[% loc('Last Name') %]</label>
+ [% IF field_errors.last_name %]
+ <p class='form-error'>[% field_errors.last_name %]</p>
+ [% END %]
+ <input type="text" class="form-control form-focus-trigger js-form-name" value="[% last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]">
+
+ [%# if there is nothing in the name field then set check box as default on form %]
+ <div class="checkbox-group">
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
+ </div>
+
+ <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="form-control form-focus-hidden" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
+
+ <div class="general-notes form-focus-hidden">
+ <p>[% loc('We never show your email address or phone number.') %]</p>
+ </div>
+
+ <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label>
+
+ <div class="general-notes form-focus-hidden">
+ <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report future problems, leave updates and manage your reports.') %]</p>
+ </div>
+
+ <div class="form-txt-submit-box form-focus-hidden">
+ <input class="form-control" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
+ <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]">
+ </div>
+ </div>
+
+ <div id="form_sign_in_yes" class="form-box">
+
+ <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">
+ [% IF field_errors.password %]
+ <p class='form-error'>[% field_errors.password %]</p>
+ [% END %]
+ <input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
+ <input class="green-btn js-submit_sign_in" type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
+ </div>
+
+ <div class="checkbox-group">
+ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
+ <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
+ </div>
+ </div>
+
+ </div>
+
+[% END %]
diff --git a/templates/web/fixamingata/report/new/councils_text_none.html b/templates/web/fixamingata/report/new/top_message_none.html
index cdad54f18..9a9141b33 100644
--- a/templates/web/fixamingata/report/new/councils_text_none.html
+++ b/templates/web/fixamingata/report/new/top_message_none.html
@@ -1,15 +1,15 @@
<p>
-[% IF all_body_names.size == 1 %]
+[% IF bodies_to_list_names.size == 1 %]
[%
tprintf(
"%s har valt att inte ta emot rapporter från FixaMinGata, utan hänvisar fel- &amp; synpunktsrapportering till <a href='%s'>kommunens egen webbplats</a>.",
- all_body_names.first, all_body_urls.first);
+ bodies_to_list_names.first, bodies_to_list_urls.first);
%]
[% END %]
[%
- 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.");
+ loc("If you submit a problem here the problem will <strong>not</strong> be reported to the council.");
%]
-[% IF all_body_names.size != 1 %]
+[% IF bodies_to_list_names.size != 1 %]
[%
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>."),
diff --git a/templates/web/fixmystreet-uk-councils/report/new/after_category.html b/templates/web/fixmystreet-uk-councils/report/new/after_category.html
deleted file mode 100644
index 82f48e1f8..000000000
--- a/templates/web/fixmystreet-uk-councils/report/new/after_category.html
+++ /dev/null
@@ -1 +0,0 @@
-<p><small>[% loc("Remember that FixMyStreet is primarily for reporting physical problems that can be fixed. If your problem is not appropriate for submission via this site remember that you can contact your council directly using their own website.") %]</small></p>
diff --git a/templates/web/fixmystreet-uk-councils/report/new/inline-tips.html b/templates/web/fixmystreet-uk-councils/report/new/inline-tips.html
index cac01aa3f..2132de3a7 100644
--- a/templates/web/fixmystreet-uk-councils/report/new/inline-tips.html
+++ b/templates/web/fixmystreet-uk-councils/report/new/inline-tips.html
@@ -1,5 +1,4 @@
-<div class="description_tips">
- <h4>Tips for successful reports</h4>
+<div class="description_tips" aria-label="Tips for successful reports">
<ul class="do">
<li>Be polite</li>
<li>Use exact locations</li>
diff --git a/templates/web/fixmystreet.com/report/new/category_at_top.html b/templates/web/fixmystreet.com/report/new/category_at_top.html
deleted file mode 100644
index f131f37a1..000000000
--- a/templates/web/fixmystreet.com/report/new/category_at_top.html
+++ /dev/null
@@ -1 +0,0 @@
-[% PROCESS "report/new/category_wrapper.html" %]
diff --git a/templates/web/fixmystreet.com/report/new/inline-tips.html b/templates/web/fixmystreet.com/report/new/inline-tips.html
index de643b61c..b20615a28 100644
--- a/templates/web/fixmystreet.com/report/new/inline-tips.html
+++ b/templates/web/fixmystreet.com/report/new/inline-tips.html
@@ -1,7 +1,6 @@
-<div class="description_tips">
- <h4 class="description_tips__heading--inline">Tips for successful reports</h4>
- <small>(please read our <a href="/about/house-rules" target="_blank">House Rules</a>)</small>
+<div class="description_tips" aria-label="Tips for successful reports">
<ul class="do">
+ <li>Follow our <a href="/about/house-rules" target="_blank">House Rules</a></li>
<li>Be polite</li>
<li>Use exact locations</li>
<li>Say how long the issue’s been&nbsp;present</li>
diff --git a/templates/web/fixmystreet.com/report/new/unresponsive_body.html b/templates/web/fixmystreet.com/report/new/unresponsive_body.html
index d0f16d188..5089f5198 100644
--- a/templates/web/fixmystreet.com/report/new/unresponsive_body.html
+++ b/templates/web/fixmystreet.com/report/new/unresponsive_body.html
@@ -1,4 +1,4 @@
-<div class="unresponsive-council-warning">
+<div class="box-warning">
<h1>Important message</h1>
<p>
<span class="unresponsive-council">[% bodies.$body_id.name %]</span> doesn’t accept
diff --git a/templates/web/oxfordshire/report/new/inline-tips.html b/templates/web/oxfordshire/report/new/inline-tips.html
index 1194595a1..9ab3ffd23 100644
--- a/templates/web/oxfordshire/report/new/inline-tips.html
+++ b/templates/web/oxfordshire/report/new/inline-tips.html
@@ -1,5 +1,4 @@
-<div class="description_tips">
- <h4>Tips for successful reports</h4>
+<div class="description_tips" aria-label="Tips for successful reports">
<ul class="do">
<li>Be polite</li>
<li>Use exact locations (e.g. carriageway)</li>
diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html
index 9158fa090..77d764950 100644
--- a/templates/web/zurich/report/new/fill_in_details_form.html
+++ b/templates/web/zurich/report/new/fill_in_details_form.html
@@ -46,7 +46,7 @@
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
- <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea>
+ <textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea>
[% PROCESS "report/new/category_wrapper.html" %]
@@ -54,19 +54,19 @@
[% IF field_errors.email %]
<p class='form-error'>[% field_errors.email %]</p>
[% END %]
- <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required>
+ <input class="form-control" type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required>
<label for="form_name">[% loc('Name') %] [% loc('(optional)') %]</label>
[% IF field_errors.name %]
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
- <input class="js-form-name" type="text" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+ <input class="form-control js-form-name" type="text" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
<label for="form_phone">[% loc('Phone number') %]</label>
[% IF field_errors.phone %]
<p class='form-error'>[% field_errors.phone %]</p>
[% END %]
- <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]" required>
+ <input class="form-control" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]" required>
<div class="form-txt-submit-box">
[%# class of submit_sign_in so name can be optional, name of submit_register so it doesn't try and sign us in %]
diff --git a/web/cobrands/fixmystreet.com/base.scss b/web/cobrands/fixmystreet.com/base.scss
index 366ebc451..869654b87 100644
--- a/web/cobrands/fixmystreet.com/base.scss
+++ b/web/cobrands/fixmystreet.com/base.scss
@@ -106,35 +106,6 @@
}
}
-.unresponsive-council-warning {
- margin: 1em -1em;
- padding: 2em 2em;
- background-color: mix(#fff, $primary, 70%);
-
- h1 {
- font-size: 1.4em;
- }
-
- p {
- margin-bottom: 0.5em;
- }
-
- a {
- display: inline-block;
- margin-top: 0.5em;
- padding: 0.5em 1em;
- background-color: #000;
- color: #fff;
- border-radius: 0.3em;
-
- &:hover,
- &:focus {
- text-decoration: none;
- background-color: mix(#000, $primary, 70%);
- }
- }
-}
-
.unresponsive-council__header {
padding-bottom: 1em;
border-bottom: 1px solid #ccc;
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index d6e967bc3..8d45e4017 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -382,9 +382,11 @@ $.extend(fixmystreet.set_up, {
$.getJSON('/report/new/category_extras', args, function(data) {
var $category_meta = $('#category_meta');
+ $('#js-councils_text').html(data.councils_text);
+ $('#js-councils_text_private').html(data.councils_text_private);
if ( data.category_extra ) {
if ( $category_meta.length ) {
- $category_meta.html( data.category_extra );
+ $category_meta.replaceWith( data.category_extra );
} else {
$('#form_category_row').after( data.category_extra );
}
@@ -875,7 +877,9 @@ fixmystreet.update_pin = function(lonlat, savePushState) {
}
$('#side-form, #site-logo').show();
var old_category = $("select#form_category").val();
- $('#councils_text').html(data.councils_text);
+ $('#js-councils_text').html(data.councils_text);
+ $('#js-councils_text_private').html(data.councils_text_private);
+ $('#js-top-message').html(data.top_message || '');
$('#form_category_row').html(data.category);
if ($("select#form_category option[value=\""+old_category+"\"]").length) {
$("select#form_category").val(old_category);
diff --git a/web/cobrands/fixmystreet/images/padlock.png b/web/cobrands/fixmystreet/images/padlock.png
new file mode 100644
index 000000000..d5cb6d8ef
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/padlock.png
Binary files differ
diff --git a/web/cobrands/fixmystreet/images/padlock.svg b/web/cobrands/fixmystreet/images/padlock.svg
new file mode 100644
index 000000000..78fbcdc06
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/padlock.svg
@@ -0,0 +1 @@
+<svg width="16" height="18" viewBox="0 0 16 18" xmlns="http://www.w3.org/2000/svg"><title>Artboard</title><path d="M2.667 5.143V8H0v10h16V8h-2.667V5.143C13.333 2.3 10.947 0 8 0S2.667 2.3 2.667 5.143zm8 0V8H5.333V5.143c0-1.53 1.08-2.572 2.667-2.572 1.587 0 2.667 1.043 2.667 2.573z" fill="#000" fill-rule="evenodd" fill-opacity=".6"/></svg> \ No newline at end of file
diff --git a/web/cobrands/fixmystreet/images/padlock@2.png b/web/cobrands/fixmystreet/images/padlock@2.png
new file mode 100644
index 000000000..368d344e3
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/padlock@2.png
Binary files differ
diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss
index 737dab4e9..37a48badf 100644
--- a/web/cobrands/hart/hart.scss
+++ b/web/cobrands/hart/hart.scss
@@ -7,15 +7,6 @@
@import "../sass/mixins";
@import "_colours";
-// Taken from Bromley's form css
-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-family: "Gill Sans MT", "Gill Sans", Arial, 'Helvetica Neue', Helvetica, sans-serif; padding: 8px;
-@include border-radius(0); }
-
.green-btn, button.green-btn, input.green-btn {
background: #5b7189;
border: 1px solid #8e9eb0;
@@ -30,9 +21,6 @@ select { background: #fff; border: 1px solid #768b9a; border-color: #768b9a #d1d
.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 MT', 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; }
diff --git a/web/cobrands/oxfordshire/layout.scss b/web/cobrands/oxfordshire/layout.scss
index 7417b7081..c44e91586 100644
--- a/web/cobrands/oxfordshire/layout.scss
+++ b/web/cobrands/oxfordshire/layout.scss
@@ -171,7 +171,6 @@ body.mappage {
.full-width {
width: auto;
- margin: 0 -1em;
}
input[type="file"] {
@@ -267,7 +266,15 @@ h4.static-with-rule {
}
.form-box {
- background-color: darken($oxfordshire_very_light_green, 5%);
+ background-color: #e3f1d5; // darker version of $oxfordshire_very_light_green
+}
+
+.extra-category-questions {
+ background-color: #e3f1d5; // darker version of $oxfordshire_very_light_green
+
+ &:before {
+ border-bottom-color: #e3f1d5; // darker version of $oxfordshire_very_light_green
+ }
}
.shadow-wrap {
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index 8760eba97..7462682ee 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -10,6 +10,8 @@ $itemlist_item_background: #f6f6f6 !default;
$itemlist_item_background_hover: #e6e6e6 !default;
$col_big_numbers: #ccc !default;
+$form-control-border-color: #aaaaaa;
+
@import "_mixins";
@import "_report_list";
@@ -222,38 +224,6 @@ h4.static-with-rule{
/* FORMS */
-// input placeholders, these need to be on separate lines as if the browser
-// can't understand a selector it will invalidate the whole line.
-::-webkit-input-placeholder {
- color: #666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-:-moz-placeholder {
- color:#666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-:-ms-placeholder {
- color:#666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-//this only gets used when the browser doesn't support @placeholder
-.placeholder {
- color:#666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-
input[type=file] {
width: 100%;
}
@@ -263,60 +233,92 @@ input[type=password],
input[type=email],
textarea {
@include box-sizing(border-box);
+ display: block;
width: 100%;
- // adjust so the sides line up
padding: 0.5em;
-}
-.ie7 {
- input[type=text],
- input[type=password],
- input[type=email],
- textarea {
- max-width: 95%;
- }
-}
-
-textarea {
- border: 0.125em solid #888888;
- @include border-radius(0.25em);
- display: block;
- font-size: 1em;
- line-height: 1.5em;
- font-family: $meta-font;
- min-height:8em;
-}
-
-input[type=text],
-input[type=password],
-input[type=email] {
- border: 0.125em solid #888888;
- @include border-radius(0.25em);
- display: block;
font-size: 1em;
line-height: 1em;
+
+ .ie7 & {
+ max-width: 95%;
+ }
}
-input[readonly] {
- border-color: #cccccc;
- color: #888888;
+textarea {
+ line-height: 1.5em;
+ min-height: 8em;
}
label{
display: block;
margin-top: 1.25em;
- margin-bottom: 0.25em;
+ margin-bottom: 0.5em;
font-weight: bold;
+
&.inline {
display: inline;
padding: flip(0 2em 0 1em, 0 1em 0 2em);
font-weight: normal;
}
+
&.inline-text {
display: inline;
font-weight: normal;
}
}
+.form-control {
+ display: block;
+ background-color: #fff;
+ border: 1px solid $form-control-border-color;
+ @include border-radius(4px);
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
+ font-family: inherit; // eg: stop Firefox and IE10-11 using Courier in textareas
+ margin-bottom: 0.5em;
+
+ &[readonly] {
+ box-shadow: none;
+ color: #888888;
+ }
+}
+
+select.form-control {
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
+ height: 2.2em; // roughly equal to default input height
+}
+
+.form-section-heading {
+ font-family: inherit;
+ color: inherit;
+ font-weight: bold;
+ margin-bottom: 0.25em;
+}
+
+.form-section-heading--private {
+ &:before {
+ content: "";
+ display: inline-block;
+ width: 16px;
+ height: 18px;
+ background: transparent url(/cobrands/fixmystreet/images/padlock.png) 0 0 no-repeat;
+ background-size: 16px 18px;
+ margin-#{$right}: 0.5em;
+
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
+ background-image: url(/cobrands/fixmystreet/images/padlock@2.png);
+ }
+
+ @media all {
+ background-image: url(/cobrands/fixmystreet/images/padlock.svg), none;
+ }
+ }
+}
+
+.form-section-description {
+ color: #666;
+ line-height: 1em * (22/16);
+}
+
// grey background, full width box
.form-box {
margin: 0 -1em 0.25em;
@@ -387,8 +389,8 @@ label{
float: $right;
width:28%;
margin-#{$right}: 0.25em;
- padding-top:0.7em;
- padding-bottom:0.6em;
+ padding-top:0.6em;
+ padding-bottom:0.5em;
}
}
@@ -1396,10 +1398,6 @@ label .muted {
.description_tips {
@include clearfix;
- h4 {
- margin: 0.5em 0;
- }
-
ul {
width: 49%;
margin: 0;
@@ -1440,6 +1438,31 @@ label .muted {
margin-top: 0;
}
+.extra-category-questions {
+ background-color: #eee;
+ padding: 1em;
+ margin-top: 1.5em; // make room for the triangle
+ position: relative;
+
+ // An upwards pointing triangle
+ &:before {
+ content: "";
+ display: block;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 0 1em 1em 1em;
+ border-color: transparent transparent #eee transparent;
+ position: absolute;
+ top: -0.9em; // avoid hairline gap between triangle and parent
+ #{$left}: 1.5em;
+ }
+
+ & > :first-child {
+ margin-top: 0;
+ }
+}
+
table.nicetable {
width:100%;
@@ -1916,6 +1939,35 @@ table.nicetable {
}
}
+.box-warning {
+ margin: 1em -1em;
+ padding: 2em 2em;
+ background-color: mix(#fff, $primary, 70%);
+
+ h1 {
+ font-size: 1.4em;
+ }
+
+ p {
+ margin-bottom: 0.5em;
+ }
+
+ a {
+ display: inline-block;
+ margin-top: 0.5em;
+ padding: 0.5em 1em;
+ background-color: #000;
+ color: #fff;
+ border-radius: 0.3em;
+
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: mix(#000, $primary, 70%);
+ }
+ }
+}
+
@import "_admin";
@import "_fixedthead";
@import "_dropzone";
diff --git a/web/cobrands/sass/_dropzone.scss b/web/cobrands/sass/_dropzone.scss
index 3e5fc8058..432f7f6b4 100644
--- a/web/cobrands/sass/_dropzone.scss
+++ b/web/cobrands/sass/_dropzone.scss
@@ -1,18 +1,15 @@
$dropzone-link-color: #0BA7D1; // match default `a` styling
$dropzone-link-color--awakened: #0D7CCE; // match default `a:hover` styling
-$dropzone-border-color: #888; // match default form inputs
$dropzone-border-color--awakened: $dropzone-link-color--awakened;
$dropzone-border-color--full: #bf002a;
-$dropzone-border-radius: 0.25em; // match default form inputs
$dropzone-background-color: #fff;
$dropzone-background-color--awakened: mix($dropzone-link-color, $dropzone-background-color, 10%);
$dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-background-color, 10%);
.dropzone {
+ @extend .form-control;
@include clearfix;
- border: 0.125em solid $dropzone-border-color;
background-color: $dropzone-background-color;
- border-radius: $dropzone-border-radius;
padding: 1.5em;
text-align: center;
}
@@ -55,7 +52,7 @@ $dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-ba
cursor: auto;
&:hover {
- border-color: $dropzone-border-color;
+ border-color: $form-control-border-color;
background-color: $dropzone-background-color;
.dz-remove,
@@ -111,7 +108,7 @@ $dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-ba
right: 0;
bottom: 0;
- border-radius: $dropzone-border-radius;
+ border-radius: 4px;
overflow: hidden; // crop child image to border radius, even before img src has loaded
img {
@@ -144,7 +141,7 @@ $dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-ba
.dz-upload {
background: rgba(0,0,0,0.2);
- border-radius: $dropzone-border-radius;
+ border-radius: 4px;
height: 100%;
width: 0;
display: block;
diff --git a/web/cobrands/sass/_h5bp.scss b/web/cobrands/sass/_h5bp.scss
index b41effa1b..9b1c56ab5 100644
--- a/web/cobrands/sass/_h5bp.scss
+++ b/web/cobrands/sass/_h5bp.scss
@@ -37,8 +37,8 @@ html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 10
body { margin: 0; font-size: 1em; line-height: 1.5; }
/* mySociety addition: background colour */
-body, button, input, select, textarea {
- font-family: sans-serif;
+body, button {
+ font-family: sans-serif;
color: #222;
background-color: #fff
}