Skip to content

Commit 8675624

Browse files
Ivan Ruževićclaude
andauthored
feature/pardot-integration (#635)
* docs: add Pardot integration design spec Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat: add Pardot cross-cutting setup (variables, labels, fallback flags) * feat: add OauthPardot and SettingsPardot (Salesforce OAuth + admin settings) * feat: add PardotClient — form handlers, fields, submit via form handler URL * feat: add Pardot mapper — auto-builds form components from handler fields * feat: add Pardot REST routes (OAuth callback, items, form submit, test API) * feat: wire Pardot integration into Filters and FiltersSettingsBuilder * feat: add Pardot Gutenberg block files and register block Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * update * fix: remove invalid pageSize param from Pardot API requests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * update * docs: rewrite Pardot spec to JIRA-style manual integration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * update * updating setup * updating setup * updating setup * update * updating setup * Bump version to 9.7.0 and update changelog * updating setup --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0ed9099 commit 8675624

34 files changed

Lines changed: 2186 additions & 139 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
44

55
This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
66

7+
## [9.7.0]
8+
9+
### Added
10+
11+
- Added Pardot integration with full Salesforce OAuth 2.0 flow, admin settings, and field mapper.
12+
- Added Pardot Gutenberg block for embedding Pardot forms in the block editor.
13+
- Added Pardot REST routes: OAuth callback, integration items, form submit, and API test.
14+
- Added `OauthCleanupJob` cron job to remove expired OAuth tokens.
15+
- Added Pardot variables, labels, filters, and fallback flag to the cross-cutting integration setup.
16+
717
## [9.6.0]
818

919
### Added
@@ -1898,6 +1908,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
18981908

18991909
- Initial production release.
19001910

1911+
[9.7.0]: https://github.com/infinum/eightshift-forms/compare/9.6.0...9.7.0
19011912
[9.6.0]: https://github.com/infinum/eightshift-forms/compare/9.5.3...9.6.0
19021913
[9.5.3]: https://github.com/infinum/eightshift-forms/compare/9.5.2...9.5.3
19031914
[9.5.2]: https://github.com/infinum/eightshift-forms/compare/9.5.1...9.5.2

bun.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eightshift-forms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Description: Eightshift Forms is a complete form builder plugin that utilizes modern Block editor features with multiple third-party integrations, bringing your project to a new level.
77
* Author: WordPress team @Infinum
88
* Author URI: https://eightshift.com/
9-
* Version: 9.6.0
9+
* Version: 9.7.0
1010
* Text Domain: eightshift-forms
1111
*
1212
* @package EightshiftForms

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eightshift/eightshift-forms",
3-
"version": "9.6.0",
3+
"version": "9.7.0",
44
"description": "This repository contains all the tools you need to start building a modern WordPress project.",
55
"authors": [
66
{

src/Blocks/Blocks.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace EightshiftForms\Blocks;
1313

1414
use EightshiftForms\Config\Config;
15+
use EightshiftForms\Helpers\GeneralHelpers;
1516
use EightshiftForms\Helpers\HooksHelpers;
1617
use EightshiftFormsVendor\EightshiftLibs\Blocks\AbstractBlocks;
1718
use EightshiftFormsVendor\EightshiftLibs\Helpers\Helpers;
@@ -41,6 +42,10 @@ public function register(): void
4142

4243
// Limits the usage of only custom project blocks.
4344
\add_filter('allowed_block_types_all', [$this, 'getAllBlocksList'], 99999, 2);
45+
46+
if (GeneralHelpers::isEightshiftFormsAdminPages()) {
47+
\remove_filter('the_content', 'wpautop');
48+
}
4449
}
4550

4651
/**

src/Blocks/components/submit/components/submit-editor.js

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,21 @@ import React from 'react';
22
import { __ } from '@wordpress/i18n';
33
import classnames from 'classnames';
44
import { select } from '@wordpress/data';
5-
import {
6-
selector,
7-
props,
8-
STORE_NAME,
9-
checkAttr,
10-
} from '@eightshift/frontend-libs/scripts';
5+
import { selector, props, STORE_NAME, checkAttr } from '@eightshift/frontend-libs/scripts';
116
import { FieldEditor } from '../../../components/field/components/field-editor';
127

138
export const SubmitEditor = (attributes) => {
149
const manifest = select(STORE_NAME).getComponent('submit');
1510

16-
const {
17-
componentClass,
18-
componentName
19-
} = manifest;
11+
const { componentClass, componentName } = manifest;
2012

21-
const {
22-
additionalFieldClass,
23-
additionalClass,
24-
} = attributes;
13+
const { additionalFieldClass, additionalClass } = attributes;
2514

2615
const submitValue = checkAttr('submitValue', attributes, manifest);
2716

28-
const submitClass = classnames([
29-
selector(componentClass, componentClass),
30-
selector(additionalClass, additionalClass),
31-
]);
17+
const submitClass = classnames([selector(componentClass, componentClass), selector(additionalClass, additionalClass)]);
3218

33-
const submitComponent = (
34-
<button className={submitClass}>
35-
{submitValue}
36-
</button>
37-
);
19+
const submitComponent = <button className={submitClass}>{submitValue ? submitValue : __('Submit', 'eightshift-forms')}</button>;
3820

3921
return (
4022
<>

src/Blocks/custom/form-selector/manifest.json

Lines changed: 57 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
"$schema": "https://raw.githubusercontent.com/infinum/eightshift-frontend-libs/develop/schemas/block.json",
33
"blockName": "form-selector",
44
"title": "Form selector",
5-
"description" : "Choose the form you want to display",
5+
"description": "Choose the form you want to display",
66
"category": "eightshift-forms",
77
"icon": {
88
"src": "esf-form-picker"
99
},
10-
"keywords": [
11-
"forms"
12-
],
10+
"keywords": ["forms"],
1311
"hasInnerBlocks": true,
1412
"supports": {
1513
"inserter": false
@@ -28,10 +26,7 @@
2826
"inputInputName": "email",
2927
"inputInputIsRequired": true,
3028
"inputInputIsEmail": true,
31-
"inputInputDisabledOptions": [
32-
"inputInputIsRequired",
33-
"inputInputName"
34-
]
29+
"inputInputDisabledOptions": ["inputInputIsRequired", "inputInputName"]
3530
}
3631
],
3732
[
@@ -57,9 +52,7 @@
5752
"textareaTextareaName": "message"
5853
}
5954
],
60-
[
61-
"eightshift-forms/submit"
62-
]
55+
["eightshift-forms/submit"]
6356
]
6457
},
6558
{
@@ -112,6 +105,48 @@
112105
"slug": "talentlyft",
113106
"blockName": "eightshift-forms/talentlyft"
114107
},
108+
{
109+
"label": "Pardot",
110+
"slug": "pardot",
111+
"blockName": "eightshift-forms/pardot",
112+
"innerBlocks": [
113+
[
114+
"eightshift-forms/input",
115+
{
116+
"inputInputFieldLabel": "E-mail",
117+
"inputInputType": "email",
118+
"inputInputName": "email",
119+
"inputInputIsRequired": true,
120+
"inputInputIsEmail": true,
121+
"inputInputDisabledOptions": ["inputInputIsRequired", "inputInputName"]
122+
}
123+
],
124+
[
125+
"eightshift-forms/input",
126+
{
127+
"inputInputFieldLabel": "Name",
128+
"inputInputIsRequired": true,
129+
"inputInputName": "name"
130+
}
131+
],
132+
[
133+
"eightshift-forms/input",
134+
{
135+
"inputInputFieldLabel": "Subject",
136+
"inputInputIsRequired": true,
137+
"inputInputName": "subject"
138+
}
139+
],
140+
[
141+
"eightshift-forms/textarea",
142+
{
143+
"textareaTextareaFieldLabel": "Message",
144+
"textareaTextareaName": "message"
145+
}
146+
],
147+
["eightshift-forms/submit"]
148+
]
149+
},
115150
{
116151
"label": "Jira",
117152
"slug": "jira",
@@ -125,10 +160,7 @@
125160
"inputInputName": "email",
126161
"inputInputIsRequired": true,
127162
"inputInputIsEmail": true,
128-
"inputInputDisabledOptions": [
129-
"inputInputIsRequired",
130-
"inputInputName"
131-
]
163+
"inputInputDisabledOptions": ["inputInputIsRequired", "inputInputName"]
132164
}
133165
],
134166
[
@@ -154,9 +186,7 @@
154186
"textareaTextareaName": "message"
155187
}
156188
],
157-
[
158-
"eightshift-forms/submit"
159-
]
189+
["eightshift-forms/submit"]
160190
]
161191
},
162192
{
@@ -172,10 +202,7 @@
172202
"inputInputName": "email",
173203
"inputInputIsRequired": true,
174204
"inputInputIsEmail": true,
175-
"inputInputDisabledOptions": [
176-
"inputInputIsRequired",
177-
"inputInputName"
178-
]
205+
"inputInputDisabledOptions": ["inputInputIsRequired", "inputInputName"]
179206
}
180207
],
181208
[
@@ -204,9 +231,7 @@
204231
"inputInputName": "amount"
205232
}
206233
],
207-
[
208-
"eightshift-forms/submit"
209-
]
234+
["eightshift-forms/submit"]
210235
]
211236
},
212237
{
@@ -222,10 +247,7 @@
222247
"inputInputName": "email",
223248
"inputInputIsRequired": true,
224249
"inputInputIsEmail": true,
225-
"inputInputDisabledOptions": [
226-
"inputInputIsRequired",
227-
"inputInputName"
228-
]
250+
"inputInputDisabledOptions": ["inputInputIsRequired", "inputInputName"]
229251
}
230252
],
231253
[
@@ -238,9 +260,7 @@
238260
"inputInputName": "amount"
239261
}
240262
],
241-
[
242-
"eightshift-forms/submit"
243-
]
263+
["eightshift-forms/submit"]
244264
]
245265
},
246266
{
@@ -256,10 +276,7 @@
256276
"inputInputName": "email",
257277
"inputInputIsRequired": true,
258278
"inputInputIsEmail": true,
259-
"inputInputDisabledOptions": [
260-
"inputInputIsRequired",
261-
"inputInputName"
262-
]
279+
"inputInputDisabledOptions": ["inputInputIsRequired", "inputInputName"]
263280
}
264281
],
265282
[
@@ -285,9 +302,7 @@
285302
"textareaTextareaName": "message"
286303
}
287304
],
288-
[
289-
"eightshift-forms/submit"
290-
]
305+
["eightshift-forms/submit"]
291306
]
292307
},
293308
{
@@ -304,9 +319,7 @@
304319
"inputInputIsNumber": true
305320
}
306321
],
307-
[
308-
"eightshift-forms/submit"
309-
]
322+
["eightshift-forms/submit"]
310323
]
311324
},
312325
{
@@ -322,10 +335,7 @@
322335
"inputInputName": "email",
323336
"inputInputIsRequired": true,
324337
"inputInputIsEmail": true,
325-
"inputInputDisabledOptions": [
326-
"inputInputIsRequired",
327-
"inputInputName"
328-
]
338+
"inputInputDisabledOptions": ["inputInputIsRequired", "inputInputName"]
329339
}
330340
],
331341
[
@@ -336,9 +346,7 @@
336346
"inputInputName": "name"
337347
}
338348
],
339-
[
340-
"eightshift-forms/submit"
341-
]
349+
["eightshift-forms/submit"]
342350
]
343351
}
344352
]

0 commit comments

Comments
 (0)