Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Process / TextFormat.php
index ab0a0b755e60f47968d3fb952ea075434f623e18..6b79e5a0564a828b8aaf7cde414a98a2c1a3460f 100644 (file)
@@ -1,12 +1,7 @@
 <?php
-/**
- * @file
- * Contains \Drupal\bootstrap\Plugin\Process\TextFormat.
- */
 
 namespace Drupal\bootstrap\Plugin\Process;
 
-use Drupal\bootstrap\Annotation\BootstrapProcess;
 use Drupal\bootstrap\Bootstrap;
 use Drupal\bootstrap\Utility\Element;
 use Drupal\Core\Form\FormStateInterface;
@@ -26,6 +21,10 @@ class TextFormat extends ProcessBase implements ProcessInterface {
    * {@inheritdoc}
    */
   public static function processElement(Element $element, FormStateInterface $form_state, array &$complete_form) {
+    // Don't add the form-group class to the actual textarea element since
+    // text_format elements are already wrapped.
+    $element->value->setProperty('form_group', FALSE);
+
     if (isset($element->format)) {
       $element->format->addClass('form-inline');