summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/agent_payment_gateway.html2
-rwxr-xr-xhttemplate/edit/cust_pkg_discount.html10
-rw-r--r--httemplate/elements/tr-select-pkg-discount.html4
-rwxr-xr-xhttemplate/misc/bulk_change_pkg.cgi28
-rwxr-xr-xhttemplate/misc/bulk_pkg_increment_bill.cgi28
-rwxr-xr-xhttemplate/misc/process/bulk_change_pkg.cgi39
-rwxr-xr-xhttemplate/misc/process/bulk_pkg_increment_bill.cgi40
-rwxr-xr-xhttemplate/misc/process/cancel_pkg.html2
-rw-r--r--httemplate/search/cust_credit_bill_pkg.html2
-rw-r--r--httemplate/search/cust_msg.html5
-rwxr-xr-xhttemplate/search/cust_pkg.cgi2
-rw-r--r--httemplate/search/elements/grouped-search/core2
-rw-r--r--httemplate/search/elements/grouped-search/html10
-rwxr-xr-xhttemplate/search/report_cust_pkg.html62
-rw-r--r--httemplate/view/cust_main/packages/package.html2
-rwxr-xr-xhttemplate/view/cust_msg.html4
-rw-r--r--httemplate/view/directions.html3
17 files changed, 201 insertions, 44 deletions
diff --git a/httemplate/edit/agent_payment_gateway.html b/httemplate/edit/agent_payment_gateway.html
index 753bc763c..6d15164ac 100644
--- a/httemplate/edit/agent_payment_gateway.html
+++ b/httemplate/edit/agent_payment_gateway.html
@@ -12,6 +12,8 @@ Use gateway <SELECT NAME="gatewaynum">
% foreach my $payment_gateway (
% qsearch('payment_gateway', { 'disabled' => '' } )
% ) {
+% # don't let these be selected as agent overrides; there's a different mechanism
+% next if $payment_gateway->gateway_namespace eq 'Business::BatchPayment';
%
<OPTION VALUE="<% $payment_gateway->gatewaynum %>"><% $payment_gateway->gateway_module %> (<% $payment_gateway->gateway_username %>)
diff --git a/httemplate/edit/cust_pkg_discount.html b/httemplate/edit/cust_pkg_discount.html
index e1e3daede..79c347813 100755
--- a/httemplate/edit/cust_pkg_discount.html
+++ b/httemplate/edit/cust_pkg_discount.html
@@ -1,13 +1,17 @@
<& /elements/header-popup.html, "Discount Package" &>
<& /elements/error.html &>
-<FORM NAME="DiscountPkgForm" ACTION="<% $p %>edit/process/cust_pkg_discount.html" METHOD=POST>
+<FORM NAME = "DiscountPkgForm"
+ ACTION = "<% $p %>edit/process/cust_pkg_discount.html"
+ METHOD = POST
+ onSubmit = "document.DiscountPkgForm.submit.disabled=true;"
+>
<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
<% ntable('#cccccc') %>
<TR>
- <TH ALIGN="right">Current package&nbsp;</TH>
+ <TH ALIGN="right">Package&nbsp;</TH>
<TD COLSPAN=7>
<% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %>
</TD>
@@ -18,6 +22,8 @@
curr_value_recur => $recur_discountnum,
disable_setup => $disable_setup,
disable_recur => $disable_recur,
+ setup_label => emt('Setup fee discount'),
+ recur_label => emt('Recurring fee discount'),
&>
</TABLE>
diff --git a/httemplate/elements/tr-select-pkg-discount.html b/httemplate/elements/tr-select-pkg-discount.html
index dc38cff3e..0c57fd89e 100644
--- a/httemplate/elements/tr-select-pkg-discount.html
+++ b/httemplate/elements/tr-select-pkg-discount.html
@@ -34,7 +34,7 @@ description if curr_value_setup is set. Likewise "disable_recur".
% if ( $curuser->access_right('Waive setup fee') ) {
% push @$pre_options, -2 => 'Waive setup fee';
% }
-<& tr-td-label.html, label => emt('Setup fee') &>
+<& tr-td-label.html, label => $opt{setup_label} || emt('Setup fee') &>
<td>
<& select-discount.html,
field => 'setup_discountnum',
@@ -97,7 +97,7 @@ description if curr_value_setup is set. Likewise "disable_recur".
% if ( $curuser->access_right('Discount customer package')
% and !$opt{disable_recur} ) {
-<& tr-td-label.html, label => emt('Recurring fee') &>
+<& tr-td-label.html, label => $opt{recur_label} || emt('Recurring fee') &>
<td>
<& select-discount.html,
field => 'recur_discountnum',
diff --git a/httemplate/misc/bulk_change_pkg.cgi b/httemplate/misc/bulk_change_pkg.cgi
index 4964e598f..6ed272fb8 100755
--- a/httemplate/misc/bulk_change_pkg.cgi
+++ b/httemplate/misc/bulk_change_pkg.cgi
@@ -10,16 +10,32 @@
%# some false laziness w/search/cust_pkg.cgi
<INPUT TYPE="hidden" NAME="query" VALUE="<% $cgi->keywords |h %>">
-% for my $param (qw(agentnum custnum magic status classnum custom censustract)) {
-<INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
-% }
+% for my $param (
+% qw(
+% agentnum cust_status cust_main_salesnum salesnum custnum magic status
+% custom pkgbatch zip
+% 477part 477rownum date
+% report_option
+% ),
+% grep { /^location_\w+$/ || /^report_option_any/ } $cgi->param
+% ) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
+% }
+%
+% for my $param (qw( censustract censustract2 ) ) {
+% next unless grep { $_ eq $param } $cgi->param;
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
+% }
%
-% foreach my $pkgpart ($cgi->param('pkgpart')) {
-<INPUT TYPE="hidden" NAME="pkgpart" VALUE="<% $pkgpart |h %>">
+% for my $param (qw( pkgpart classnum refnum towernum )) {
+% foreach my $value ($cgi->param($param)) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $value |h %>">
+% }
% }
%
-% foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
+% foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) {
%
+ <INPUT TYPE="hidden" NAME="<% $field %>_null" VALUE="<% $cgi->param("${field}_null") |h %>">
<INPUT TYPE="hidden" NAME="<% $field %>begin" VALUE="<% $cgi->param("${field}.begin") |h %>">
<INPUT TYPE="hidden" NAME="<% $field %>beginning" VALUE="<% $cgi->param("${field}beginning") |h %>">
<INPUT TYPE="hidden" NAME="<% $field %>end" VALUE="<% $cgi->param("${field}.end") |h %>">
diff --git a/httemplate/misc/bulk_pkg_increment_bill.cgi b/httemplate/misc/bulk_pkg_increment_bill.cgi
index d594b558a..fc9bbc893 100755
--- a/httemplate/misc/bulk_pkg_increment_bill.cgi
+++ b/httemplate/misc/bulk_pkg_increment_bill.cgi
@@ -10,16 +10,32 @@
%# some false laziness w/search/cust_pkg.cgi
<INPUT TYPE="hidden" NAME="query" VALUE="<% $cgi->keywords |h %>">
-% for my $param (qw(agentnum custnum magic status classnum custom censustract)) {
-<INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
-% }
+% for my $param (
+% qw(
+% agentnum cust_status cust_main_salesnum salesnum custnum magic status
+% custom pkgbatch zip
+% 477part 477rownum date
+% report_option
+% ),
+% grep { /^location_\w+$/ || /^report_option_any/ } $cgi->param
+% ) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
+% }
+%
+% for my $param (qw( censustract censustract2 ) ) {
+% next unless grep { $_ eq $param } $cgi->param;
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
+% }
%
-% foreach my $pkgpart ($cgi->param('pkgpart')) {
-<INPUT TYPE="hidden" NAME="pkgpart" VALUE="<% $pkgpart |h %>">
+% for my $param (qw( pkgpart classnum refnum towernum )) {
+% foreach my $value ($cgi->param($param)) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $value |h %>">
+% }
% }
%
-% foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
+% foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) {
%
+ <INPUT TYPE="hidden" NAME="<% $field %>_null" VALUE="<% $cgi->param("${field}_null") |h %>">
<INPUT TYPE="hidden" NAME="<% $field %>begin" VALUE="<% $cgi->param("${field}.begin") |h %>">
<INPUT TYPE="hidden" NAME="<% $field %>beginning" VALUE="<% $cgi->param("${field}beginning") |h %>">
<INPUT TYPE="hidden" NAME="<% $field %>end" VALUE="<% $cgi->param("${field}.end") |h %>">
diff --git a/httemplate/misc/process/bulk_change_pkg.cgi b/httemplate/misc/process/bulk_change_pkg.cgi
index e22dafef0..2432f3cb3 100755
--- a/httemplate/misc/process/bulk_change_pkg.cgi
+++ b/httemplate/misc/process/bulk_change_pkg.cgi
@@ -11,16 +11,43 @@ my %search_hash = ();
$search_hash{'query'} = $cgi->param('query');
-for my $param (qw(agentnum magic status classnum pkgpart)) {
- $search_hash{$param} = $cgi->param($param)
- if $cgi->param($param);
+#scalars
+for (qw( agentnum cust_status cust_main_salesnum salesnum custnum magic status
+ custom cust_fields pkgbatch zip
+ 477part 477rownum date
+ ))
+{
+ $search_hash{$_} = $cgi->param($_) if length($cgi->param($_));
+}
+
+#arrays
+for my $param (qw( pkgpart classnum refnum towernum )) {
+ $search_hash{$param} = [ $cgi->param($param) ]
+ if grep { $_ eq $param } $cgi->param;
+}
+
+#scalars that need to be passed if empty
+for my $param (qw( censustract censustract2 )) {
+ $search_hash{$param} = $cgi->param($param) || ''
+ if grep { $_ eq $param } $cgi->param;
+}
+
+#location flags (checkboxes)
+my @loc = grep /^\w+$/, $cgi->param('loc');
+$search_hash{"location_$_"} = 1 foreach @loc;
+
+my $report_option = $cgi->param('report_option');
+$search_hash{report_option} = $report_option if $report_option;
+
+for my $param (grep /^report_option_any/, $cgi->param) {
+ $search_hash{$param} = $cgi->param($param);
}
###
# parse dates
###
-#false laziness w/report_cust_pkg.html
+#false laziness w/report_cust_pkg.html and bulk_pkg_increment_bill.cgi
my %disable = (
'all' => {},
'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, },
@@ -30,7 +57,9 @@ my %disable = (
'' => {},
);
-foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
+foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) {
+
+ $search_hash{$field.'_null'} = scalar( $cgi->param($field.'_null') );
my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);
diff --git a/httemplate/misc/process/bulk_pkg_increment_bill.cgi b/httemplate/misc/process/bulk_pkg_increment_bill.cgi
index d89f49120..48c9de759 100755
--- a/httemplate/misc/process/bulk_pkg_increment_bill.cgi
+++ b/httemplate/misc/process/bulk_pkg_increment_bill.cgi
@@ -25,17 +25,43 @@ my %search_hash = ();
$search_hash{'query'} = $cgi->param('query');
-for my $param (qw(agentnum magic status classnum pkgpart)) {
- $search_hash{$param} = $cgi->param($param)
- if $cgi->param($param);
+#scalars
+for (qw( agentnum cust_status cust_main_salesnum salesnum custnum magic status
+ custom cust_fields pkgbatch zip
+ 477part 477rownum date
+ ))
+{
+ $search_hash{$_} = $cgi->param($_) if length($cgi->param($_));
+}
+
+#arrays
+for my $param (qw( pkgpart classnum refnum towernum )) {
+ $search_hash{$param} = [ $cgi->param($param) ]
+ if grep { $_ eq $param } $cgi->param;
+}
+
+#scalars that need to be passed if empty
+for my $param (qw( censustract censustract2 )) {
+ $search_hash{$param} = $cgi->param($param) || ''
+ if grep { $_ eq $param } $cgi->param;
+}
+
+#location flags (checkboxes)
+my @loc = grep /^\w+$/, $cgi->param('loc');
+$search_hash{"location_$_"} = 1 foreach @loc;
+
+my $report_option = $cgi->param('report_option');
+$search_hash{report_option} = $report_option if $report_option;
+
+for my $param (grep /^report_option_any/, $cgi->param) {
+ $search_hash{$param} = $cgi->param($param);
}
###
# parse dates
###
-#false laziness w/report_cust_pkg.html
-# and, now, w/bulk_change_pkg.cgi
+#false laziness w/report_cust_pkg.html and bulk_change_pkg.cgi
my %disable = (
'all' => {},
'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, },
@@ -45,7 +71,9 @@ my %disable = (
'' => {},
);
-foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
+foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) {
+
+ $search_hash{$field.'_null'} = scalar( $cgi->param($field.'_null') );
my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);
diff --git a/httemplate/misc/process/cancel_pkg.html b/httemplate/misc/process/cancel_pkg.html
index 7e33e15c0..cb20712f0 100755
--- a/httemplate/misc/process/cancel_pkg.html
+++ b/httemplate/misc/process/cancel_pkg.html
@@ -1,4 +1,4 @@
-<& /elements/popup-topreload.html, et("Package $past_method") &>
+<& /elements/popup-topreload.html, emt("Package $past_method") &>
<%once>
my %past = ( 'cancel' => 'cancelled',
diff --git a/httemplate/search/cust_credit_bill_pkg.html b/httemplate/search/cust_credit_bill_pkg.html
index 0cdd8defd..4a14893e8 100644
--- a/httemplate/search/cust_credit_bill_pkg.html
+++ b/httemplate/search/cust_credit_bill_pkg.html
@@ -457,6 +457,8 @@ if ( $cgi->param('nottax') ) {
push @where, "billpkgtaxratelocationnum IS NULL";
}
+ $join_pkg .= ' LEFT JOIN cust_pkg USING ( pkgnum ) ';
+
$join_pkg .= ' LEFT JOIN tax_rate_location USING ( taxratelocationnum ) ';
} elsif ( $conf->exists('tax-pkg_address') ) {
diff --git a/httemplate/search/cust_msg.html b/httemplate/search/cust_msg.html
index 33e1815c6..65460f7b9 100644
--- a/httemplate/search/cust_msg.html
+++ b/httemplate/search/cust_msg.html
@@ -19,7 +19,10 @@
ucfirst($_[0]->msgtype) || $_[0]->msgname
},
sub {
- join('<BR>', split(/,\s*/, $_[0]->env_to) )
+ join('<BR>',
+ map { encode_entities($_->format) }
+ Email::Address->parse($_[0]->env_to)
+ )
},
'status',
sub { encode_entities($_[0]->error) },
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index dbd346dba..df1d7e589 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -203,6 +203,8 @@ my %disable = (
foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) {
+ $search_hash{$field.'_null'} = scalar( $cgi->param($field.'_null') );
+
my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);
next if $beginning == 0 && $ending == 4294967295
diff --git a/httemplate/search/elements/grouped-search/core b/httemplate/search/elements/grouped-search/core
index 3d38a8c7e..b15fe8659 100644
--- a/httemplate/search/elements/grouped-search/core
+++ b/httemplate/search/elements/grouped-search/core
@@ -110,7 +110,7 @@ for my $i (0 .. scalar(@groups) - 1) {
push @group_labels, $label;
my @footer;
- if ($opt{'subtotal_row'}) {
+ if ($opt{'subtotal_row'} and @groups > 1) {
for( my $col = 0;
exists($opt{'subtotal_row'}[$col]) or exists($opt{'header'}[$col]);
$col++
diff --git a/httemplate/search/elements/grouped-search/html b/httemplate/search/elements/grouped-search/html
index 9c2418af8..28d00404b 100644
--- a/httemplate/search/elements/grouped-search/html
+++ b/httemplate/search/elements/grouped-search/html
@@ -106,14 +106,18 @@ if ($group_info->{num} > 1) {
&>
<DIV CLASS="fstabcontainer">
+% if ( $group->num_rows > 0 ) {
+<P><% emt('[quant,_1,_2]', $group->num_rows, $opt{name_singular}) %>
+</P>
%# download links
-<P><% emt('Download full results') %><BR>
+<P><% emt('Download results:') %>
% $cgi->param('type', 'xls');
-<A HREF="<% $cgi->self_url %>"><% emt('as Excel spreadsheet') %></A><BR>
+<A HREF="<% $cgi->self_url %>"><% emt('Spreadsheet') %></A>&nbsp;|&nbsp;
% $cgi->param('type', 'html-print');
-<A HREF="<% $cgi->self_url %>"><% emt('as printable copy') %></A><BR>
+<A HREF="<% $cgi->self_url %>"><% emt('webpage') %></A>
% $cgi->delete('type');
</P>
+% }
<% $pager %>
diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html
index 27aececc9..556177c8a 100755
--- a/httemplate/search/report_cust_pkg.html
+++ b/httemplate/search/report_cust_pkg.html
@@ -80,6 +80,7 @@
what.form.<% $field %>_beginning_text.disabled = true;
what.form.<% $field %>_ending_text.disabled = true;
+ what.form.<% $field %>_null.disabled = true;
what.form.<% $field %>_beginning_text.style.backgroundColor = '#dddddd';
what.form.<% $field %>_ending_text.style.backgroundColor = '#dddddd';
@@ -90,15 +91,21 @@
% } else {
- what.form.<% $field %>_beginning_text.disabled = false;
- what.form.<% $field %>_ending_text.disabled = false;
- what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff';
- what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff';
+ what.form.<% $field %>_null.disabled = false;
- what.form.<% $field %>_beginning_button.style.display = '';
- what.form.<% $field %>_ending_button.style.display = '';
- what.form.<% $field %>_beginning_disabled.style.display = 'none';
- what.form.<% $field %>_ending_disabled.style.display = 'none';
+ if ( ! what.form.<% $field %>_null.checked ) {
+
+ what.form.<% $field %>_beginning_text.disabled = false;
+ what.form.<% $field %>_ending_text.disabled = false;
+ what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff';
+ what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff';
+
+ what.form.<% $field %>_beginning_button.style.display = '';
+ what.form.<% $field %>_ending_button.style.display = '';
+ what.form.<% $field %>_beginning_disabled.style.display = 'none';
+ what.form.<% $field %>_ending_disabled.style.display = 'none';
+
+ }
% }
% }
@@ -109,6 +116,37 @@
}
+% foreach my $field (@date_fields) {
+
+ function <% $field %>_null_changed(what) {
+
+ if ( what.checked ) {
+ what.form.<% $field %>_beginning_text.disabled = true;
+ what.form.<% $field %>_ending_text.disabled = true;
+ what.form.<% $field %>_beginning_text.style.backgroundColor = '#dddddd';
+ what.form.<% $field %>_ending_text.style.backgroundColor = '#dddddd';
+ what.form.<% $field %>_beginning_button.style.display = 'none';
+ what.form.<% $field %>_ending_button.style.display = 'none';
+ what.form.<% $field %>_beginning_disabled.style.display = '';
+ what.form.<% $field %>_ending_disabled.style.display = '';
+
+ } else {
+ what.form.<% $field %>_beginning_text.disabled = false;
+ what.form.<% $field %>_ending_text.disabled = false;
+ what.form.<% $field %>_beginning_text.style.backgroundColor = '#ffffff';
+ what.form.<% $field %>_ending_text.style.backgroundColor = '#ffffff';
+
+ what.form.<% $field %>_beginning_button.style.display = '';
+ what.form.<% $field %>_ending_button.style.display = '';
+ what.form.<% $field %>_beginning_disabled.style.display = 'none';
+ what.form.<% $field %>_ending_disabled.style.display = 'none';
+
+ }
+
+ }
+
+% }
+
</SCRIPT>
<& /elements/tr-select-pkg_class.html,
@@ -135,6 +173,7 @@
<TD></TD>
<TD>From date <i>(m/d/y)</i></TD>
<TD>To date <i>(m/d/y)</i></TD>
+ <TD>Empty date</TD>
</TR>
% my $noinit = 0;
% foreach my $field (@date_fields) {
@@ -152,6 +191,13 @@
</TD>
% $noinit = 1;
% }
+ <TD ALIGN="center">
+ <& /elements/checkbox.html,
+ 'field' => $field.'_null',
+ 'value' => 'Y',
+ 'onchange' => $field.'_null_changed',
+ &>
+ </TD>
</TR>
% } #foreach $field
</TABLE>
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index 14f7fb006..dd15c7b71 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -268,7 +268,7 @@
&& ! $cust_pkg->get('cancel')
&& $can_discount_pkg
},
- popup => "edit/cust_pkg_discount.html?$plink".
+ popup => "edit/cust_pkg_discount.html?$plink",
actionlabel => emt('Discount package'),
width => 616,
},
diff --git a/httemplate/view/cust_msg.html b/httemplate/view/cust_msg.html
index 91a08ebda..d2b043c92 100755
--- a/httemplate/view/cust_msg.html
+++ b/httemplate/view/cust_msg.html
@@ -61,7 +61,9 @@ $custmsgnum =~ /^(\d+)$/ or die "illegal custmsgnum";
my $cust_msg = qsearchs('cust_msg', { 'custmsgnum' => $custmsgnum });
my $date = '';
$date = time2str('%Y-%m-%d %T', $cust_msg->_date) if ( $cust_msg->_date );
-my $env_to = join('</TD></TR><TR><TD></TD><TD>', split(',', $cust_msg->env_to));
+my @to = map { encode_entities($_->format) }
+ Email::Address->parse($cust_msg->env_to);
+my $env_to = join('</TD></TR><TR><TD></TD><TD>', @to);
my %label = (
'sent' => 'Sent:',
diff --git a/httemplate/view/directions.html b/httemplate/view/directions.html
index 8377d129a..1c99cda94 100644
--- a/httemplate/view/directions.html
+++ b/httemplate/view/directions.html
@@ -62,7 +62,8 @@ function show_route() {
if ( status == google.maps.DirectionsStatus.OK ) {
directionsDisplay.setDirections(result);
} else {
- document.body.innerHTML = ('<P STYLE="color: red;">Directions lookup failed with the following error: '+status+'</P>');
+ document.body.innerHTML = ('<P STYLE="color: red;">Directions lookup failed with the following error: '+status+'</P>')
+ + <% include('/elements/google_maps_api_key.html' ) |js_string%>;
}
});
}