/// <summary> /// Renders a form suitable for BForms fields /// </summary> public static BsMvcForm BsBeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues, FormMethod method, IDictionary <string, object> htmlAttributes, BsTheme theme) { var form = htmlHelper.BeginForm(actionName, controllerName, routeValues, method, htmlAttributes); var tag = new TagBuilder("div"); tag.AddCssClass("row"); tag.AddCssClass("form_container"); tag.AddCssClass("loading"); tag.AddCssClass(theme.GetDescription()); var myForm = new BsMvcForm(htmlHelper.ViewContext, form, tag.ToString(TagRenderMode.StartTag), tag.ToString(TagRenderMode.EndTag)); return(myForm); }
/// <summary> /// Renders a form suitable for BForms fields /// </summary> public static BsMvcForm BsBeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues, FormMethod method, IDictionary<string, object> htmlAttributes, BsTheme theme) { var form = htmlHelper.BeginForm(actionName, controllerName, routeValues, method, htmlAttributes); var tag = new TagBuilder("div"); tag.AddCssClass("row"); tag.AddCssClass("form_container"); tag.AddCssClass("loading"); tag.AddCssClass(theme.GetDescription()); var myForm = new BsMvcForm(htmlHelper.ViewContext, form, tag.ToString(TagRenderMode.StartTag), tag.ToString(TagRenderMode.EndTag)); return myForm; }