diff options
author | louise <louise> | 2009-09-15 14:01:14 +0000 |
---|---|---|
committer | louise <louise> | 2009-09-15 14:01:14 +0000 |
commit | 0703bdf30c6785a3eee4ac92554484c646f619e7 (patch) | |
tree | 15c74c8dec0e10c74ae4faaad4bae69dcd70bbec | |
parent | 014e00454f5b8845d01c8eb8546f1beddb483b11 (diff) |
Adding function for returning the text to prompt a user to enter their postcode
-rw-r--r-- | perllib/Cobrand.pm | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm index 8b827013e..3151d82ec 100644 --- a/perllib/Cobrand.pm +++ b/perllib/Cobrand.pm @@ -7,7 +7,7 @@ # Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved. # Email: louise@mysociety.org. WWW: http://www.mysociety.org # -# $Id: Cobrand.pm,v 1.14 2009-09-14 15:08:46 louise Exp $ +# $Id: Cobrand.pm,v 1.15 2009-09-15 14:01:14 louise Exp $ package Cobrand; use strict; @@ -191,5 +191,27 @@ sub front_stats { return $handle->front_stats(); } } + +=item + +Return the text that prompts the user to enter their postcode/place name + +=cut + +sub enter_postcode_text { + + my ($cobrand, $q) = @_; + my $handle; + if ($cobrand){ + $handle = cobrand_handle($cobrand); + } + if ( !$cobrand || !$handle || !$handle->can('enter_postcode_text')){ + return _("Enter a nearby GB postcode, or street name and area:"); + } else{ + return $handle->enter_postcode_text($q); + } +} + 1; + |