Verified Commit ec1d3ec6 authored by Matt Obert's avatar Matt Obert Committed by Bill Seremetis
Browse files

Issue #3254213 by Will Kirchheimer, hotwebmatter: Span and Label needed to support theming

parent d8949a6a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ use Drupal\Core\Block\BlockBase;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Form\FormBuilder;
use Drupal\Core\Render\Markup;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Routing\CurrentRouteMatch;
use Drupal\Core\Session\AccountInterface;
@@ -92,6 +93,8 @@ class AdminFeedbackBlock extends BlockBase implements ContainerFactoryPluginInte

    if ($node && !is_string($node)) {

      $nid = $node->id();

      $build = [
        'feedback_content' => [
          '#type' => 'container',
@@ -111,8 +114,12 @@ class AdminFeedbackBlock extends BlockBase implements ContainerFactoryPluginInte
            'yes_button' => [
              '#type' => 'button',
              '#value' => $config->get('yes_button'),
              '#prefix' => '<span class="feedback-yes-button">',
              '#suffix' => '</span>',
              '#markup' => Markup::create('<label for = "feedback-yes-button-' . $nid . '"></label>'),
              '#attributes' => [
                'class' => ['feedback-btn feedback-btn__yes'],
                'id' => ['feedback-yes-button-' . $nid],
                'data-node-id' => $node->id(),
                'data-feedback' => 'yes',
              ],
@@ -120,8 +127,12 @@ class AdminFeedbackBlock extends BlockBase implements ContainerFactoryPluginInte
            'no_button' => [
              '#type' => 'button',
              '#value' => $config->get('no_button'),
              '#prefix' => '<span class="feedback-no-button">',
              '#suffix' => '</span>',
              '#markup' => Markup::create('<label for = "feedback-no-button-' . $nid . '"></label>'),
              '#attributes' => [
                'class' => ['feedback-btn feedback-btn__no'],
                'id' => ['feedback-no-button-' . $nid],
                'data-node-id' => $node->id(),
                'data-feedback' => 'no',
              ],