diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs index 121cffdb9b..589682a18c 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs @@ -545,16 +545,19 @@ namespace umbraco.controls { try { - RequiredFieldValidator rq = new RequiredFieldValidator(); - rq.ControlToValidate = dt.DataEditor.Editor.ID; - Control component = dt.DataEditor.Editor; // holder.FindControl(rq.ControlToValidate); - ValidationPropertyAttribute attribute = - (ValidationPropertyAttribute) - TypeDescriptor.GetAttributes(component)[typeof(ValidationPropertyAttribute)]; + var rq = new RequiredFieldValidator + { + ControlToValidate = dt.DataEditor.Editor.ID, + CssClass = "error" + }; + rq.Style.Add(HtmlTextWriterStyle.Display, "block"); + rq.Style.Add(HtmlTextWriterStyle.Padding, "2px"); + var component = dt.DataEditor.Editor; // holder.FindControl(rq.ControlToValidate); + var attribute = (ValidationPropertyAttribute)TypeDescriptor.GetAttributes(component)[typeof(ValidationPropertyAttribute)]; PropertyDescriptor pd = null; if (attribute != null) { - pd = TypeDescriptor.GetProperties(component, (Attribute[])null)[attribute.Name]; + pd = TypeDescriptor.GetProperties(component, null)[attribute.Name]; } if (pd != null) { @@ -578,17 +581,19 @@ namespace umbraco.controls { try { - RegularExpressionValidator rv = new RegularExpressionValidator(); - rv.ControlToValidate = dt.DataEditor.Editor.ID; - - Control component = dt.DataEditor.Editor; // holder.FindControl(rq.ControlToValidate); - ValidationPropertyAttribute attribute = - (ValidationPropertyAttribute) - TypeDescriptor.GetAttributes(component)[typeof(ValidationPropertyAttribute)]; + var rv = new RegularExpressionValidator + { + ControlToValidate = dt.DataEditor.Editor.ID, + CssClass = "error" + }; + rv.Style.Add(HtmlTextWriterStyle.Display, "block"); + rv.Style.Add(HtmlTextWriterStyle.Padding, "2px"); + var component = dt.DataEditor.Editor; // holder.FindControl(rq.ControlToValidate); + var attribute = (ValidationPropertyAttribute)TypeDescriptor.GetAttributes(component)[typeof(ValidationPropertyAttribute)]; PropertyDescriptor pd = null; if (attribute != null) { - pd = TypeDescriptor.GetProperties(component, (Attribute[])null)[attribute.Name]; + pd = TypeDescriptor.GetProperties(component, null)[attribute.Name]; } if (pd != null) { diff --git a/src/umbraco.controls/TabPage.cs b/src/umbraco.controls/TabPage.cs index 3cf43b78ab..9ac1fb0c2e 100644 --- a/src/umbraco.controls/TabPage.cs +++ b/src/umbraco.controls/TabPage.cs @@ -18,6 +18,7 @@ namespace umbraco.uicontrols { private bool _hasMenu = true; private readonly ScrollingMenu _menu = new ScrollingMenu(); protected LiteralControl ErrorHeaderControl = new LiteralControl(); + private LiteralControl _closeButtonControl = new LiteralControl(); private readonly ValidationSummary _vs = new ValidationSummary(); private readonly Control _tempErr = new Control(); @@ -61,7 +62,7 @@ namespace umbraco.uicontrols { // Add error pane _tempErr.Visible = false; _tempErr.ID = String.Format("{0}_errorPaneContainer", this.ID); - _tempErr.Controls.Add(new LiteralControl("
")); _tempErr.Controls.Add(_vs); @@ -84,6 +85,7 @@ namespace umbraco.uicontrols { protected override void Render(HtmlTextWriter writer) { + _closeButtonControl.Text = "