Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKechashin committed Apr 6, 2017
1 parent a5db939 commit 4d4738d
Show file tree
Hide file tree
Showing 7 changed files with 308 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Sitecore.Support.156009.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{878B21E0-A9EE-497E-9354-7D4B22E4404E}") = "Sitecore.Support.156009", "Sitecore.Support.156009\Sitecore.Support.156009.csproj", "{3F3A0DC9-0B27-418E-AC79-60805F00BDEE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F3A0DC9-0B27-418E-AC79-60805F00BDEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F3A0DC9-0B27-418E-AC79-60805F00BDEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F3A0DC9-0B27-418E-AC79-60805F00BDEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F3A0DC9-0B27-418E-AC79-60805F00BDEE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
39 changes: 39 additions & 0 deletions src/Sitecore.Support.156009/Forms/Shell/UI/InsertFormWizard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
namespace Sitecore.Support.Forms.Shell.UI
{
using System.Text;
using Sitecore.Forms.Core.Data;
using Sitecore.WFFM.Abstractions.Dependencies;

public class InsertFormWizard : Sitecore.Forms.Shell.UI.InsertFormWizard
{
protected override string GenerateAnalytics()
{
StringBuilder builder = new StringBuilder();
builder.Append("<p>");
builder.Append("<table>");
builder.Append("<tr><td class='scwfmOptionName'>");
builder.Append(DependenciesManager.ResourceManager.Localize("ASOCIATED_GOAL"));
builder.Append("</td><td class='scwfmOptionValue'>");
#region Added code
FormItem form = FormItem.GetForm(base.multiTree.Selected); // get the selected form item
#endregion
#region Changed code
string name = form.Tracking.Goal == null ? string.Empty : form.Tracking.Goal.Name; // get the proper goal name
#endregion
if (!this.CreateGoal.Checked)
{
name = this.FormsRoot.Database.GetItem(this.Goals.Value).Name;
}
builder.AppendFormat(": {0}", name);
builder.Append("</td></tr>");
builder.Append("<tr><td class='scwfmOptionName'>");
builder.Append(DependenciesManager.ResourceManager.Localize("FORM_DROPOUT_TRACKING"));
builder.Append("</td><td class='scwfmOptionValue'>");
builder.AppendFormat(": {0}", this.EnableFormDropoutTracking.Checked ? "Enabled" : "Disabled");
builder.Append("</td></tr>");
builder.Append("</table>");
builder.Append("</p>");
return builder.ToString();
}
}
}
6 changes: 6 additions & 0 deletions src/Sitecore.Support.156009/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Sitecore.Support.156009")]
[assembly: AssemblyProduct("Sitecore.Support.156009")]
[assembly: ComVisible(false)]
98 changes: 98 additions & 0 deletions src/Sitecore.Support.156009/Sitecore.Support.156009.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3F3A0DC9-0B27-418E-AC79-60805F00BDEE}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sitecore.Support</RootNamespace>
<AssemblyName>Sitecore.Support.156009</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Sitecore.Kernel">
<HintPath>..\packages\SC.Sitecore.Kernel.8.2.2\lib\Sitecore.Kernel.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sitecore.Forms.Core">
<HintPath>..\packages\WFFM.Sitecore.Forms.Core.8.2.1\lib\Sitecore.Forms.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Sitecore.WFFM.Abstractions, Version=8.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WFFM.Sitecore.WFFM.Abstractions.8.2.1\lib\Sitecore.WFFM.Abstractions.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
</ItemGroup>
<ItemGroup>
<Compile Include="Forms\Shell\UI\InsertFormWizard.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="web.config" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="sitecore\shell\Override\InsertFormWizard.xml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:62554/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
6 changes: 6 additions & 0 deletions src/Sitecore.Support.156009/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SC.Sitecore.Kernel" version="8.2.2" targetFramework="net452" />
<package id="WFFM.Sitecore.Forms.Core" version="8.2.1" targetFramework="net452" />
<package id="WFFM.Sitecore.WFFM.Abstractions" version="8.2.1" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8" ?>
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
<Forms.InsertFormWizard>

