X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcoord-links.html;h=586a7109da89c16c1c803361f880fd93fd242be8;hb=f2ee4eec34fea420c1c434194e410f31b6c9edb0;hp=c885ade87e5b4e8de443d70b8057c3aaf2b3ac38;hpb=e91ed1c4a81c25757f812b3ec8238645b836b235;p=freeside.git diff --git a/httemplate/elements/coord-links.html b/httemplate/elements/coord-links.html index c885ade87..586a7109d 100644 --- a/httemplate/elements/coord-links.html +++ b/httemplate/elements/coord-links.html @@ -40,15 +40,19 @@ my $query = 'name='. uri_escape_utf8($name). ';lon='. $longitude; my $js_name = $name; -$js_name =~ s/[<>"]/ /g; +$js_name =~ s/[<>"']/ /g; $m->interp->apply_escapes($js_name, 'js_string'); $js_name =~ s/^'//; $js_name =~ s/'$//; +my $conf = new FS::Conf; +my $apikey = $conf->config('google_maps_api_key'); + #for directions link my @origin = $opt{company_address} ? @{ $opt{company_address} } - : FS::Conf->new->config('company_address', $agentnum); + : ( $conf->config('company_physical_address', $agentnum) || + $conf->config('company_address', $agentnum) ); my $origin = uri_escape(join(',', @origin));