On /admin/content page there is no checkboxes visible. All tables with '#type' => 'tableselect' also don't have checkboxes.
Bootstrap 3.3.4, Dev version of theme.

Issue fork bootstrap-2461717

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

AlexKirienko’s picture

Issue summary: View changes
AlexKirienko’s picture

Dirty quick-fix. But it have to be a better way to solve this issue.

AlexKirienko’s picture

Status: Active » Needs review
AlexKirienko’s picture

Source of problem - different checkbox html in Drupal.

Bootstrap HTML:

<div class="checkbox">
    <label>
      <input type="checkbox"> Check me out
    </label>
  </div>

Drupal HTML

<div class="checkbox">
  <label class="element-invisible control-label"> </label>
 <input type="checkbox" >
</div>
AlexKirienko’s picture

VBO checkboxes also have same problem with visibility.

AlexKirienko’s picture

Title: Checkboxes not visible on content list page » Checkboxes not visible on content list page and VBO
AlexKirienko’s picture

StatusFileSize
new892 bytes

Updated dirty fix for table-select and VBO

markhalliwell’s picture

Title: Checkboxes not visible on content list page and VBO » Checkbox and radio input elements should be rendered inside label
Component: CSS Overrides » Code
Status: Needs review » Needs work
Related issues: +#2292899: Checkbox and radio inputs are rendered outside their labels

I thought this had been fixed by the related issue, however after taking a look at this in more detail there is quite a bit of refactoring that needs to happen with this.

I will commit a (non-css hack) fix shortly.

markhalliwell’s picture

Priority: Normal » Major

Oops, forgot to bump the severity of the issue.

  • markcarver committed 9e69717 on 7.x-3.x
    Issue #2461717 by AlexKirienko, markcarver: Checkbox and radio input...
markhalliwell’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Assigned: Unassigned » neardark
Status: Needs work » Patch (to be ported)

@neardark, could you port this so it's as close to possible on 7.x-3.x? I was just going to copy & paste the relevant bits, but the entire form element and label theme implementations are very different on 8.x-3.x. Thanks!

  • markcarver committed a0bfe87 on 7.x-3.x
    Issue #2461717 by AlexKirienko, markcarver: Checkbox and radio input...

  • markcarver committed 6347667 on 7.x-3.x
    Issue #2461717 by AlexKirienko, markcarver: Checkbox and radio input...
neardark’s picture

Assigned: neardark » Unassigned
Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

pringlz’s picture

Here solution)
https://www.drupal.org/node/2644016#comment-11114017

Another solution for question "How to styling by css input radios inside the label?" For Bootstrap theme its problem))

sites/all/themes/bootstrap/templates/system/form-element-label.func.php

In lines with $output add to $title span tag line 70, 80, 89

W.M.’s picture

@AlexKirienko .. Thank you for pointing to the template difference between Bootstrap and Drupal's default when it comes to checkboxes. I was trying to understand why my checkboxes rendered the way the did, I needed to have input and label tags on the same DOM level. The fix was simply to copy theme_form_element and theme_form_element_label to my custom Bootsrap's theme template.php (and renaming them to my custom theme's name) and that's it: now checkboxes behave the Drupal's way.

ericjenkins’s picture

The approach suggested by @W.M. worked for me, as well. Thank you! I copied the entire contents of the theme_form_element() and theme_form_element_label() functions into my custom theme's template.php file, and even though I lost some styling, I was able to fix that with CSS and restore the radio input/label hierarchy I was seeking - the original Drupal-based hierarchy.

nithinkolekar’s picture

I think by default label text should be wrapped inside span other wise its difficult to theme.
Ref: https://ux.stackexchange.com/a/104517 https://stackoverflow.com/a/13317256

nithinkolekar’s picture

Actually porting my sandbox module to d8 which requires input-radio to have disabled and checked which worked until I tested it with bootstrap theme. So I ended up with https://drupal.stackexchange.com/questions/228989/within-bootstrap-theme...

while searching for the solution I found https://stackoverflow.com/questions/774054/should-i-put-input-tags-insid... which explains more technically about this issue.

3CWebDev made their first commit to this issue’s fork.