This file contains hidden or 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
using Sitecore.Form.Core.Attributes; | |
using Sitecore.Form.Core.Visual; | |
using Sitecore.Form.Web.UI.Controls; | |
namespace MyProject.Integration.Wfm | |
{ | |
public class TermsAgreement : Checkbox | |
{ | |
[VisualProperty("Agreement Text:", 200)] | |
[VisualFieldType(typeof(TextAreaField))] |
This file contains hidden or 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
@using System.Web.Mvc.Html | |
@model MyProject.Integration.Wfm.TermsAgreementField | |
@if (!Model.Visible) | |
{ | |
return; | |
} | |
<div class="@Model.CssClass checkbox-border"> | |
<div class="@Model.CssClass field-panel"> |
This file contains hidden or 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
using Sitecore.Data.Items; | |
using Sitecore.Forms.Mvc.Attributes; | |
using Sitecore.Forms.Mvc.Controllers.ModelBinders.FieldBinders; | |
using Sitecore.Forms.Mvc.Models.Fields; | |
using Sitecore.Forms.Mvc.Validators; | |
namespace MyProject.Integration.Wfm | |
{ | |
public class TermsAgreementField : CheckBoxField | |
{ |
This file contains hidden or 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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<guide> | |
<InjectedClass type="MyProjectNamespace.InjectedClass, MyAssembly" /> | |
<InjectedClassDependency type="MyProjectNamespace.InjectedClassDependency, MyAssembly" /> | |
</guide> | |
</sitecore> | |
</configuration> |
This file contains hidden or 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
namespace MyProjectNamespace | |
{ | |
public interface IInjectedClassDependency | |
{ | |
} | |
public class InjectedClassDependency : IInjectedClassDependency | |
{ |
This file contains hidden or 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
namespace MyProjectNamespace | |
{ | |
public interface IInjectedClass | |
{ | |
int TestMethod(); | |
} | |
public class InjectedClass : IInjectedClass | |
{ | |
private readonly IInjectedClassDependency _classDependency; |
This file contains hidden or 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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<guide> | |
<InjectedClass type="MyProjectNamespace.InjectedClass, MyAssembly" /> | |
</guide> | |
</sitecore> | |
</configuration> |
This file contains hidden or 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
using System.Web.Mvc; | |
using Sitecore.Mvc.Controllers; | |
namespace MyProjectNamespace.Controllers | |
{ | |
public class TestController : SitecoreController | |
{ | |
private readonly IInjectedClass _injectedClass; | |
public TestController() | |
{ |
This file contains hidden or 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
namespace MyProjectNamespace | |
{ | |
public interface IInjectedClass | |
{ | |
int TestMethod(); | |
} | |
public class InjectedClass : IInjectedClass | |
{ | |
public int TestMethod() |
This file contains hidden or 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
using System; | |
using System.IO; | |
using System.Web; | |
using Sitecore.IO; | |
using Sitecore.Form.Core.Utility; | |
namespace MyProject | |
{ | |
public partial class ExportBinary : System.Web.UI.Page | |
{ |