daveaglick / FluentBootstrap

Provides extensions, helper classes, model binding, and other goodies to help you use the Bootstrap CSS framework from .NET code.
http://www.fluentbootstrap.com
MIT License
200 stars 76 forks source link

Update CheckBoxFor() and RadioFor() extensions #51

Closed snipervld closed 8 years ago

snipervld commented 8 years ago

Added support for setting description in CheckBoxFor() and RadioFor() extension methods Using:

@using(var form = Html.Bootstrap().Form().Begin())
{
   @form.CheckBoxFor(x => x.RememberMe, false) @*No label, but there is description. This method allows you to place text traditionally, after a tick.*@
}

Edit: Argh, i made an error: true instead of false And error in a commit, because initially i wanted to add isNameInLabel parameter to CheckBoxFor method, but lately found that RadioFor is similar to that method and need this parameter too. I typed parameter for RadioFor using GitHub web editor and missed type of parameter. I will check code in future

daveaglick commented 8 years ago

Thanks! I had to fix one little thing: int isNameInLabel = true in the arguments list for RadioFor() didn't compile, but it was clear enough what the intent was.