diff options
-rw-r--r-- | perllib/Page.pm | 46 | ||||
-rw-r--r-- | web/css/emptyhomes.css | 13 | ||||
-rwxr-xr-x | web/index.cgi | 6 |
3 files changed, 39 insertions, 26 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 040cb59f8..c1649986c 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.149 2009-07-10 16:10:21 matthew Exp $ +# $Id: Page.pm,v 1.150 2009-07-10 17:24:50 matthew Exp $ # package Page; @@ -153,14 +153,14 @@ sub header ($%) { open FP, $file . '/../templates/website/' . $q->{site} . '-header'; $html = join('', <FP>); close FP; - my %vars; + my %vars; if ($q->{site} eq 'emptyhomes') { - my $lang_url = mySociety::Config::get('BASE_URL'); - if ($lang eq 'en-gb') { - $lang_url =~ s{http://}{$&cy.}; - } else { - $lang_url =~ s{http://}{$&en.}; - } + my $lang_url = mySociety::Config::get('BASE_URL'); + if ($lang eq 'en-gb') { + $lang_url =~ s{http://}{$&cy.}; + } else { + $lang_url =~ s{http://}{$&en.}; + } %vars = ( 'report' => _('Report a problem'), 'reports' => _('All reports'), @@ -528,10 +528,12 @@ sub os_to_px_with_adjust { } # send_email TO (NAME) TEMPLATE-NAME PARAMETERS -# TEMPLATE-NAME is currently one of _(problem), update, alert, tms +# TEMPLATE-NAME is currently one of problem, update, alert, tms sub send_email { my ($q, $email, $name, $thing, %h) = @_; - my $template = "$thing-confirm"; + my $file_thing = $thing; + $file_thing = 'empty property' if $q->{site} eq 'emptyhomes' && $thing eq 'problem'; # Needs to be in English + my $template = "$file_thing-confirm"; $template = File::Slurp::read_file("$FindBin::Bin/../templates/emails/$template"); $template =~ s/FixMyStreet/Envirocrime/ if $q->{site} eq 'scambs'; my $to = $name ? [[$email, $name]] : $email; @@ -544,21 +546,27 @@ sub send_email { To => $to, }, $email); - my $action = 'posted'; # problem, update - if ($thing eq 'alert') { - $action = 'activated'; + my ($action, $worry); + if ($thing eq 'problem') { + $action = _('your problem will not be posted'); + $worry = _("we'll hang on to your problem report while you're checking your email."); + } elsif ($thing eq 'update') { + $action = _('your update will not be posted'); + $worry = _("we'll hang on to your update while you're checking your email."); + } elsif ($thing eq 'alert') { + $action = _('your alert will not be activated'); + $worry = _("we'll hang on to your alert while you're checking your email."); } elsif ($thing eq 'tms') { - $action = 'registered'; + $action = 'your expression of interest will not be registered'; + $worry = "we'll hang on to your expression of interest while you're checking your email."; } - $thing .= ' report' if $thing eq _('problem'); - $thing = 'expression of interest' if $thing eq 'tms'; - my $out = sprintf(_(<<EOF), $thing, $action, $thing); + my $out = sprintf(_(<<EOF), $action, $worry); <h1>Nearly Done! Now check your email...</h1> <p>The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.</p> <p>If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.</p> <p>You must now click the link in the email we've just sent you — -if you do not, your %s will not be %s.</p> -<p>(Don't worry — we'll hang on to your %s while you're checking your email.)</p> +if you do not, %s.</p> +<p>(Don't worry — %s)</p> EOF return $out; } diff --git a/web/css/emptyhomes.css b/web/css/emptyhomes.css index 0afca77a3..121242415 100644 --- a/web/css/emptyhomes.css +++ b/web/css/emptyhomes.css @@ -77,7 +77,7 @@ blockquote { font-size: 200%; font-weight: bold; margin: 0; - padding: 5px 0.5em; + padding: 5px 0; float: left; } @@ -102,6 +102,10 @@ blockquote { list-style-type: none; font-size: 83%; } +#navigation ul { + padding: 0; + margin: 0; +} #navigation li { display: inline; padding: 0; @@ -111,7 +115,7 @@ blockquote { #navigation a { display: -moz-inline-box; display: inline-block; - padding: 0.5em 1em; + padding: 0.5em 0.5em; } #navigation a:link, #navigation a:visited { color: #30517A; @@ -154,13 +158,14 @@ blockquote { #postcodeForm { background-color: #80AE7D; color: #000000; + font-size: 130%; } #front_stats div { background-color: #80AE7D; color: #000000; - /*padding: 0.5em 0; - width: 6em; */ + /*padding: 0.5em 0; */ + width: 9em; } #problem_form { diff --git a/web/index.cgi b/web/index.cgi index b8ef91cda..0201dd908 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.258 2009-07-10 15:17:29 matthew Exp $ +# $Id: index.cgi,v 1.259 2009-07-10 17:24:50 matthew Exp $ use strict; use Standard; @@ -408,7 +408,7 @@ Please <a href="/contact">let us know what went on</a> and we\'ll look into it.' $h{url} = $base . '/P/' . mySociety::AuthToken::store('problem', $id); dbh()->commit(); - $out = Page::send_email($q, $input{email}, $input{name}, _('problem'), %h); + $out = Page::send_email($q, $input{email}, $input{name}, 'problem', %h); } return $out; @@ -807,7 +807,7 @@ sub display_location { $out .= <<EOF; <p id="alert_links_area"> <a id="email_alert" rel="nofollow" href="$email_me_link">$email_me</a> - | <a href="/rss/$x,$y" id="rss_alert"><span>RSS feed</span> <img src="/i/feed.png" width="16" height="16" title="$rss_title" alt="$rss_alt" border="0" style="vertical-align: top"></a> + | <a href="/rss/$x,$y" id="rss_alert"><span>$rss_alt</span> <img src="/i/feed.png" width="16" height="16" title="$rss_title" alt="$rss_alt" border="0" style="vertical-align: top"></a> </p> EOF if (@errors) { |