diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2017-01-04 17:16:01 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2017-01-04 17:18:13 -0600 |
commit | f77dd2bc29c902f3c4adc6f8832e835c101711c7 (patch) | |
tree | 8d6b89ee2826b8f3c967503496fc076c59bc7041 /httemplate | |
parent | 018d026dcffae93d0cd23639cbd1d57065c17e21 (diff) |
73107: Map regression: now always requiring API key [apikey errmsg limited to REQUEST_DENIED]
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/view/directions.html | 7 |
1 files changed, 5 insertions, 2 deletions
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 = ('<P STYLE="color: red;">Directions lookup failed with the following error: '+status+'</P>') - + <% include('/elements/google_maps_api_key.html' ) |js_string%>; + var errmsg = ('<P STYLE="color: red;">Directions lookup failed with the following error: '+status+'</P>'); + if (status == 'REQUEST_DENIED') { + errmsg = errmsg + <% include('/elements/google_maps_api_key.html' ) |js_string%>; + } + document.body.innerHTML = errmsg; } }); } |