From: Jonathan Prykop Date: Wed, 4 Jan 2017 23:16:01 +0000 (-0600) Subject: 73107: Map regression: now always requiring API key [apikey errmsg limited to REQUEST... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=4f2b07d0a7380717871aa951483a8285ea32e03e;ds=sidebyside 73107: Map regression: now always requiring API key [apikey errmsg limited to REQUEST_DENIED] --- 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; } }); }