<?php
-/**
- * @file
- * Contains \Drupal\bootstrap\Plugin\Preprocess\FormElement.
- */
namespace Drupal\bootstrap\Plugin\Preprocess;
-use Drupal\bootstrap\Annotation\BootstrapPreprocess;
use Drupal\bootstrap\Utility\Element;
use Drupal\bootstrap\Utility\Variables;
$variables['is_autocomplete'] = TRUE;
}
- // See http://getbootstrap.com/css/#forms-controls.
+ // See https://getbootstrap.com/docs/3.3/css/#forms-controls.
$checkbox = $variables['is_checkbox'] = $element->isType('checkbox');
$radio = $variables['is_radio'] = $element->isType('radio');
// Determine if the form element should have the "form-group" class added.
// Use an explicitly set property from the element or use its other
// properties as the criteria to determine if it should be set.
- $variables['is_form_group'] = $element->getProperty('form_group', !$variables['is_checkbox'] && !$variables['is_radio'] && !$element->isType(['hidden', 'textarea']));
+ $variables['is_form_group'] = $element->getProperty('form_group', !$checkbox && !$radio && !$element->isType('hidden'));
// Add label_display and label variables to template.
$display = $variables['label_display'] = $variables['title_display'] = $element->getProperty('title_display');