Commit 6595170b authored by renatog's avatar renatog Committed by renatog
Browse files

Issue #3272342 by RenatoG: Add a help text about the quantity of block classes...

Issue #3272342 by RenatoG: Add a help text about the quantity of block classes dynamic bellow the last item populated
parent 52f4654e
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -367,13 +367,6 @@ class BlockClassHelperService {
        '@url_used_items_list@' => $url_used_items_list,
      ]);

      // Inform the number of maximum items in the settings page and put the
      // link to update that if necessary.
      $help_text .= ' ' . $this->t('The maximum of classes per block is @qty_classes_per_block@ but if you need you can update this value in the <a href="@url_settings_page@">settings page</a>', [
        '@qty_classes_per_block@' => $qty_classes_per_block,
        '@url_settings_page@' => $url_settings_page,
      ]);

      $form['class'] = [
        '#type' => 'details',
        '#title' => $this->t('Class'),
@@ -503,6 +496,15 @@ class BlockClassHelperService {
        // Add the class to identity the "Remove item" button.
        $form['class']['third_party_settings']['block_class']['remove_item']['#attributes']['class'][] = 'block-class-remove-item';

        $help_text_qty_items .= ' ' . $this->t('The maximum of classes per block is @qty_classes_per_block@ but if you need you can update this value in the <a href="@url_settings_page@">settings page</a>', [
          '@qty_classes_per_block@' => $qty_classes_per_block,
          '@url_settings_page@' => $url_settings_page,
        ]);

        $form['class']['third_party_settings']['block_class']['help_text_qty_items'] = [
          '#type' => 'markup',
          '#markup' => '<p>' . $help_text_qty_items . '</p>',
        ];
      }

      $form['class']['third_party_settings']['block_class']['classes']['#attributes']['class'][] = 'block-class-class';