From 978bf5343f75e389302585a5e46eaff7315e3a45 Mon Sep 17 00:00:00 2001 From: goeran Date: Sun, 22 May 2022 23:53:19 +0200 Subject: [PATCH 1/3] Link to download m3connector consumer code --- Source/SelfService/Web/m3connector/details.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/SelfService/Web/m3connector/details.tsx b/Source/SelfService/Web/m3connector/details.tsx index 45f2c31bf..752c10f5e 100644 --- a/Source/SelfService/Web/m3connector/details.tsx +++ b/Source/SelfService/Web/m3connector/details.tsx @@ -33,8 +33,18 @@ export const View: React.FunctionComponent = (props) => { return null; } + const downloadCode = (e) => { + e.preventDefault(); + const form = document.getElementById('download-form'); + form?.setAttribute('action', `/selfservice/api/application/${applicationId}/${environment}/codegenerator/m3connector-consumer`) + form?.submit(); + }; + return ( <> +
+ Download sample code +
Config Date: Mon, 23 May 2022 00:00:17 +0200 Subject: [PATCH 2/3] Fixed type --- Source/SelfService/Web/m3connector/details.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SelfService/Web/m3connector/details.tsx b/Source/SelfService/Web/m3connector/details.tsx index 752c10f5e..573fd990c 100644 --- a/Source/SelfService/Web/m3connector/details.tsx +++ b/Source/SelfService/Web/m3connector/details.tsx @@ -35,7 +35,7 @@ export const View: React.FunctionComponent = (props) => { const downloadCode = (e) => { e.preventDefault(); - const form = document.getElementById('download-form'); + const form = document.getElementById('download-form') as HTMLFormElement; form?.setAttribute('action', `/selfservice/api/application/${applicationId}/${environment}/codegenerator/m3connector-consumer`) form?.submit(); }; From d4ef483d3a2938422fb6e7d6ff0b8b0960dc234b Mon Sep 17 00:00:00 2001 From: goeran Date: Mon, 23 May 2022 07:45:10 +0200 Subject: [PATCH 3/3] Added semicolon --- Source/SelfService/Web/m3connector/details.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SelfService/Web/m3connector/details.tsx b/Source/SelfService/Web/m3connector/details.tsx index 573fd990c..88c9b8b3b 100644 --- a/Source/SelfService/Web/m3connector/details.tsx +++ b/Source/SelfService/Web/m3connector/details.tsx @@ -36,7 +36,7 @@ export const View: React.FunctionComponent = (props) => { const downloadCode = (e) => { e.preventDefault(); const form = document.getElementById('download-form') as HTMLFormElement; - form?.setAttribute('action', `/selfservice/api/application/${applicationId}/${environment}/codegenerator/m3connector-consumer`) + form?.setAttribute('action', `/selfservice/api/application/${applicationId}/${environment}/codegenerator/m3connector-consumer`); form?.submit(); };