File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
src/Umbraco.Cms.Integrations.Crm.Dynamics/Views/Dynamics/Render Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ @using Umbraco .Cms .Integrations .Crm .Dynamics .Models .ViewModels ;
2
+ @using Umbraco .Cms .Integrations .Crm .Dynamics .Models ;
3
+
4
+ @inherits Umbraco .Cms .Web .Common .Views .UmbracoViewPage <FormViewModel >
5
+
6
+ @{
7
+ var id = Guid .NewGuid ();
8
+ }
9
+
10
+ @if (Model != null )
11
+ {
12
+ @if (Model .Module .HasFlag (DynamicsModule .Outbound ))
13
+ {
14
+ @if (Model .IframeEmbedded )
15
+ {
16
+ <iframe frameBorder =" 0" style =" width :100% ;height :100% ;" id =@id ></iframe >
17
+ <script >
18
+ var sandboxSrc = " https://@(Model.Hostname)/t/formsandbox/@(Model.WebsiteId)/@(Model.FormBlockId)?ad="
19
+ + encodeURIComponent (document .location .toString ()); document .getElementById (' @id' ).setAttribute (' src' , sandboxSrc);
20
+ </script >
21
+ }
22
+ else
23
+ {
24
+ <div data-form-block-id =" @Model.FormBlockId" ></div >
25
+ <script src =" https://mktdplp102cdn.azureedge.net/public/latest/js/form-loader.js?v=1.84.2007" ></script >
26
+ <div id =" @Model.ContainerId" ></div >
27
+ <script src =" https://mktdplp102cdn.azureedge.net/public/latest/js/ws-tracking.js?v=1.84.2007" ></script >
28
+ <div class =" @Model.ContainerClass" style =" display :none "
29
+ data-website-id =" @Model.WebsiteId" data-hostname =" @Model.Hostname" ></div >
30
+ }
31
+ }
32
+ else
33
+ {
34
+ @if (Model .IframeEmbedded )
35
+ {
36
+ <iframe frameBorder =" 0" style =" width :100% ;height :100% ;" id =@id src =" @Model.StandaloneUrl" ></iframe >
37
+ }
38
+ else
39
+ {
40
+ @Html.Raw(Model.Html)
41
+ }
42
+ }
43
+ }
You can’t perform that action at this time.
0 commit comments