<Stylesheet runat="server" Src="MultiTreeView.css" DeviceDependant="true"/>
<Stylesheet runat="server" Src="Content Manager.css" DeviceDependant="true"/>
<Stylesheet runat="server" Src="default.css" DeviceDependant="true"/>
<Stylesheet runat="server" Src="/webedit.css" DeviceDependant="true"/>

<Stylesheet Key="SelectFields">

.scPalettePlaceholderSelected,
.scPalettePlaceholder
{
width:100%;
}

</Stylesheet>

<Script runat="server" Src="/sitecore/shell/controls/lib/jquery/jquery.js"/>

<Script type="text/javascript" runat="server">
var $j = jQuery.noConflict();
</Script>

<Script runat="server" Src="/sitecore/shell/Applications/Modules/Web Forms for Marketers/script/jquery.numeric.pack.js"/>

<Script runat="server" Src="/sitecore/shell/controls/SitecoreObjects.js"/>

<Script runat="server" Src="/sitecore/shell/controls/SitecoreVSplitter.js"/>
<Script runat="server" Src="/sitecore/shell/controls/SitecoreWindow.js"/>
<Script runat="server" Src="/sitecore/shell/controls/SitecoreKeyboard.js"/>

<WizardForm Application="Modules/Web Forms for Marketers/Insert Form Wizard" CodeBeside="Sitecore.Support.Forms.Shell.UI.InsertFormWizard, Sitecore.Support.156009">

<Script runat="server" Src="/sitecore/shell/Applications/Modules/Web Forms for Marketers/script/Utils.js"/>
<Script runat="server" Src="/sitecore/shell/Applications/Modules/Web Forms for Marketers/script/Sitecore.PlaceholderManager.js"/>


<WizardFormPage ID="CreateForm" Icon="Applications/32x32/form_green_add.png" >
<Groupbox Width="100%" Height="100%" Cellpadding="2" Style="table-layout:fixed;border:0px;width: auto !important;" Margin="10px 10px 10px 10px" >
<Border Margin="10px">
<Radiobutton ID="CreateBlankForm" Name="ChooseOperation" Value="0" />
</Border>
<Border Margin="10px">
<Radiobutton ID="InsertForm" Name="ChooseOperation" Value="1" />
</Border>
<Border Margin="10px">
<Radiobutton ID="ChooseForm" Name="ChooseOperation" Value="2" Checked ="true"/>
</Border>
</Groupbox>
</WizardFormPage>


<WizardFormPage ID="FormName" Icon="Applications/32x32/form_green_add.png" >
<Groupbox Width="100%" Height="100%" Cellpadding="2" Style="table-layout:fixed;border:0px;width: auto !important;" Margin="10px 10px 10px 10px" >
<Border ColCount="2" Width="100%" Cellpadding="0" Margin="10px 10px 10px 10px">
<Literal ID="FormNameLiteral" Margin="5px 5px 5px 5px"/>
<Edit ID="EbFormName" Width="80%" Margin="0px 0px 0px 0px"/>
</Border>
</Groupbox>
</WizardFormPage>

<WizardFormPage ID="SelectForm" Icon="Applications/32x32/form_green_add.png" >
<GridPanel Width="100%" Cellpadding="0" Style="table-layout:fixed" Padding="10px">
<Scrollbox ID="ExistingForms" Width="96%" Position="absolute" Valign="top" Padding="10px 1px 10px 10px" style="overflow:auto;height:455px"/>
</GridPanel>
</WizardFormPage>

<WizardFormPage ID="SelectPlaceholder" Icon="Applications/32x32/form_green_add.png">
<Forms.PlaceholderList ID="Placeholders" />
</WizardFormPage>

<WizardFormPage ID="AnalyticsPage" Icon="Business/32x32/chart.png">

