X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fdirections.html;h=0b4d139e1176a1d2ca432b9a006484c3924f69df;hp=1c99cda94c9b236f405d7d0d12f56a8aeaf86940;hb=4f2b07d0a7380717871aa951483a8285ea32e03e;hpb=755969fa7279b58aa965a6f488060e80ad379689 diff --git a/httemplate/view/directions.html b/httemplate/view/directions.html index 1c99cda94..0b4d139e1 100644 --- a/httemplate/view/directions.html +++ b/httemplate/view/directions.html @@ -62,8 +62,11 @@ function show_route() { if ( status == google.maps.DirectionsStatus.OK ) { directionsDisplay.setDirections(result); } else { - document.body.innerHTML = ('

Directions lookup failed with the following error: '+status+'

') - + <% include('/elements/google_maps_api_key.html' ) |js_string%>; + var errmsg = ('

Directions lookup failed with the following error: '+status+'

'); + if (status == 'REQUEST_DENIED') { + errmsg = errmsg + <% include('/elements/google_maps_api_key.html' ) |js_string%>; + } + document.body.innerHTML = errmsg; } }); }