Skip to content

Commit f93ce4f

Browse files
committed
Couple of fixes ... calc JS (if observed element is in repeat group), paypal (extra logging), map viz (API key on static map usage)
1 parent 7809a40 commit f93ce4f

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

plugins/fabrik_element/calc/calc-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/fabrik_element/calc/calc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ define(['jquery', 'fab/element'], function (jQuery, FbElement) {
6767
this.form.repeatGroupMarkers.each(function (v, k) {
6868
o2 = '';
6969
for (v2 = 0; v2 < v; v2++) {
70-
o2 = 'join___' + this.form.options.group_join_ids[k] + '___' + o + '_' + v2;
70+
o2 = o + '_' + v2;
7171
if (this.form.formElements[o2]) {
7272
// $$$ hugh - think we can add this one as sticky ...
7373
this.form.formElements[o2].addNewEvent(this.form.formElements[o2].getChangeEvent(),
@@ -86,7 +86,7 @@ define(['jquery', 'fab/element'], function (jQuery, FbElement) {
8686
var testData = $H(this.form.getFormData(false));
8787

8888
testData.each(function (v, k) {
89-
if (k.test(/^join\[\d+\]/) || k.test(/^fabrik_vars/)) {
89+
if (k.test(/\[\d+\]$/) || k.test(/^fabrik_vars/)) {
9090
formData[k] = v;
9191
}
9292
}.bind(this));

plugins/fabrik_form/paypal/paypal.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ public function onAfterProcess()
189189
$subDb->setQuery($query);
190190
$sub = $subDb->loadObject();
191191

192+
// Log the query
193+
$this->doLog('fabrik.paypal.onAfterProcess.debug', "Subscription query: " . (string)$query);
194+
195+
192196
if (is_object($sub))
193197
{
194198
$opts['p3'] = $sub->p3;

plugins/fabrik_visualization/googlemap/models/googlemap.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,27 @@ public function getStaticMap()
711711

712712
$uri = JURI::getInstance();
713713
$src = $uri->getScheme() . "://maps.google.com/staticmap?center=$lat,$lon&zoom={$z}&size={$w}x{$h}&maptype=mobile$iconStr";
714+
715+
$config = JComponentHelper::getParams('com_fabrik');
716+
$apiKey = $config->get('google_api_key', '');
717+
$client = $config->get('google_buisness_client_id', '');
718+
$signature = $config->get('google_buisness_signature', '');
719+
720+
if ($client !== '')
721+
{
722+
if ($signature === '')
723+
{
724+
throw new Exception('You have entered a Google Maps Business Client id, but have not supplied a signature value');
725+
}
726+
727+
$src .= '&client=' . $client;
728+
$src .= '&signature=' . $signature;
729+
}
730+
elseif ($apiKey !== '')
731+
{
732+
$src .= '&key=' . $apiKey;
733+
}
734+
714735
$str = '<img src="' . $src . '" alt="static map" />';
715736

716737
return $str;

0 commit comments

Comments
 (0)