2010-10-19 13:42:59 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using umbraco.cms.businesslogic.datatype;
|
|
|
|
|
|
using System.Web.UI.WebControls;
|
|
|
|
|
|
|
|
|
|
|
|
namespace umbraco.editorControls.SettingControls
|
|
|
|
|
|
{
|
|
|
|
|
|
public class TextField : DataEditorSettingType
|
|
|
|
|
|
{
|
|
|
|
|
|
private TextBox tb = new TextBox();
|
|
|
|
|
|
|
|
|
|
|
|
public override string Value
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return tb.Text;
|
|
|
|
|
|
}
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
tb.Text = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override System.Web.UI.Control RenderControl(DataEditorSetting sender)
|
|
|
|
|
|
{
|
|
|
|
|
|
tb.ID = sender.GetName();
|
|
|
|
|
|
tb.TextMode = TextBoxMode.SingleLine;
|
|
|
|
|
|
tb.CssClass = "guiInputText guiInputStandardSize";
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-21 14:23:57 +00:00
|
|
|
|
if (string.IsNullOrEmpty(tb.Text) && !string.IsNullOrEmpty(DefaultValue))
|
|
|
|
|
|
tb.Text = DefaultValue;
|
2010-10-19 13:42:59 +00:00
|
|
|
|
|
|
|
|
|
|
return tb;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|