diff --git a/workflow/engine/classes/PmDynaform.php b/workflow/engine/classes/PmDynaform.php index 081cc176f..f614521d3 100644 --- a/workflow/engine/classes/PmDynaform.php +++ b/workflow/engine/classes/PmDynaform.php @@ -1023,6 +1023,7 @@ class PmDynaform var isRTL = \"" . $this->isRTL . "\"; var pathRTLCss = \"" . $this->pathRTLCss . "\"; var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . "; + " . $this->getTheStringVariableForGoogleMaps() . "\n $(window).load(function () { var data = jsondata; @@ -1086,6 +1087,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" . @@ -1169,6 +1171,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" . @@ -1226,6 +1229,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() . " @@ -1270,6 +1274,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" . @@ -1312,6 +1317,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" . @@ -1339,6 +1345,7 @@ class PmDynaform "var jsonData = " . $this->json_encode($json) . ";\n" . "var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" . "var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" . + $this->getTheStringVariableForGoogleMaps() . "\n" . $js . ""; @@ -1375,6 +1382,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" . @@ -2190,4 +2198,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; + } }