Skip to content

Commit 2dc1e37

Browse files
committed
Render view exclusion; Use constants for picker properties.
1 parent 37571d4 commit 2dc1e37

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

src/Umbraco.Cms.Integrations.Crm.Hubspot/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
public static class Constants
88
{
9+
public const string PropertyEditorAlias = "Umbraco.Cms.Integrations.Crm.Hubspot.FormPicker";
10+
911
public const string UmbracoCmsIntegrationsCrmHubspotApiKey = "Umbraco.Cms.Integrations.Crm.Hubspot.ApiKey";
1012

1113
public const string UmbracoCmsIntegrationsCrmHubspotRegion = "Umbraco.Cms.Integrations.Crm.Hubspot.Region";

src/Umbraco.Cms.Integrations.Crm.Hubspot/Editors/FormPickerValueConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Umbraco.Cms.Integrations.Crm.Hubspot.Editors
1616
{
1717
public class FormPickerValueConverter : PropertyValueConverterBase
1818
{
19-
public override bool IsConverter(IPublishedPropertyType propertyType) => propertyType.EditorAlias.Equals("Umbraco.Cms.Integrations.Crm.Hubspot.FormPicker");
19+
public override bool IsConverter(IPublishedPropertyType propertyType) => propertyType.EditorAlias.Equals(Constants.PropertyEditorAlias);
2020

2121
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType) => PropertyCacheLevel.Snapshot;
2222

src/Umbraco.Cms.Integrations.Crm.Hubspot/HubspotFormPickerPropertyEditor.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#if NETCOREAPP
2+
using Umbraco.Cms.Core;
23
using Umbraco.Cms.Core.IO;
34
using Umbraco.Cms.Core.PropertyEditors;
45
#else
@@ -9,10 +10,10 @@
910
namespace Umbraco.Cms.Integrations.Crm.Hubspot
1011
{
1112
[DataEditor(
12-
alias: "Umbraco.Cms.Integrations.Crm.Hubspot.FormPicker",
13+
alias: Constants.PropertyEditorAlias,
1314
name: "HubSpot Form Picker",
1415
view: "~/App_Plugins/UmbracoCms.Integrations/Crm/Hubspot/views/formpicker.html",
15-
Group = "Pickers",
16+
Group = Core.Constants.PropertyEditors.Groups.Pickers,
1617
Icon = "icon-handshake"
1718
)]
1819
public class HubspotFormPickerPropertyEditor: DataEditor

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageIconUrl></PackageIconUrl>
1111
<PackageProjectUrl>https://github.com/umbraco/Umbraco.Cms.Integrations</PackageProjectUrl>
1212
<RepositoryUrl>https://github.com/umbraco/Umbraco.Cms.Integrations</RepositoryUrl>
13-
<Version>1.1.2</Version>
13+
<Version>1.1.3</Version>
1414
<Authors>Umbraco HQ</Authors>
1515
<Company>Umbraco</Company>
1616
</PropertyGroup>

src/Umbraco.Cms.Integrations.Crm.Hubspot/build/Umbraco.Cms.Integrations.Crm.Hubspot.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
<Copy SourceFiles="@(HubspotPropertyEditorFiles)"
1515
DestinationFiles="@(HubspotPropertyEditorFiles->'$(MSBuildProjectDirectory)\App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\%(RecursiveDir)%(Filename)%(Extension)')"
1616
SkipUnchangedFiles="true" />
17-
17+
</Target>
18+
19+
<Target Name="ClearHubspotRenderingView"
20+
Condition="'$(TargetFramework)' == 'net5.0' or '$(TargetFramework)' == 'net6.0'" BeforeTargets="Build">
21+
<Message Text="Delete Umbraco 8 rendering view" Importance="high" />
22+
<Delete Files="$(MSBuildProjectDirectory)\App_Plugins\UmbracoCms.Integrations\Crm\Hubspot\Render\HubspotForm.cshtml"/>
1823
</Target>
1924

2025
<Target Name="ClearHubspotPropertyEditorAssets" BeforeTargets="Clean">

src/Umbraco.Cms.Integrations.Crm.Hubspot/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<info>
44
<package>
55
<name>Umbraco.Cms.Integrations.Crm.Hubspot</name>
6-
<version>1.1.2</version>
6+
<version>1.1.3</version>
77
<iconUrl></iconUrl>
88
<licence url="https://opensource.org/licenses/MIT">MIT</licence>
99
<url>https://github.com/umbraco/Umbraco.Cms.Integrations</url>

0 commit comments

Comments
 (0)