mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(n8n Form Trigger Node): Remove custom attribution option (no-changelog) (#10229)
This commit is contained in:
parent
711b667ebe
commit
e5dfd7faf9
|
@ -460,9 +460,6 @@
|
||||||
<div class='n8n-link'>
|
<div class='n8n-link'>
|
||||||
<a href={{n8nWebsiteLink}} target='_blank'>
|
<a href={{n8nWebsiteLink}} target='_blank'>
|
||||||
Form automated with
|
Form automated with
|
||||||
{{#if customAttribution}}
|
|
||||||
{{{customAttribution}}}
|
|
||||||
{{else}}
|
|
||||||
<svg
|
<svg
|
||||||
width='73'
|
width='73'
|
||||||
height='20'
|
height='20'
|
||||||
|
@ -489,7 +486,6 @@
|
||||||
fill='#101330'
|
fill='#101330'
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
{{/if}}
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -40,7 +40,6 @@ export type FormTriggerData = {
|
||||||
formFields: FormTriggerInput[];
|
formFields: FormTriggerInput[];
|
||||||
useResponseData?: boolean;
|
useResponseData?: boolean;
|
||||||
appendAttribution?: boolean;
|
appendAttribution?: boolean;
|
||||||
customAttribution?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FORM_TRIGGER_AUTHENTICATION_PROPERTY = 'authentication';
|
export const FORM_TRIGGER_AUTHENTICATION_PROPERTY = 'authentication';
|
||||||
|
|
|
@ -49,7 +49,6 @@ describe('FormTrigger, formWebhook', () => {
|
||||||
|
|
||||||
expect(mockRender).toHaveBeenCalledWith('form-trigger', {
|
expect(mockRender).toHaveBeenCalledWith('form-trigger', {
|
||||||
appendAttribution: true,
|
appendAttribution: true,
|
||||||
customAttribution: undefined,
|
|
||||||
formDescription: 'Test Description',
|
formDescription: 'Test Description',
|
||||||
formFields: [
|
formFields: [
|
||||||
{
|
{
|
||||||
|
@ -247,7 +246,6 @@ describe('FormTrigger, prepareFormData', () => {
|
||||||
],
|
],
|
||||||
useResponseData: true,
|
useResponseData: true,
|
||||||
appendAttribution: true,
|
appendAttribution: true,
|
||||||
customAttribution: undefined,
|
|
||||||
redirectUrl: 'https://example.com/thank-you',
|
redirectUrl: 'https://example.com/thank-you',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -293,7 +291,6 @@ describe('FormTrigger, prepareFormData', () => {
|
||||||
],
|
],
|
||||||
useResponseData: undefined,
|
useResponseData: undefined,
|
||||||
appendAttribution: true,
|
appendAttribution: true,
|
||||||
customAttribution: undefined,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ export function prepareFormData({
|
||||||
instanceId,
|
instanceId,
|
||||||
useResponseData,
|
useResponseData,
|
||||||
appendAttribution = true,
|
appendAttribution = true,
|
||||||
customAttribution,
|
|
||||||
}: {
|
}: {
|
||||||
formTitle: string;
|
formTitle: string;
|
||||||
formDescription: string;
|
formDescription: string;
|
||||||
|
@ -38,7 +37,6 @@ export function prepareFormData({
|
||||||
instanceId?: string;
|
instanceId?: string;
|
||||||
useResponseData?: boolean;
|
useResponseData?: boolean;
|
||||||
appendAttribution?: boolean;
|
appendAttribution?: boolean;
|
||||||
customAttribution?: string;
|
|
||||||
}) {
|
}) {
|
||||||
const validForm = formFields.length > 0;
|
const validForm = formFields.length > 0;
|
||||||
const utm_campaign = instanceId ? `&utm_campaign=${instanceId}` : '';
|
const utm_campaign = instanceId ? `&utm_campaign=${instanceId}` : '';
|
||||||
|
@ -58,7 +56,6 @@ export function prepareFormData({
|
||||||
formFields: [],
|
formFields: [],
|
||||||
useResponseData,
|
useResponseData,
|
||||||
appendAttribution,
|
appendAttribution,
|
||||||
customAttribution,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (redirectUrl) {
|
if (redirectUrl) {
|
||||||
|
@ -157,7 +154,6 @@ export async function formWebhook(context: IWebhookFunctions) {
|
||||||
formSubmittedText?: string;
|
formSubmittedText?: string;
|
||||||
useWorkflowTimezone?: boolean;
|
useWorkflowTimezone?: boolean;
|
||||||
appendAttribution?: boolean;
|
appendAttribution?: boolean;
|
||||||
customAttribution?: string;
|
|
||||||
};
|
};
|
||||||
const res = context.getResponseObject();
|
const res = context.getResponseObject();
|
||||||
const req = context.getRequestObject();
|
const req = context.getRequestObject();
|
||||||
|
@ -225,7 +221,6 @@ export async function formWebhook(context: IWebhookFunctions) {
|
||||||
instanceId,
|
instanceId,
|
||||||
useResponseData,
|
useResponseData,
|
||||||
appendAttribution,
|
appendAttribution,
|
||||||
customAttribution: options.customAttribution as string,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
res.render('form-trigger', data);
|
res.render('form-trigger', data);
|
||||||
|
|
|
@ -115,17 +115,6 @@ const descriptionV2: INodeTypeDescription = {
|
||||||
placeholder: 'Add option',
|
placeholder: 'Add option',
|
||||||
default: {},
|
default: {},
|
||||||
options: [
|
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
|
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||||
displayName: 'Append n8n Attribution',
|
displayName: 'Append n8n Attribution',
|
||||||
|
|
Loading…
Reference in a new issue