diff --git a/workflow/engine/classes/PmDynaform.php b/workflow/engine/classes/PmDynaform.php index 309bd9384..9a11b3d1e 100644 --- a/workflow/engine/classes/PmDynaform.php +++ b/workflow/engine/classes/PmDynaform.php @@ -1085,6 +1085,7 @@ class PmDynaform "var pathRTLCss = '" . $this->pathRTLCss . "';\n" . "var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" . "var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" . + $this->getTheStringVariableForGoogleMaps() . "\n" . "$(window).load(function () {\n" . " var data = jsondata;\n" . " window.dynaform = new PMDynaform.core.Project({\n" . @@ -1167,6 +1168,7 @@ class PmDynaform "var pathRTLCss = '" . $this->pathRTLCss . "';\n" . "var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" . "var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" . + $this->getTheStringVariableForGoogleMaps() . "\n" . "\n" . "\n" . "\n" . @@ -1224,6 +1226,7 @@ class PmDynaform var pathRTLCss = \"" . $this->pathRTLCss . "\"; var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . "; var leaveCaseWarning = " . $this->getLeaveCaseWarning() . "; + " . $this->getTheStringVariableForGoogleMaps() . " @@ -1268,6 +1271,7 @@ class PmDynaform "var pathRTLCss = '" . $this->pathRTLCss . "';\n" . "var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" . "var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" . + $this->getTheStringVariableForGoogleMaps() . "\n" . "\n" . "\n" . "
\n" . @@ -1310,6 +1314,7 @@ class PmDynaform "var pathRTLCss = '" . $this->pathRTLCss . "';\n" . "var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? G::decrypt($this->fields["DEL_INDEX"], URL_KEY) : "0") . ";\n" . "var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" . + $this->getTheStringVariableForGoogleMaps() . "\n" . "\n" . "\n" . "
\n" . @@ -1337,6 +1342,7 @@ class PmDynaform "var jsonData = " . $this->json_encode($json) . ";\n" . "var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" . "var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" . + $this->getTheStringVariableForGoogleMaps() . "\n" . $js . ""; @@ -1373,6 +1379,7 @@ class PmDynaform "var pathRTLCss = '" . $this->pathRTLCss . "';\n" . "var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" . "var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" . + $this->getTheStringVariableForGoogleMaps() . "\n" . "\n" . "\n" . "
\n" . @@ -2188,4 +2195,19 @@ class PmDynaform return $result; } + + /** + * Get the string variable for google maps + * + * @return string + */ + private function getTheStringVariableForGoogleMaps() + { + $config = Bootstrap::getSystemConfiguration(); + $googleMaps = new stdClass(); + $googleMaps->key = $config['google_map_api_key']; + $googleMaps->signature = $config['google_map_signature']; + $result = 'var googleMaps = ' . G::json_encode($googleMaps) . ';'; + return $result; + } }