You are here

function webform_bootstrap_preprocess_file_managed_file in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_bootstrap/webform_bootstrap.module \webform_bootstrap_preprocess_file_managed_file()

Implements template_preprocess_file_managed_file().

See also

webform_preprocess_file_managed_file()

File

modules/webform_bootstrap/webform_bootstrap.module, line 200
Helps support Webform to Bootstrap integration.

Code

function webform_bootstrap_preprocess_file_managed_file(&$variables) {
  if (!_webform_bootstrap_is_active_theme()) {
    return;
  }
  $element =& $variables['element'];
  if (empty($element['#button'])) {
    return;
  }

  // Convert .button classes to .btn CSS classes.
  if (isset($element['label']['#attributes']['class'])) {
    _webform_bootstrap_convert_button_classes($element['label']['#attributes']['class']);
  }
}