public static IHtmlContent SelectInputControl <T, TValue>( this IHtmlHelper <T> helper, Expression <Func <T, TValue> > exp, Lister lister, string display, string valueMember = null, bool required = false, string readOnlyProperty = null, bool nullable = true, object attrs = null, string inputClasses = "", string readOnlyPipe = null, string idExtra = "") { var Provider = helper.GetService <IElementsHelper>(); ControlGroupWriter mod = Provider.SelectInputControl(helper, exp, lister, display, valueMember, required, readOnlyProperty, nullable, attrs, inputClasses, readOnlyPipe, idExtra); if (!mod.Accessibility.Read) { return(null); } if (!mod.Accessibility.Write) { return(mod.GetLabelControl()); } return(mod.GetInputControl(InputControls.Select)); }
public virtual ControlGroupWriter RichLabel <T, TValue>(IHtmlHelper <T> helper, Expression <Func <T, TValue> > exp, int size, object attrs, object inputAttrs, string classes) { ControlGroupWriter wt = GetNewWriter(helper); wt.UseExpression(exp); wt.SetOptions(size, null, null, attrs, inputAttrs, null, classes); return(wt); }
public static IHtmlContent RichLabel <T, TValue>( this IHtmlHelper <T> helper, Expression <Func <T, TValue> > exp, int size = 6, object attrs = null, object inputAttrs = null, string classes = null) { var Provider = helper.GetService <IElementsHelper>(); ControlGroupWriter wt = Provider.RichLabel(helper, exp, size, attrs, inputAttrs, classes); return(wt.Write(InputControls.RichTextLabel)); }
public virtual ControlGroupWriter RichTextBox <T, TValue>(IHtmlHelper <T> helper, Expression <Func <T, TValue> > expression, string modules = null, int size = 6, object attrs = null, object inputAttrs = null, string classes = null) { ControlGroupWriter wt = GetNewWriter(helper); wt.UseExpression(expression); wt.SetOptions(size, null, null, attrs, inputAttrs, null, classes); wt.InputModel.AngularJsConfig = modules; return(wt); }
public static IHtmlContent CustomInputGroup <T, TValue>( this IHtmlHelper <T> helper, Expression <Func <T, TValue> > exp, string componentName, bool required = false, int size = 6, object attrs = null, object inputAttrs = null, string classes = null, string readonlyComponent = null ) { var Provider = helper.GetService <IElementsHelper>(); ControlGroupWriter wt = Provider.CustomInputGroup(helper, exp, componentName, required, size, attrs, inputAttrs, classes); if (readonlyComponent != null && !wt.Accessibility.Write) { wt.Accessibility = new CodeShellCore.Moldster.Razor.Accessibility(2); return(wt.Write(readonlyComponent)); } return(wt.Write(componentName)); }