using FastReport.Web; using System; namespace FastReport.Web.Toolbar { /// /// Input field for the toolbar /// public class ToolbarInput : ToolbarElement { /// /// Type of input, which is specified in the type tag /// public string InputType { get; set; } /// /// Styles that are specified in the style tag for input /// public string InputCustomStyle { get; set; } /// /// Standard value for input /// public string InputDefaultValue { get; set; } /// /// Action to be triggered when user changes input value /// /// Can be either ElementScript or ElementChangeAction /// public IChangeAction OnChangeAction { get; set; } internal override string Render(string template_FR) { if (!Enabled) return default; var action = OnChangeAction is ElementScript elementScript ? elementScript.Script : $"{template_FR}.customMethodInvoke('{ID}', this.value)"; return $@"
"; } } }