Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(n8n Form Trigger Node): Remove custom attribution option (no-changelog) #10229

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/cli/templates/form-trigger.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,6 @@
<div class='n8n-link'>
<a href={{n8nWebsiteLink}} target='_blank'>
Form automated with
{{#if customAttribution}}
{{{customAttribution}}}
{{else}}
<svg
width='73'
height='20'
Expand All @@ -489,7 +486,6 @@
fill='#101330'
/>
</svg>
{{/if}}
</a>
</div>
{{/if}}
Expand Down
1 change: 0 additions & 1 deletion packages/nodes-base/nodes/Form/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export type FormTriggerData = {
formFields: FormTriggerInput[];
useResponseData?: boolean;
appendAttribution?: boolean;
customAttribution?: string;
};

export const FORM_TRIGGER_AUTHENTICATION_PROPERTY = 'authentication';
3 changes: 0 additions & 3 deletions packages/nodes-base/nodes/Form/test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ describe('FormTrigger, formWebhook', () => {

expect(mockRender).toHaveBeenCalledWith('form-trigger', {
appendAttribution: true,
customAttribution: undefined,
formDescription: 'Test Description',
formFields: [
{
Expand Down Expand Up @@ -247,7 +246,6 @@ describe('FormTrigger, prepareFormData', () => {
],
useResponseData: true,
appendAttribution: true,
customAttribution: undefined,
redirectUrl: 'https://example.com/thank-you',
});
});
Expand Down Expand Up @@ -293,7 +291,6 @@ describe('FormTrigger, prepareFormData', () => {
],
useResponseData: undefined,
appendAttribution: true,
customAttribution: undefined,
});
});

Expand Down
5 changes: 0 additions & 5 deletions packages/nodes-base/nodes/Form/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export function prepareFormData({
instanceId,
useResponseData,
appendAttribution = true,
customAttribution,
}: {
formTitle: string;
formDescription: string;
Expand All @@ -38,7 +37,6 @@ export function prepareFormData({
instanceId?: string;
useResponseData?: boolean;
appendAttribution?: boolean;
customAttribution?: string;
}) {
const validForm = formFields.length > 0;
const utm_campaign = instanceId ? `&utm_campaign=${instanceId}` : '';
Expand All @@ -58,7 +56,6 @@ export function prepareFormData({
formFields: [],
useResponseData,
appendAttribution,
customAttribution,
};

if (redirectUrl) {
Expand Down Expand Up @@ -157,7 +154,6 @@ export async function formWebhook(context: IWebhookFunctions) {
formSubmittedText?: string;
useWorkflowTimezone?: boolean;
appendAttribution?: boolean;
customAttribution?: string;
};
const res = context.getResponseObject();
const req = context.getRequestObject();
Expand Down Expand Up @@ -225,7 +221,6 @@ export async function formWebhook(context: IWebhookFunctions) {
instanceId,
useResponseData,
appendAttribution,
customAttribution: options.customAttribution as string,
});

res.render('form-trigger', data);
Expand Down
11 changes: 0 additions & 11 deletions packages/nodes-base/nodes/Form/v2/FormTriggerV2.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,6 @@ const descriptionV2: INodeTypeDescription = {
placeholder: 'Add option',
default: {},
options: [
{
displayName: 'Custom Attribution',
name: 'customAttribution',
type: 'string',
placeholder: 'e.g. <svg> ...</svg>',
description: "HTML code that will be shown at the bottom of the form instead n8n's logo",
default: '',
typeOptions: {
rows: 2,
},
},
{
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
displayName: 'Append n8n Attribution',
Expand Down
Loading