File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
src/Umbraco.Forms.Integrations.Crm.Hubspot.OAuthCallback/Pages Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<div class =" text-center" >
8
8
<h1 class =" display-4" >Umbraco Forms / Hubspot</h1 >
9
- @if (string .IsNullOrEmpty (Model .AuthorizationCode ))
10
- {
11
- <p >Authentication failed - no authorization code received .</p >
12
- }
13
- else
9
+ @if (! string .IsNullOrEmpty (Model .AuthorizationCode ))
14
10
{
15
11
<p >To complete the integration , please copy the following code and enter it in Umbraco using the form provided .</p >
16
12
17
- <p ><input type = "text " value = "@Model .AuthorizationCode " readonly style = "width : 700px ; font - size : 36px ; text - align : center " /></p>
13
+ <p ><input id = "auth -code " type = "text " value = "@Model .AuthorizationCode " readonly style = "width : 700px ; font - size : 36px ; text - align : center " /></p>
14
+
15
+ <button onclick =" copyToClipboard()" >Copy To Clipboard </button >
18
16
}
19
17
</div >
18
+
19
+ <script >
20
+ function copyToClipboard () {
21
+ var authCodeInputElement = document .getElementById (" auth-code" );
22
+ authCodeInputElement .select ();
23
+ authCodeInputElement .setSelectionRange (0 , 99999 );
24
+ navigator .clipboard .writeText (authCodeInputElement .value );
25
+ alert (" Code copied to clipboard" );
26
+ }
27
+ </script >
You can’t perform that action at this time.
0 commit comments