Skip to content

Commit 7d2830e

Browse files
committed
Feedback updates
1 parent 759d7d3 commit 7d2830e

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

src/Umbraco.Cms.Integrations.Crm.Hubspot/App_Plugins/UmbracoCms.Integrations/Crm/Hubspot/Render/HubspotForm.cshtml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
@inherits Umbraco.Web.Mvc.UmbracoViewPage<Umbraco.Cms.Integrations.Crm.Hubspot.Models.ViewModels.HubspotFormViewModel>
22

3-
@{
4-
var hbsptScriptPath = string.IsNullOrEmpty(Model.Region) ? "//js.hsforms.net/forms/shell.js" : "//js-eu1.hsforms.net/forms/shell.js";
5-
}
6-
7-
<script charset="utf-8" type="text/javascript" src="@hbsptScriptPath"></script>
3+
<script charset="utf-8" type="text/javascript" src="@Model.ScriptPath"></script>
84
<script>
95
hbspt.forms.create({
106
region: "@Model.Region",

src/Umbraco.Cms.Integrations.Crm.Hubspot/App_Plugins/UmbracoCms.Integrations/Crm/Hubspot/Render/HubspotFormV9.cshtml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Cms.Integrations.Crm.Hubspot.Models.ViewModels.HubspotFormViewModel>
22

3-
@{
4-
var hbsptScriptPath = string.IsNullOrEmpty(Model.Region) ? "//js.hsforms.net/forms/shell.js" : "//js-eu1.hsforms.net/forms/shell.js";
5-
}
6-
7-
<script charset="utf-8" type="text/javascript" src="@hbsptScriptPath"></script>
3+
<script charset="utf-8" type="text/javascript" src="@Model.ScriptPath"></script>
84
<script>
95
hbspt.forms.create({
106
region: "@Model.Region",

src/Umbraco.Cms.Integrations.Crm.Hubspot/Models/ViewModels/HubspotFormViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ public class HubspotFormViewModel
77
public string Id { get; set; }
88

99
public string Region { get; set; }
10+
11+
public string ScriptPath =>
12+
$"//js{(string.IsNullOrEmpty(Region) ? string.Empty : Region.ToLowerInvariant())}.hsforms.net/forms/shell.js";
1013
}
1114
}

src/Umbraco.Cms.Integrations.Crm.Hubspot/Umbraco.Cms.Integrations.Crm.Hubspot.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343
</Content>
4444
</ItemGroup>
4545

46-
<ItemGroup>
47-
<None Remove="App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\Render\HubspotFormV9.cshtml" />
48-
</ItemGroup>
49-
5046
<Target Name="RemoveLuceneAnalyzer" BeforeTargets="CoreCompile">
5147
<ItemGroup>
5248
<Analyzer Remove="@(Analyzer)" Condition="%(FileName) == 'Lucene.Net.CodeAnalysis.CSharp'" />

0 commit comments

Comments
 (0)