Skip to content

Commit e546ee4

Browse files
committed
Update umbracoPlugins value
1 parent 44608fc commit e546ee4

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/Umbraco.Forms.Integrations.Crm.Hubspot/App_Plugins/UmbracoForms.Integrations/Crm/Hubspot/hubspotfields.component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function HubSpotFieldsController($scope, $routeParams, umbracoFormsIntegrationsC
5353

5454
vm.$onInit = function () {
5555

56-
vm.allowContactUpdate = Umbraco.Sys.ServerVariables.umbracoPlugins.umbracoFormsIntegrationsCrmHubspotAllowContactUpdate;
56+
vm.allowContactUpdate = Umbraco.Sys.ServerVariables.umbracoPlugins.umbracoFormsIntegrationsCrmHubspot.allowContactUpdate;
5757

5858
if (!vm.setting.value) {
5959
vm.mappings = [];

src/Umbraco.Forms.Integrations.Crm.Hubspot/HubspotServerVariablesParsingHandler.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Microsoft.Extensions.Options;
44
using System;
55
using System.Collections.Generic;
6-
6+
using System.Runtime.Serialization;
77
using Umbraco.Cms.Core.Events;
88
using Umbraco.Cms.Core.Notifications;
99
using Umbraco.Extensions;
@@ -58,9 +58,19 @@ public void Handle(ServerVariablesParsingNotification notification)
5858
if (serverVars.ContainsKey("umbracoPlugins"))
5959
{
6060
var umbracoPlugins = (Dictionary<string, object>)serverVars["umbracoPlugins"];
61-
umbracoPlugins.Add("umbracoFormsIntegrationsCrmHubspotAllowContactUpdate", _settings.AllowContactUpdate);
61+
umbracoPlugins.Add("umbracoFormsIntegrationsCrmHubspot", new ClientSideConfiguration
62+
{
63+
AllowContactUpdate = _settings.AllowContactUpdate
64+
});
6265
}
6366

6467
}
68+
69+
[DataContract]
70+
internal sealed class ClientSideConfiguration
71+
{
72+
[DataMember(Name = "allowContactUpdate")]
73+
public bool AllowContactUpdate { get; set; }
74+
}
6575
}
6676
}

0 commit comments

Comments
 (0)