Merged in bugfix/HOR-4921 (pull request #6661)
Bugfix/HOR-4921 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -1023,6 +1023,7 @@ class PmDynaform
|
|||||||
var isRTL = \"" . $this->isRTL . "\";
|
var isRTL = \"" . $this->isRTL . "\";
|
||||||
var pathRTLCss = \"" . $this->pathRTLCss . "\";
|
var pathRTLCss = \"" . $this->pathRTLCss . "\";
|
||||||
var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";
|
var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";
|
||||||
|
" . $this->getTheStringVariableForGoogleMaps() . "\n
|
||||||
$(window).load(function ()
|
$(window).load(function ()
|
||||||
{
|
{
|
||||||
var data = jsondata;
|
var data = jsondata;
|
||||||
@@ -1037,7 +1038,8 @@ class PmDynaform
|
|||||||
workspace: workspace
|
workspace: workspace
|
||||||
},
|
},
|
||||||
token: credentials,
|
token: credentials,
|
||||||
submitRest: false
|
submitRest: false,
|
||||||
|
googleMaps: googleMaps
|
||||||
});
|
});
|
||||||
$(document).find(\"form\").submit(function (e) {
|
$(document).find(\"form\").submit(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -1085,6 +1087,7 @@ class PmDynaform
|
|||||||
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
||||||
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
||||||
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
||||||
|
$this->getTheStringVariableForGoogleMaps() . "\n" .
|
||||||
"$(window).load(function () {\n" .
|
"$(window).load(function () {\n" .
|
||||||
" var data = jsondata;\n" .
|
" var data = jsondata;\n" .
|
||||||
" window.dynaform = new PMDynaform.core.Project({\n" .
|
" window.dynaform = new PMDynaform.core.Project({\n" .
|
||||||
@@ -1097,7 +1100,8 @@ class PmDynaform
|
|||||||
" workspace: workspace\n" .
|
" workspace: workspace\n" .
|
||||||
" },\n" .
|
" },\n" .
|
||||||
" token: credentials,\n" .
|
" token: credentials,\n" .
|
||||||
" submitRest: false\n" .
|
" submitRest: false,\n" .
|
||||||
|
" googleMaps: googleMaps\n" .
|
||||||
" });\n" .
|
" });\n" .
|
||||||
" $(document).find('form').find('button').on('click', function (e) {\n" .
|
" $(document).find('form').find('button').on('click', function (e) {\n" .
|
||||||
" e.preventDefault();\n" .
|
" e.preventDefault();\n" .
|
||||||
@@ -1167,6 +1171,7 @@ class PmDynaform
|
|||||||
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
||||||
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
||||||
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
||||||
|
$this->getTheStringVariableForGoogleMaps() . "\n" .
|
||||||
"</script>\n" .
|
"</script>\n" .
|
||||||
"<script type='text/javascript' src='/jscore/cases/core/cases_Step.js'></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" .
|
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
|
||||||
@@ -1224,6 +1229,7 @@ class PmDynaform
|
|||||||
var pathRTLCss = \"" . $this->pathRTLCss . "\";
|
var pathRTLCss = \"" . $this->pathRTLCss . "\";
|
||||||
var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";
|
var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";
|
||||||
var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";
|
var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";
|
||||||
|
" . $this->getTheStringVariableForGoogleMaps() . "
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type=\"text/javascript\" src=\"/jscore/cases/core/pmDynaform.js\"></script>
|
<script type=\"text/javascript\" src=\"/jscore/cases/core/pmDynaform.js\"></script>
|
||||||
@@ -1268,6 +1274,7 @@ class PmDynaform
|
|||||||
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
||||||
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
||||||
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
||||||
|
$this->getTheStringVariableForGoogleMaps() . "\n" .
|
||||||
"</script>\n" .
|
"</script>\n" .
|
||||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></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" .
|
"<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 pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
||||||
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? G::decrypt($this->fields["DEL_INDEX"], URL_KEY) : "0") . ";\n" .
|
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? G::decrypt($this->fields["DEL_INDEX"], URL_KEY) : "0") . ";\n" .
|
||||||
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
||||||
|
$this->getTheStringVariableForGoogleMaps() . "\n" .
|
||||||
"</script>\n" .
|
"</script>\n" .
|
||||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></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" .
|
"<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 jsonData = " . $this->json_encode($json) . ";\n" .
|
||||||
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
|
"var httpServerHostname = \"" . System::getHttpServerHostnameRequestsFrontEnd() . "\";\n" .
|
||||||
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
||||||
|
$this->getTheStringVariableForGoogleMaps() . "\n" .
|
||||||
$js .
|
$js .
|
||||||
"</script>";
|
"</script>";
|
||||||
|
|
||||||
@@ -1373,6 +1382,7 @@ class PmDynaform
|
|||||||
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
"var pathRTLCss = '" . $this->pathRTLCss . "';\n" .
|
||||||
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
"var delIndex = " . (isset($this->fields["DEL_INDEX"]) ? $this->fields["DEL_INDEX"] : "0") . ";\n" .
|
||||||
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
"var leaveCaseWarning = " . $this->getLeaveCaseWarning() . ";\n" .
|
||||||
|
$this->getTheStringVariableForGoogleMaps() . "\n" .
|
||||||
"</script>\n" .
|
"</script>\n" .
|
||||||
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></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" .
|
"<div style='width:100%;padding: 0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
|
||||||
@@ -2188,4 +2198,19 @@ class PmDynaform
|
|||||||
|
|
||||||
return $result;
|
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,
|
token: credentials,
|
||||||
submitRest: false,
|
submitRest: false,
|
||||||
|
googleMaps: googleMaps,
|
||||||
onLoad: function () {
|
onLoad: function () {
|
||||||
var dynaformname = document.createElement("input"),
|
var dynaformname = document.createElement("input"),
|
||||||
appuid,
|
appuid,
|
||||||
|
|||||||
@@ -166,7 +166,8 @@ try {
|
|||||||
if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) {
|
if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) {
|
||||||
$sType = trim(str_replace(array("class.", ".php"), "", $sObject));
|
$sType = trim(str_replace(array("class.", ".php"), "", $sObject));
|
||||||
|
|
||||||
if ($sType != "ldapAdvanced") {
|
// Filter Authentication Sources added by plugins, because these will be configured from another place
|
||||||
|
if ($sType != "ldapAdvanced" && $sType != "Gauth") {
|
||||||
$arr[] = array("sType" => $sType, "sLabel" => $sType);
|
$arr[] = array("sType" => $sType, "sLabel" => $sType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ class System
|
|||||||
'logs_max_files' => 60,
|
'logs_max_files' => 60,
|
||||||
'logs_location' => '',
|
'logs_location' => '',
|
||||||
'logging_level' => 'INFO',
|
'logging_level' => 'INFO',
|
||||||
'smtp_timeout' => 20
|
'smtp_timeout' => 20,
|
||||||
|
'google_map_api_key' => '',
|
||||||
|
'google_map_signature' => ''
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace ProcessMaker\Services\Api;
|
namespace ProcessMaker\Services\Api;
|
||||||
|
|
||||||
use AppDelegation;
|
use AppDelegation;
|
||||||
|
use Bootstrap;
|
||||||
use Cases as ClassesCases;
|
use Cases as ClassesCases;
|
||||||
use Criteria;
|
use Criteria;
|
||||||
use Exception;
|
use Exception;
|
||||||
@@ -1292,6 +1293,17 @@ class Light extends Api
|
|||||||
$oMobile = new BusinessModelLight();
|
$oMobile = new BusinessModelLight();
|
||||||
|
|
||||||
$url = "http://maps.googleapis.com/maps/api/staticmap?center=" . $latitude . ',' . $longitude . "&format=jpg&size=600x600&zoom=15&markers=color:blue%7Clabel:S%7C" . $latitude . ',' . $longitude;
|
$url = "http://maps.googleapis.com/maps/api/staticmap?center=" . $latitude . ',' . $longitude . "&format=jpg&size=600x600&zoom=15&markers=color:blue%7Clabel:S%7C" . $latitude . ',' . $longitude;
|
||||||
|
|
||||||
|
$config = Bootstrap::getSystemConfiguration();
|
||||||
|
$googleMapApiKey = $config['google_map_api_key'];
|
||||||
|
$googleMapSignature = $config['google_map_signature'];
|
||||||
|
if(!empty($googleMapApiKey)){
|
||||||
|
$url .= "&key=" . $googleMapApiKey;
|
||||||
|
}
|
||||||
|
if(!empty($googleMapSignature)){
|
||||||
|
$url .= "&signature=" . $googleMapSignature;
|
||||||
|
}
|
||||||
|
|
||||||
$imageLocation = imagecreatefromjpeg($url);
|
$imageLocation = imagecreatefromjpeg($url);
|
||||||
$tmpfname = tempnam(sys_get_temp_dir(), "pmm");
|
$tmpfname = tempnam(sys_get_temp_dir(), "pmm");
|
||||||
imagejpeg($imageLocation, $tmpfname);
|
imagejpeg($imageLocation, $tmpfname);
|
||||||
|
|||||||
Reference in New Issue
Block a user