Merged in feature/FBI-2512 (pull request #6657)
Feature/FBI-2512 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com> Approved-by: Fabio Guachalla <fabio.guachalla@processmaker.com>
This commit is contained in:
@@ -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;
|
||||
@@ -1037,7 +1038,8 @@ class PmDynaform
|
||||
workspace: workspace
|
||||
},
|
||||
token: credentials,
|
||||
submitRest: false
|
||||
submitRest: false,
|
||||
googleMaps: googleMaps
|
||||
});
|
||||
$(document).find(\"form\").submit(function (e) {
|
||||
e.preventDefault();
|
||||
@@ -1085,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" .
|
||||
@@ -1097,7 +1100,8 @@ class PmDynaform
|
||||
" workspace: workspace\n" .
|
||||
" },\n" .
|
||||
" token: credentials,\n" .
|
||||
" submitRest: false\n" .
|
||||
" submitRest: false,\n" .
|
||||
" googleMaps: googleMaps\n" .
|
||||
" });\n" .
|
||||
" $(document).find('form').find('button').on('click', function (e) {\n" .
|
||||
" e.preventDefault();\n" .
|
||||
@@ -1167,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" .
|
||||
"</script>\n" .
|
||||
"<script type='text/javascript' src='/jscore/cases/core/cases_Step.js'></script>\n" .
|
||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
|
||||
@@ -1224,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() . "
|
||||
</script>
|
||||
|
||||
<script type=\"text/javascript\" src=\"/jscore/cases/core/pmDynaform.js\"></script>
|
||||
@@ -1268,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" .
|
||||
"</script>\n" .
|
||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
|
||||
"<div style='width:100%;padding: 0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
|
||||
@@ -1310,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" .
|
||||
"</script>\n" .
|
||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
|
||||
"<div style='width:100%;padding: 0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
|
||||
@@ -1337,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 .
|
||||
"</script>";
|
||||
|
||||
@@ -1373,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" .
|
||||
"</script>\n" .
|
||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
|
||||
"<div style='width:100%;padding: 0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
|
||||
@@ -2188,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ $(window).load(function () {
|
||||
},
|
||||
token: credentials,
|
||||
submitRest: false,
|
||||
googleMaps: googleMaps,
|
||||
onLoad: function () {
|
||||
var dynaformname = document.createElement("input"),
|
||||
appuid,
|
||||
|
||||
Reference in New Issue
Block a user