Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2014-12-18 at 4.00.52 PM.png | 44.85 KB | matthias.gattermeier |
Comments
Comment #1
matthias.gattermeier CreditAttribution: matthias.gattermeier commentedStrangely, if I edit the file in the base theme, this works without issues.
Comment #2
markhalliwell1) 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.