DmitryEfimenko / TwitterBootstrapMvc

Fluent implementation of ASP.NET-MVC HTML helpers for Twitter Bootstrap.
Apache License 2.0
221 stars 78 forks source link

RadioButtonsFromEnumFor with DisplayInline block is not displaying inline #384

Closed RyanSeyAG closed 9 years ago

RyanSeyAG commented 9 years ago

@p.htmlHelper.Bootstrap().RadioButtonsFromEnumFor(m => m.SelectView).DisplayInlineBlock().InputHtmlAttributes(new { @onchange = "this.form.submit();" }).Label().ShowRequiredStar(false)

image

DmitryEfimenko commented 9 years ago

I do not see what is the problem. Please be more clear.

RyanSeyAG commented 9 years ago

The saved radio button is bit higher and out of line system button

image

DmitryEfimenko commented 9 years ago

It is probably due to some application specific css that gets applied to the radio button. Could you please paste html that is being generated for these two radio buttons?

RyanSeyAG commented 9 years ago
_SelectionView ``` ```
```

Query Selection
Design Inspect Save F12 changes ```
DmitryEfimenko commented 9 years ago

This is the section I was mostly concerned about:

<div class="input-list-container">
    <div class="radio checkbox-inline">
        <label for="SelectView_0">
            <input checked="checked" data-val="true" data-val-required="The Select a View field is required." id="SelectView_0" name="SelectView" onchange="this.form.submit();" type="radio" value="System">
            System
            <span class="required" style="visibility:hidden;">*</span>
        </label>
    </div>
    <div class="radio checkbox-inline">
        <label for="SelectView_1">
            <input id="SelectView_1" name="SelectView" onchange="this.form.submit();" type="radio" value="Saved">
            Saved
            <span class="required" style="visibility:hidden;">*</span>
        </label>
    </div>
</div>

It looks like Bootstrap specs have changed for inline radio buttons/checkboxes. They no longer need to be wrapped in the <div class="radio checkbox-inline">. I'll make the change. It'll have to be potentially a breaking change for others. I'll let you know when this is done.

DmitryEfimenko commented 9 years ago

This is fixed. Please get latest.