-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ae5af5
commit f8e2eb2
Showing
7 changed files
with
217 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("{CF28E5EC-85A2-4387-9BF3-D34101310A5B}") = "Sitecore.Support.66989", "Sitecore.Support.66989\Sitecore.Support.66989.csproj", "{F773FAE6-4583-47B4-A3DD-2412ED354036}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F773FAE6-4583-47B4-A3DD-2412ED354036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F773FAE6-4583-47B4-A3DD-2412ED354036}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F773FAE6-4583-47B4-A3DD-2412ED354036}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F773FAE6-4583-47B4-A3DD-2412ED354036}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
7 changes: 7 additions & 0 deletions
7
src/Sitecore.Support.66989/App_Config/Include/zzz/Sitecore.Support.66989.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> | ||
<sitecore> | ||
<commands> | ||
<command name="forms:setsubmitactions" type="Sitecore.Support.Forms.Core.Commands.SetSubmitActions,Sitecore.Support.66989" patch:instead="command[@name='forms:setsubmitactions']" /> | ||
</commands> | ||
</sitecore> | ||
</configuration> |
75 changes: 75 additions & 0 deletions
75
src/Sitecore.Support.66989/Forms/Core/Commands/SetSubmitActions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
using Sitecore.Data; | ||
using Sitecore.Data.Items; | ||
using Sitecore.Diagnostics; | ||
using Sitecore.Form.Core.ContentEditor.Data; | ||
using Sitecore.Forms.Core.Data; | ||
using Sitecore.Globalization; | ||
using Sitecore.Text; | ||
using Sitecore.Web; | ||
using Sitecore.Web.UI.Sheer; | ||
using Sitecore.WFFM.Abstractions.Dependencies; | ||
using System; | ||
using System.Web; | ||
|
||
namespace Sitecore.Support.Forms.Core.Commands | ||
{ | ||
[Serializable] | ||
public class SetSubmitActions : Sitecore.Forms.Core.Commands.SetSubmitActions | ||
{ | ||
protected new void Run(ClientPipelineArgs args) | ||
{ | ||
Assert.ArgumentNotNull(args.Parameters["id"], "id"); | ||
Assert.ArgumentNotNull(args.Parameters["db"], "db"); | ||
ItemUri uri = new ItemUri(ID.Parse(args.Parameters["id"]), Language.Parse(args.Parameters["la"]), Data.Version.Latest, args.Parameters["db"]); | ||
Item innerItem = Database.GetItem(uri); | ||
if (SheerResponse.CheckModified() && (innerItem != null)) | ||
{ | ||
if (args.IsPostBack) | ||
{ | ||
UrlString urlString = new UrlString(args.Parameters["url"]); | ||
UrlHandle handle = UrlHandle.Get(urlString); | ||
innerItem.Editing.BeginEdit(); | ||
innerItem.Fields["__Tracking"].Value = handle["tracking"]; | ||
if (args.HasResult) | ||
{ | ||
ListDefinition definition = ListDefinition.Parse((args.Result == "-") ? string.Empty : args.Result); | ||
if (args.Parameters["mode"] == "save") | ||
{ | ||
innerItem.Fields[Sitecore.Form.Core.Configuration.FieldIDs.SaveActionsID].Value = definition.ToXml(); | ||
} | ||
else | ||
{ | ||
innerItem.Fields[Sitecore.Form.Core.Configuration.FieldIDs.CheckActionsID].Value = definition.ToXml(); | ||
} | ||
} | ||
innerItem.Editing.EndEdit(); | ||
} | ||
else | ||
{ | ||
string name = ID.NewID.ToString(); | ||
UrlString str3 = new UrlString(UIUtil.GetUri("control:SubmitCommands.Editor")); | ||
FormItem item2 = new FormItem(innerItem); | ||
ListDefinition definition2 = ListDefinition.Parse((args.Parameters["mode"] == "save") ? item2.SaveActions : item2.CheckActions); | ||
HttpContext.Current.Session.Add(name, definition2); | ||
str3.Append("definition", name); | ||
str3.Add("id", args.Parameters["id"]); | ||
str3.Add("db", args.Parameters["db"]); | ||
str3.Add("la", args.Parameters["la"]); | ||
str3.Append("root", args.Parameters["root"]); | ||
str3.Append("system", args.Parameters["system"] ?? string.Empty); | ||
args.Parameters.Add("params", name); | ||
UrlHandle handle2 = new UrlHandle(); | ||
handle2["title"] = DependenciesManager.ResourceManager.Localize((args.Parameters["mode"] == "save") ? "SELECT_SAVE_TITLE" : "SELECT_CHECK_TITLE"); | ||
handle2["desc"] = DependenciesManager.ResourceManager.Localize((args.Parameters["mode"] == "save") ? "SELECT_SAVE_DESC" : "SELECT_CHECK_DESC"); | ||
handle2["actions"] = DependenciesManager.ResourceManager.Localize((args.Parameters["mode"] == "save") ? "SAVE_ACTIONS" : "CHECK_ACTIONS"); | ||
handle2["addedactions"] = DependenciesManager.ResourceManager.Localize((args.Parameters["mode"] == "save") ? "ADDED_SAVE_ACTIONS" : "ADDED_CHECK_ACTIONS"); | ||
handle2["tracking"] = item2.Tracking.ToString(); | ||
handle2.Add(str3); | ||
args.Parameters["url"] = str3.ToString(); | ||
Context.ClientPage.ClientResponse.ShowModalDialog(str3.ToString(), true); | ||
args.WaitForPostBack(); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.66989")] | ||
[assembly: AssemblyProduct("Sitecore.Support.66989")] | ||
[assembly: ComVisible(false)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?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>{F773FAE6-4583-47B4-A3DD-2412ED354036}</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.66989</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> | ||
</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.0\lib\Sitecore.Kernel.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Sitecore.Forms.Core"> | ||
<HintPath>..\packages\WFFM.Sitecore.Forms.Core.8.2.0\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.0\lib\Sitecore.WFFM.Abstractions.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Web" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Configuration" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Forms\Core\Commands\SetSubmitActions.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="App_Config\Include\zzz\Sitecore.Support.66989.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
<None Include="web.config" /> | ||
</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:62735/</IISUrl> | ||
<NTLMAuthentication>False</NTLMAuthentication> | ||
<UseCustomServer>False</UseCustomServer> | ||
<CustomServerUrl> | ||
</CustomServerUrl> | ||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> | ||
</WebProjectProperties> | ||
</FlavorProperties> | ||
</VisualStudio> | ||
</ProjectExtensions> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.0" targetFramework="net452" /> | ||
<package id="WFFM.Sitecore.Forms.Core" version="8.2.0" targetFramework="net452" /> | ||
<package id="WFFM.Sitecore.WFFM.Abstractions" version="8.2.0" targetFramework="net452" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |