Skip to content

Commit

Permalink
fix(n8n Form Trigger Node): Remove custom attribution option (no-chan…
Browse files Browse the repository at this point in the history
…gelog) (#10229)
  • Loading branch information
michael-radency committed Jul 29, 2024
1 parent 711b667 commit e5dfd7f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 24 deletions.
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

0 comments on commit e5dfd7f

Please sign in to comment.