From faf3fb41ae4bb740e701a8b05a7e4d158d528cef Mon Sep 17 00:00:00 2001 From: Shoma Gujjar Date: Fri, 3 Apr 2020 14:29:39 +0100 Subject: [PATCH] CON-1631-add cobrowsing snippet key. --- .../Extensions/HtmlHelperExtensions.cs | 5 +++++ .../Views/Shared/_ZenDeskWidget.cshtml | 1 + .../Configuration/EmployerAccountsConfiguration.cs | 1 + .../Extensions/HtmlHelperExtensions.cs | 6 ++++++ .../Views/Shared/_ZenDeskWidget.cshtml | 1 + .../Configuration/EmployerFinanceConfiguration.cs | 1 + 6 files changed, 15 insertions(+) diff --git a/src/SFA.DAS.EmployerAccounts.Web/Extensions/HtmlHelperExtensions.cs b/src/SFA.DAS.EmployerAccounts.Web/Extensions/HtmlHelperExtensions.cs index d378469a84..c762920edb 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Extensions/HtmlHelperExtensions.cs +++ b/src/SFA.DAS.EmployerAccounts.Web/Extensions/HtmlHelperExtensions.cs @@ -70,6 +70,11 @@ public static string GetZenDeskSnippetSectionId(this HtmlHelper html) var configuration = DependencyResolver.Current.GetService(); return configuration.ZenDeskSectionId; } + public static string GetZenDeskCobrowsingSnippetKey(this HtmlHelper html) + { + var configuration = DependencyResolver.Current.GetService(); + return configuration.ZenDeskCobrowsingSnippetKey; + } public static IHeaderViewModel GetHeaderViewModel(this HtmlHelper html, bool useLegacyStyles = false) { diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_ZenDeskWidget.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_ZenDeskWidget.cshtml index eb239681c4..7e3d2d29ba 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_ZenDeskWidget.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_ZenDeskWidget.cshtml @@ -20,6 +20,7 @@ }; + @Html.SetZenDeskLabels(new string[] { ViewBag.ZenDeskLabel }) diff --git a/src/SFA.DAS.EmployerAccounts/Configuration/EmployerAccountsConfiguration.cs b/src/SFA.DAS.EmployerAccounts/Configuration/EmployerAccountsConfiguration.cs index 59cb72e5d4..aabaf9261f 100644 --- a/src/SFA.DAS.EmployerAccounts/Configuration/EmployerAccountsConfiguration.cs +++ b/src/SFA.DAS.EmployerAccounts/Configuration/EmployerAccountsConfiguration.cs @@ -45,6 +45,7 @@ public class EmployerAccountsConfiguration : ITopicMessagePublisherConfiguration public string AdfsMetadata { get; set; } public string ZenDeskSnippetKey { get; set; } public string ZenDeskSectionId { get; set; } + public string ZenDeskCobrowsingSnippetKey { get; set; } public CommitmentsApiV2ClientConfiguration CommitmentsApi { get; set; } public RecruitClientApiConfiguration RecruitApi { get; set; } } diff --git a/src/SFA.DAS.EmployerFinance.Web/Extensions/HtmlHelperExtensions.cs b/src/SFA.DAS.EmployerFinance.Web/Extensions/HtmlHelperExtensions.cs index d28c33c633..3a93693ea7 100644 --- a/src/SFA.DAS.EmployerFinance.Web/Extensions/HtmlHelperExtensions.cs +++ b/src/SFA.DAS.EmployerFinance.Web/Extensions/HtmlHelperExtensions.cs @@ -36,5 +36,11 @@ public static string GetZenDeskSnippetSectionId(this HtmlHelper html) var configuration = DependencyResolver.Current.GetService(); return configuration.ZenDeskSectionId; } + + public static string GetZenDeskCobrowsingSnippetKey(this HtmlHelper html) + { + var configuration = DependencyResolver.Current.GetService(); + return configuration.ZenDeskCobrowsingSnippetKey; + } } } \ No newline at end of file diff --git a/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_ZenDeskWidget.cshtml b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_ZenDeskWidget.cshtml index 1d4a24edad..609a091f0b 100644 --- a/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_ZenDeskWidget.cshtml +++ b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_ZenDeskWidget.cshtml @@ -20,4 +20,5 @@ }; + @Html.SetZenDeskLabels(new string[] { ViewBag.ZenDeskLabel }) \ No newline at end of file diff --git a/src/SFA.DAS.EmployerFinance/Configuration/EmployerFinanceConfiguration.cs b/src/SFA.DAS.EmployerFinance/Configuration/EmployerFinanceConfiguration.cs index 02189f3e0f..96b49c7764 100644 --- a/src/SFA.DAS.EmployerFinance/Configuration/EmployerFinanceConfiguration.cs +++ b/src/SFA.DAS.EmployerFinance/Configuration/EmployerFinanceConfiguration.cs @@ -34,5 +34,6 @@ public class EmployerFinanceConfiguration : ITopicMessagePublisherConfiguration public string ZenDeskHelpCentreUrl { get; set; } public string ZenDeskSnippetKey { get; set; } public string ZenDeskSectionId { get; set; } + public string ZenDeskCobrowsingSnippetKey { get; set; } } } \ No newline at end of file