Exemple #1
0
        public static HtmlTag FormFor(this IFubuPage view, object input)
        {
            if (input is string)
            {
                return(view.FormFor(input.As <string>()));
            }

            var search = ChainSearch.ByUniqueInputType(input.GetType(), "POST");

            return(view.FormFor(search, input));
        }
Exemple #2
0
        public static HtmlTag FormFor <TController>(this IFubuPage view, Expression <Action <TController> > expression)
        {
            var search = ChainSearch.ForMethod(expression, "POST");

            return(view.FormFor(search, null));
        }
Exemple #3
0
        public static HtmlTag FormFor <TInputModel>(this IFubuPage page) where TInputModel : new()
        {
            var search = ChainSearch.ByUniqueInputType(typeof(TInputModel), "POST");

            return(page.FormFor(search, new TInputModel()));
        }
Exemple #4
0
 public static HtmlTag FormFor <TInputModel>(this IFubuPage page, TInputModel model)
 {
     return(page.FormFor(ChainSearch.ByUniqueInputType(model.GetType(), "POST"), model));
 }
 public void basic_form_for()
 {
     page.FormFor().ShouldNotBeNull().ShouldBeOfType <FormTag>();
 }