<Border Padding="10px">
<GridPanel Cellpadding="0" Style="table-layout:fixed" >
<Groupbox ID="AnalyticsOptions" Width="100%" Height="100%" Cellpadding="0" Style="table-layout:fixed;border-left:0px;border-right:0px;border-bottom:0px" Margin="0px 10px 0px 10px" >
<Border Padding="0px 0px 0px 20px" Margin="10px 0px 0px 0px">
<Radiobutton ID="CreateGoal" Name="GoalOperation" Value="yes" Click="form:creategoal"/>
<Border Padding="3px 0px 5px 2px">
<GridPanel Columns="2" Cellpadding="0" Padding="0px 0px 0px 20px" Margin="0px">
<Literal ID="GoalNameLiteral" GridPanel.Height="15px" />
<Literal ID="PointsLiteral" GridPanel.Height="15px" GridPanel.Width="35%" Margin="0px 0px 0px 10px"/>
<Edit ID="GoalName" Width="100%"/>
<Edit ID="Points" Class="Range" Margin="0px 0px 0px 10px" Value="0" Width="70%"/>
</GridPanel>

<script type="text/javascript" runat="server">
$j(".Range").numeric();
</script>

</Border>
</Border>
<Border GridPanel.vAlign="top" Height="100%" Padding="0px 0px 0px 20px" Margin="0px 0px 10px 0px">
<Radiobutton ID="SelectGoal" Name="GoalOperation" Value="no" Click="form:creategoal"/>
<DataContext ID="GoalsDataContext" DataViewName="Master" ShowRoot="false" Root="{0CB97A9F-CAFB-42A0-8BE1-89AB9AE32BD9}" Filter="Contains('{059CFBDF-49FC-4F14-A4E5-B63E1E1AFB1E},{475E9026-333F-432D-A4DC-52E03B75CB6B}, {A87A00B1-E6DB-45AB-8B54-636FEC3B5523}, {DB6E13B8-786C-4DD6-ACF2-3E5E6A959905}', @@templateid)" DefaultItem="{0CB97A9F-CAFB-42A0-8BE1-89AB9AE32BD9}"/>
<TreePickerEx ID="Goals" DataContext="GoalsDataContext" SelectOnly="true" AllowNone="false" Width="90%"/>
<script type="text/javascript" language="javascript">
$$('#Goals')[0].setAttribute("disabled", "1");
$$('.scComboboxDropDown')[0].disabled = true;
</script>
</Border>
<Border Padding="0px 10px 0px 10px" Margin="0px 0px 0px 10px" Style="color:#999999">
<Literal ID="SelectGoalLiteral"/>
</Border>
</Groupbox>
<Groupbox ID="DropoutOptions" Width="100%" Height="100%" Cellpadding="0" Style="table-layout:fixed;border-left:0px;border-right:0px;border-bottom:0px" Margin="10px" >
<Checkbox Margin="0px 3px 0px 20px" ID="EnableFormDropoutTracking" Click="form:trackingenable" style="margin-top:10px"/>
<Border Padding="10px 3px 0px 20px" Style="color:#999999">
<Literal ID="EnableFormDropoutTrackingLiteral" />
<br/>
<Literal ID="EnableDropoutSavedToLiteral"/>
</Border>
</Groupbox>
</GridPanel>
</Border>
</WizardFormPage>


<WizardFormPage ID="ConfirmationPage" Icon="Applications/32x32/form_green_add.png" >
<Scrollbox Border="none" Background="transparent" Height="100%" Padding="10px" style="overflow-x:hidden">
<Border ID="ChoicesPanel" Height="90%" Margin="0px 0px 16px 0px" >
<Border class="scWfmConfirmText" Padding="0px 10px 10px 10px" ID="ChoicesPane" >
<Literal ID="ChoicesLiteral"/>
</Border>
</Border>
</Scrollbox>
</WizardFormPage>

</WizardForm>
</Forms.InsertFormWizard>
</control>
4 changes: 4 additions & 0 deletions src/Sitecore.Support.156009/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- Do not change this file - it must be empty, see https://github.com/SitecoreSupport/PatchCreator/issues/13 -->
</configuration>

0 comments on commit 4d4738d

Please sign in to comment.