buildbot exception in on ofbizTrunkFrameworkPlugins
The Buildbot has detected a build exception on builder ofbizTrunkFrameworkPlugins while building ofbiz-framework. Full details are available at: https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/2109 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: downstream Build Source Stamp: [branch trunk] c4b106e1b1d4a9e4fbc74849a40965d9691e4951 Blamelist: Jacques Le Roux BUILD FAILED: exception build upload test-results part 1 Sincerely, -The Buildbot
[ofbiz-framework] branch release18.12 updated (847a400 -> ad58224)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a change to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git. from 847a400 Fixed: Display rather than edit the From Date field of a Product Config Item Content when updating the content. new 7778b76 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) new 81654fc Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) new ad58224 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: framework/common/config/CommonUiLabels.xml| 4 framework/common/config/general.properties| 9 ++--- themes/common-theme/template/includes/GeoLocation.ftl | 19 --- 3 files changed, 22 insertions(+), 10 deletions(-)
[ofbiz-framework] 02/03: Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit 81654fc155c2d6d54914b4daf731525271be71ad Author: Jacques Le Roux AuthorDate: Sat May 29 12:52:18 2021 +0200 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) Better way to handle a missing Google API key --- .../common-theme/template/includes/GeoLocation.ftl | 23 +++--- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/themes/common-theme/template/includes/GeoLocation.ftl b/themes/common-theme/template/includes/GeoLocation.ftl index e840487..d265a88 100644 --- a/themes/common-theme/template/includes/GeoLocation.ftl +++ b/themes/common-theme/template/includes/GeoLocation.ftl @@ -35,14 +35,19 @@ under the License. <#-- = Google Maps Init ==--> - <#assign googleApiKey = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general", "googleApiKey", delegator)> - <#if geoChart.dataSourceId?has_content && googleApiKey?has_content> + <#if geoChart.dataSourceId?has_content> <#if "GOOGLE" == geoChart.dataSourceId?substring(geoChart.dataSourceId?length-6 , geoChart.dataSourceId?length)> - -${uiLabelMap.CommonLoading} - - https://maps.googleapis.com/maps/api/js?key=googleApiKey" type="application/javascript"> +<#assign googleApiKey = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general", "googleApiKey", delegator)> + +${uiLabelMap.CommonLoading} + +<#if !googleApiKey?has_content> + ${uiLabelMap.CommonNoGoogleAPIkeyAvailable} + https://maps.googleapis.com/maps/api/js" type="application/javascript"> +<#else> + https://maps.googleapis.com/maps/api/js?key=googleApiKey" type="application/javascript"> + <#-- == Here we go with different types of maps renderer ===--> <#if "GEOPT_GOOGLE" == geoChart.dataSourceId> @@ -178,7 +183,3 @@ under the License. <#else> ${uiLabelMap.CommonNoGeolocationAvailable} - -<#if !googleApiKey?has_content> - ${uiLabelMap.CommonNoGoogleAPIkeyAvailable} -
[ofbiz-framework] 03/03: Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit ad5822461412e8caa2daa1a152c8c15fa9afe708 Author: Jacques Le Roux AuthorDate: Sun May 30 06:22:24 2021 +0200 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) Fixes the call to the Google API key Thanks to Daniel --- themes/common-theme/template/includes/GeoLocation.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/common-theme/template/includes/GeoLocation.ftl b/themes/common-theme/template/includes/GeoLocation.ftl index d265a88..908e586 100644 --- a/themes/common-theme/template/includes/GeoLocation.ftl +++ b/themes/common-theme/template/includes/GeoLocation.ftl @@ -46,7 +46,7 @@ under the License. ${uiLabelMap.CommonNoGoogleAPIkeyAvailable} https://maps.googleapis.com/maps/api/js" type="application/javascript"> <#else> - https://maps.googleapis.com/maps/api/js?key=googleApiKey" type="application/javascript"> + https://maps.googleapis.com/maps/api/js?key=${googleApiKey}" type="application/javascript"> <#-- == Here we go with different types of maps renderer ===-->
[ofbiz-framework] 01/03: Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit 7778b7692db43d34967bdd80c89c6fb104e01966 Author: Jacques Le Roux AuthorDate: Sat May 29 12:06:16 2021 +0200 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) This is related to this question from Daniel at https://github.com/apache/ofbiz-framework/pull/220 I couldn't figure out how to configure OFBiz with my Google API key so ended up temporarily patching themes/common-theme/template/includes/GeoLocation.ftl line 44 with my key. Line 44 looked similar to: https://maps.googleapis.com/maps/api/js?key=secret_google_api_key" type="application/javascript"> Is there a way to configure ofbiz with the API key? Disclaimer: w/o a not free "Google API key" I was not able to test, will ask Daniel... Conflicts handled by hand framework/common/config/general.properties --- framework/common/config/CommonUiLabels.xml| 4 framework/common/config/general.properties| 9 ++--- themes/common-theme/template/includes/GeoLocation.ftl | 18 +++--- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml index 97df8b7..e0cdccd 100644 --- a/framework/common/config/CommonUiLabels.xml +++ b/framework/common/config/CommonUiLabels.xml @@ -7559,6 +7559,10 @@ 没有可用的地理位置(作为演示,你可以使用演示客户会员资料) 沒有可用的地理位置(若作為Demo,你可以使用 DemoCustomer 團體相關資料) + +No Google API key Available +Aucune clef d'API Google disponible + لا يوجد خيار: _NA_ Žádné volby: _NA_ diff --git a/framework/common/config/general.properties b/framework/common/config/general.properties index 40976b5..37e3db5 100644 --- a/framework/common/config/general.properties +++ b/framework/common/config/general.properties @@ -77,7 +77,7 @@ usps.address.match=(^.*?p[\\. ]*o[\\. ]*box.*$)|(^.*?post.*?office.*?box.*$)|((^ defaultFromEmailAddress=ofbizt...@example.com # -- The default domainname used in the notification emails links -# as 'baseUrl' and 'baseSecureUrl' are set in the url.properties file. +# as 'baseUrl' and 'baseSecureUrl' are set in the url.properties file. # -- mail notifications enabled (Y|N) mail.notifications.enabled=N @@ -131,8 +131,11 @@ mail.spam.value=YES # -- HTTP JSON settings http.json.xssi.prefix=// -# -- Save Entity Sync Remove Info. This is used in the context of Entity Sync, doc currently updated, WIP at OFBIZ-10390... -saveEntitySyncRemoveInfo=false +# -- Save Entity Sync Remove Info. This is used in the context of Entity Sync, doc currently updated, WIP at OFBIZ-10390... +saveEntitySyncRemoveInfo=false # -- Y if you want to display the multi-tenant textbox in the login page and install specify components which related to each tenant multitenant=N + +# -- Google API key, by default none, this is not free +googleApiKey= \ No newline at end of file diff --git a/themes/common-theme/template/includes/GeoLocation.ftl b/themes/common-theme/template/includes/GeoLocation.ftl index 33d98cf..e840487 100644 --- a/themes/common-theme/template/includes/GeoLocation.ftl +++ b/themes/common-theme/template/includes/GeoLocation.ftl @@ -31,19 +31,19 @@ under the License. <#assign center = geoChart.points[0]> <#assign zoom = 15> <#-- 0=World, 19=max zoom in --> <#else> - <#-- hardcoded in GEOPT_ADDRESS_GOOGLE, simpler --> +<#-- hardcoded in GEOPT_ADDRESS_GOOGLE, simpler --> <#-- = Google Maps Init ==--> - <#if geoChart.dataSourceId?has_content> + <#assign googleApiKey = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general", "googleApiKey", delegator)> + <#if geoChart.dataSourceId?has_content && googleApiKey?has_content> <#if "GOOGLE" == geoChart.dataSourceId?substring(geoChart.dataSourceId?length-6 , geoChart.dataSourceId?length)> - + ${uiLabelMap.CommonLoading} - -https://maps.googleapis.com/maps/api/js?sensor=false" type="application/javascript"> + + https://maps.googleapis.com/maps/api/js?key=googleApiKey" type="application/javascript"> - <#-- == Here we go with different types of maps renderer ===--> <#if "GEOPT_GOOGLE" == geoChart.dataSourceId>
[ofbiz-framework] branch trunk updated: Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new c4b106e Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) c4b106e is described below commit c4b106e1b1d4a9e4fbc74849a40965d9691e4951 Author: Jacques Le Roux AuthorDate: Sun May 30 06:22:24 2021 +0200 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) Fixes the call to the Google API key Thanks to Daniel --- themes/common-theme/template/includes/GeoLocation.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/common-theme/template/includes/GeoLocation.ftl b/themes/common-theme/template/includes/GeoLocation.ftl index e56e818..4615f60 100644 --- a/themes/common-theme/template/includes/GeoLocation.ftl +++ b/themes/common-theme/template/includes/GeoLocation.ftl @@ -46,7 +46,7 @@ under the License. ${uiLabelMap.CommonNoGoogleAPIkeyAvailable} https://maps.googleapis.com/maps/api/js" type="application/javascript"> <#else> - https://maps.googleapis.com/maps/api/js?key=googleApiKey" type="application/javascript"> + https://maps.googleapis.com/maps/api/js?key=${googleApiKey}" type="application/javascript"> <#-- == Here we go with different types of maps renderer ===-->
buildbot failure in on ofbizBranch18FrameworkPlugins
The Buildbot has detected a new failure on builder ofbizBranch18FrameworkPlugins while building ofbiz-plugins. Full details are available at: https://ci.apache.org/builders/ofbizBranch18FrameworkPlugins/builds/557 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf947_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'onBranch18PluginsCommit' triggered this build Build Source Stamp: [branch release18.12] 485e3b89d712879ce3d96b27ae092a4e134b0bf0 Blamelist: Jacques Le Roux BUILD FAILED: failed shell_7 Sincerely, -The Buildbot
[ofbiz-plugins] branch trunk updated: Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git The following commit(s) were added to refs/heads/trunk by this push: new e51dccb Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386) e51dccb is described below commit e51dccb9bb49f5ed32df0af3f9fd2da88980df56 Author: Jacques Le Roux AuthorDate: Sat May 29 15:47:21 2021 +0200 Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386) Steps to generate: Open https://demo-trunk.ofbiz.apache.org/ecomseo/viewprofile On the profile page, Go down to Contact list Empty fields are displaying before Verify Subscription button Expected: The field should have some specifications to be filled up Thanks: Archana Asthana for report, Devanshu Vyas for suggestion, Praveen Patil for patch and Thirumurugan for confirming --- ecommerce/template/customer/ViewProfile.ftl | 2 +- ecommerce/widget/CommonScreens.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ecommerce/template/customer/ViewProfile.ftl b/ecommerce/template/customer/ViewProfile.ftl index 3e85814..d2ced6e 100644 --- a/ecommerce/template/customer/ViewProfile.ftl +++ b/ecommerce/template/customer/ViewProfile.ftl @@ -510,7 +510,7 @@ under the License. ${uiLabelMap.CommonThruDate} ${uiLabelMap.CommonStatus} ${uiLabelMap.CommonEmail} - +${uiLabelMap.MarketingContactListOptInVerifyCode} <#list contactListPartyList as contactListParty> diff --git a/ecommerce/widget/CommonScreens.xml b/ecommerce/widget/CommonScreens.xml index 7f54f70..78d50ad 100644 --- a/ecommerce/widget/CommonScreens.xml +++ b/ecommerce/widget/CommonScreens.xml @@ -31,6 +31,7 @@ under the License. +
[ofbiz-plugins] branch release18.12 updated: Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git The following commit(s) were added to refs/heads/release18.12 by this push: new 485e3b8 Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386) 485e3b8 is described below commit 485e3b89d712879ce3d96b27ae092a4e134b0bf0 Author: Jacques Le Roux AuthorDate: Sat May 29 15:47:21 2021 +0200 Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386) Steps to generate: Open https://demo-trunk.ofbiz.apache.org/ecomseo/viewprofile On the profile page, Go down to Contact list Empty fields are displaying before Verify Subscription button Expected: The field should have some specifications to be filled up Thanks: Archana Asthana for report, Devanshu Vyas for suggestion, Praveen Patil for patch and Thirumurugan for confirming --- ecommerce/template/customer/ViewProfile.ftl | 2 +- ecommerce/widget/CommonScreens.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ecommerce/template/customer/ViewProfile.ftl b/ecommerce/template/customer/ViewProfile.ftl index e7211f1..e938122 100644 --- a/ecommerce/template/customer/ViewProfile.ftl +++ b/ecommerce/template/customer/ViewProfile.ftl @@ -509,7 +509,7 @@ under the License. ${uiLabelMap.CommonThruDate} ${uiLabelMap.CommonStatus} ${uiLabelMap.CommonEmail} - +${uiLabelMap.MarketingContactListOptInVerifyCode} <#list contactListPartyList as contactListParty> diff --git a/ecommerce/widget/CommonScreens.xml b/ecommerce/widget/CommonScreens.xml index ed1dafb..d7557a7 100644 --- a/ecommerce/widget/CommonScreens.xml +++ b/ecommerce/widget/CommonScreens.xml @@ -31,6 +31,7 @@ under the License. +
[ofbiz-plugins] branch release17.12 updated: Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release17.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git The following commit(s) were added to refs/heads/release17.12 by this push: new 2ba0afe Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386) 2ba0afe is described below commit 2ba0afe458e51897b9a354fc3dddc49ad4e38b00 Author: Jacques Le Roux AuthorDate: Sat May 29 15:47:21 2021 +0200 Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386) Steps to generate: Open https://demo-trunk.ofbiz.apache.org/ecomseo/viewprofile On the profile page, Go down to Contact list Empty fields are displaying before Verify Subscription button Expected: The field should have some specifications to be filled up Thanks: Archana Asthana for report, Devanshu Vyas for suggestion, Praveen Patil for patch and Thirumurugan for confirming --- ecommerce/template/customer/ViewProfile.ftl | 2 +- ecommerce/widget/CommonScreens.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ecommerce/template/customer/ViewProfile.ftl b/ecommerce/template/customer/ViewProfile.ftl index 0395738..a211e69 100644 --- a/ecommerce/template/customer/ViewProfile.ftl +++ b/ecommerce/template/customer/ViewProfile.ftl @@ -509,7 +509,7 @@ under the License. ${uiLabelMap.CommonThruDate} ${uiLabelMap.CommonStatus} ${uiLabelMap.CommonEmail} - +${uiLabelMap.MarketingContactListOptInVerifyCode} <#list contactListPartyList as contactListParty> diff --git a/ecommerce/widget/CommonScreens.xml b/ecommerce/widget/CommonScreens.xml index 00e5cd8..2bddbd0 100644 --- a/ecommerce/widget/CommonScreens.xml +++ b/ecommerce/widget/CommonScreens.xml @@ -31,6 +31,7 @@ under the License. +
[ofbiz-framework] branch trunk updated: Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new de5d1f8 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) de5d1f8 is described below commit de5d1f8fc4619772f066eafb86b9fe028c5f0cfb Author: Jacques Le Roux AuthorDate: Sat May 29 12:52:18 2021 +0200 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) Better way to handle a missing Google API key --- .../common-theme/template/includes/GeoLocation.ftl | 23 +++--- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/themes/common-theme/template/includes/GeoLocation.ftl b/themes/common-theme/template/includes/GeoLocation.ftl index e66c5c5..e56e818 100644 --- a/themes/common-theme/template/includes/GeoLocation.ftl +++ b/themes/common-theme/template/includes/GeoLocation.ftl @@ -35,14 +35,19 @@ under the License. <#-- = Google Maps Init ==--> - <#assign googleApiKey = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general", "googleApiKey", delegator)> - <#if geoChart.dataSourceId?has_content && googleApiKey?has_content> + <#if geoChart.dataSourceId?has_content> <#if "GOOGLE" == geoChart.dataSourceId?substring(geoChart.dataSourceId?length-6 , geoChart.dataSourceId?length)> - -${uiLabelMap.CommonLoading} - - https://maps.googleapis.com/maps/api/js?key=googleApiKey" type="application/javascript"> +<#assign googleApiKey = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general", "googleApiKey", delegator)> + +${uiLabelMap.CommonLoading} + +<#if !googleApiKey?has_content> + ${uiLabelMap.CommonNoGoogleAPIkeyAvailable} + https://maps.googleapis.com/maps/api/js" type="application/javascript"> +<#else> + https://maps.googleapis.com/maps/api/js?key=googleApiKey" type="application/javascript"> + <#-- == Here we go with different types of maps renderer ===--> <#if "GEOPT_GOOGLE" == geoChart.dataSourceId> @@ -181,7 +186,3 @@ under the License. <#else> ${uiLabelMap.CommonNoGeolocationAvailable} - -<#if !googleApiKey?has_content> - ${uiLabelMap.CommonNoGoogleAPIkeyAvailable} -
[ofbiz-framework] branch trunk updated: Make latitude and longitude numeric fields for correct comparisons (#220)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new d288e12 Make latitude and longitude numeric fields for correct comparisons (#220) d288e12 is described below commit d288e12030fc75ffe0419c17b2f3f96e96fbf397 Author: fehnomenal AuthorDate: Sat May 29 12:07:19 2021 +0200 Make latitude and longitude numeric fields for correct comparisons (#220) --- framework/common/entitydef/entitymodel.xml| 4 ++-- .../src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/common/entitydef/entitymodel.xml b/framework/common/entitydef/entitymodel.xml index 490a941..37b8133 100644 --- a/framework/common/entitydef/entitymodel.xml +++ b/framework/common/entitydef/entitymodel.xml @@ -286,8 +286,8 @@ under the License. - - + + UOM for elevation (feet, meters, etc.) To enter any related information diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java index 5b5604b..654c44a 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java @@ -954,6 +954,8 @@ public final class SqlJdbcUtil { public static void addValueSingle(StringBuilder buffer, ModelField field, Object value, List params) { if (field != null) { buffer.append('?'); +} else if (value instanceof Number) { +buffer.append(value); } else { buffer.append('\''); if (value instanceof String) {
[ofbiz-framework] branch trunk updated: Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new fec6559 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) fec6559 is described below commit fec6559e7b3f82604514868b0de72a9e47758d7a Author: Jacques Le Roux AuthorDate: Sat May 29 12:06:16 2021 +0200 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247) This is related to this question from Daniel at https://github.com/apache/ofbiz-framework/pull/220 I couldn't figure out how to configure OFBiz with my Google API key so ended up temporarily patching themes/common-theme/template/includes/GeoLocation.ftl line 44 with my key. Line 44 looked similar to: https://maps.googleapis.com/maps/api/js?key=secret_google_api_key" type="application/javascript"> Is there a way to configure ofbiz with the API key? Disclaimer: w/o a not free "Google API key" I was not able to test, will ask Daniel... --- framework/common/config/CommonUiLabels.xml| 4 framework/common/config/general.properties| 11 +++ themes/common-theme/template/includes/GeoLocation.ftl | 18 +++--- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml index edb167f..f29cd55 100644 --- a/framework/common/config/CommonUiLabels.xml +++ b/framework/common/config/CommonUiLabels.xml @@ -7692,6 +7692,10 @@ 没有可用的地理位置(作为演示,你可以使用演示客户会员资料) 沒有可用的地理位置(若作為Demo,你可以使用 DemoCustomer 團體相關資料) + +No Google API key Available +Aucune clef d'API Google disponible + لا يوجد خيار: _NA_ Žádné volby: _NA_ diff --git a/framework/common/config/general.properties b/framework/common/config/general.properties index e2c8fce..c755f65 100644 --- a/framework/common/config/general.properties +++ b/framework/common/config/general.properties @@ -35,7 +35,7 @@ VISUAL_THEME=RAINBOWSTONE_SAPHIR #start getting "resource not found" exceptions, then there are #properties missing in the locale you specified. This property does not #control the default locale - the default locale is set in start.properties. -# +# locale.properties.fallback=en # -- Locales made available, separated by commas. This property controls @@ -71,7 +71,7 @@ defaultFromEmailAddress=ofbizt...@example.com defaultFromTelecomAddress=IOFBIZ # -- The default domainname used in the notification emails links -# as 'baseUrl' and 'baseSecureUrl' are set in the url.properties file. +# as 'baseUrl' and 'baseSecureUrl' are set in the url.properties file. # -- mail notifications enabled (Y|N) mail.notifications.enabled=N @@ -131,11 +131,14 @@ http.upload.max.size=-1 # -- HTTP JSON settings http.json.xssi.prefix=// -# -- Save Entity Sync Remove Info. This is used in the context of Entity Sync, doc currently updated, WIP at OFBIZ-10390... -saveEntitySyncRemoveInfo=false +# -- Save Entity Sync Remove Info. This is used in the context of Entity Sync, doc currently updated, WIP at OFBIZ-10390... +saveEntitySyncRemoveInfo=false # -- Y if you want to display the multi-tenant textbox in the login page and install specify components which related to each tenant multitenant=N # -- Default User Documentation website uri userDocUri=https://ci.apache.org/projects/ofbiz/site/trunk/ofbizdoc/html5/user-manual.html + +# -- Google API key, by default none, this is not free +googleApiKey= diff --git a/themes/common-theme/template/includes/GeoLocation.ftl b/themes/common-theme/template/includes/GeoLocation.ftl index d27b494..e66c5c5 100644 --- a/themes/common-theme/template/includes/GeoLocation.ftl +++ b/themes/common-theme/template/includes/GeoLocation.ftl @@ -31,19 +31,19 @@ under the License. <#assign center = geoChart.points[0]> <#assign zoom = 15> <#-- 0=World, 19=max zoom in --> <#else> - <#-- hardcoded in GEOPT_ADDRESS_GOOGLE, simpler --> +<#-- hardcoded in GEOPT_ADDRESS_GOOGLE, simpler --> <#-- = Google Maps Init ==--> - <#if geoChart.dataSourceId?has_content> + <#assign googleApiKey = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general", "googleApiKey", delegator)> + <#if geoChart.dataSourceId?has_content && googleApiKey?has_content> <#if "GOOGLE" == geoChart.dataSourceId?substring(geoChart.dataSourceId?length-6 , geoChart.dataSourceId?length)> - + ${uiLabelMap.CommonLoading} - -https://maps.googleapis.com/maps/api/js?sensor=false" type="application/javascript"> + +