diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e8ee85..751cab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Solspace Freeform Changelog +## 2.3.1 - 2018-09-13 +### Changed +- Updated reCAPTCHA field to only be allowed once per form (disappears from Special fields list when in use). +- Various tweaks and improvements for Freeform Payments compatibility. + ## 2.3.0 - 2018-09-12 ### Added - Added ability to set Mailing List fields as hidden fields (automatically opting in users). diff --git a/README.md b/README.md index 3c186ce..d155d54 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To install Freeform, simply: 1. Go to the **Plugin Store** area inside your Craft control panel and search for *Freeform*. 2. Choose to install *Freeform Lite* and/or *Freeform Pro* (*Pro* requires *Lite* to be installed) by clicking on them. 3. Click on the **Try** button to install a trial copy of Freeform. -4. Try things out and if Freeform is right for your site, purchase a copy of if through the Plugin Store when you're ready! +4. Try things out and if Freeform is right for your site, and then purchase a copy of it through the Plugin Store when you're ready! Freeform can also be installed manually through Composer: diff --git a/composer.json b/composer.json index dc05147..70df625 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "solspace/craft3-freeform-pro", "description": "Adds API integrations, premium field types, advanced exporting and widgets to Freeform.", - "version": "2.3.0", + "version": "2.3.1", "type": "craft-plugin", "minimum-stability": "dev", "authors": [ diff --git a/src/Models/ExportProfileModel.php b/src/Models/ExportProfileModel.php index da85f36..a618d90 100644 --- a/src/Models/ExportProfileModel.php +++ b/src/Models/ExportProfileModel.php @@ -11,6 +11,7 @@ use Solspace\Freeform\Library\Exceptions\FreeformException; use Solspace\Freeform\Models\FormModel; use Solspace\Freeform\Records\StatusRecord; +use Solspace\FreeformPayments\Fields\CreditCardDetailsField; class ExportProfileModel extends Model { @@ -37,6 +38,7 @@ class ExportProfileModel extends Model /** @var array */ public $statuses; + /** * @param Form $form * @@ -136,8 +138,11 @@ public function getFieldSettings(): array if (is_numeric($fieldId)) { try { $field = $form->getLayout()->getFieldById($fieldId); - $label = $field->getLabel(); + if ($field instanceof CreditCardDetailsField) { + continue; + } + $label = $field->getLabel(); $storedFieldIds[] = $field->getId(); } catch (FreeformException $e) { continue; @@ -160,7 +165,7 @@ public function getFieldSettings(): array 'label' => 'Title', 'checked' => true, ]; - $fieldSettings['ip'] = [ + $fieldSettings['ip'] = [ 'label' => 'IP', 'checked' => true, ]; @@ -168,7 +173,7 @@ public function getFieldSettings(): array 'label' => 'Date Created', 'checked' => true, ]; - $fieldSettings['status'] = [ + $fieldSettings['status'] = [ 'label' => 'Status', 'checked' => true, ]; @@ -177,6 +182,7 @@ public function getFieldSettings(): array foreach ($form->getLayout()->getFields() as $field) { if ( $field instanceof NoStorageInterface || + $field instanceof CreditCardDetailsField || !$field->getId() || \in_array($field->getId(), $storedFieldIds, true) ) { @@ -248,7 +254,7 @@ private function buildCommand(): Query $dateRangeEnd = $this->getDateRangeEnd(); if ($dateRangeEnd) { - $conditions[] = 's.[[dateCreated]] >= :dateRangeEnd'; + $conditions[] = 's.[[dateCreated]] >= :dateRangeEnd'; $parameters['dateRangeEnd'] = $dateRangeEnd->format('Y-m-d H:i:s'); }