I am using Bootstrap 3 subtheme (7.x-3.1-beta2 ) on Drupal 7 for the administrative backend. It seems that the Bootstrap base theme replaces <input type="submit"> with a <button> element. That breaks the layout of the views backend.

I tried to change this by:

  • copying button.func.php into the subtheme
  • renaming the function according to the subtheme name
  • modifying the output to return instead of

Code in button.func.php

<?php
function bootstrap_subtheme_adl_admin_button($variables) {
  $element = $variables['element'];
  $value = $element['#value'];
   if (!empty($element['#icon'])) {
     if ($element['#icon_position'] === 'before') {
       $value = $element['#icon'] . ' ' . $value;
     }
   elseif ($element['#icon_position'] === 'after') {
     $value .= ' ' . $element['#icon'];
    }
  }

return '<input' . drupal_attributes($element['#attributes']) . '>\n';
}

However, this does not have any visible effect. Any advise?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

matthias.gattermeier’s picture

Strangely, if I edit the file in the base theme, this works without issues.

markhalliwell’s picture

Status: Active » Closed (won't fix)

1) This is likely due to a module's specificity of JS selectors (like: #2120849: Decrease Panels IPE CSS & JS specificity to allow "button" elements)
2) <button> is HTML5 and the direction the web is moving forward.
3) Search the issue queues.