diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs index 6ae751de14..47a76aafe7 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs @@ -33,11 +33,6 @@ namespace umbraco.controls public class ContentControl : TabView { - public ContentControl() - { - //by default set this to true for content - SavePropertyDataWhenInvalid = true; - } internal Dictionary DataTypes = new Dictionary(); private readonly Content _content; @@ -54,7 +49,13 @@ namespace umbraco.controls private readonly CustomValidator _nameTxtCustomValidator = new CustomValidator(); private static readonly string UmbracoPath = SystemDirectories.Umbraco; public Pane PropertiesPane = new Pane(); + // zb-00036 #29889 : load it only once + List _virtualTabs; + //default to true! + private bool _savePropertyDataWhenInvalid = true; + private ContentType _contentType; + public Content ContentObject { get { return _content; } @@ -71,7 +72,11 @@ namespace umbraco.controls /// to the database when the page is invalid because there is no published state. /// Relates to: http://issues.umbraco.org/issue/U4-227 /// - public bool SavePropertyDataWhenInvalid { get; set; } + public bool SavePropertyDataWhenInvalid + { + get { return _savePropertyDataWhenInvalid; } + set { _savePropertyDataWhenInvalid = value; } + } [Obsolete("This is no longer used and will be removed from the codebase in future versions")] private string _errorMessage = ""; @@ -87,10 +92,7 @@ namespace umbraco.controls { } - // zb-00036 #29889 : load it only once - private List _virtualTabs; - private ContentType _contentType; - + /// /// Constructor to set default properties. ///