diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php index 6b408991cc0243ba47829d500aa9602ba925057c..5c3da0a1bf5957e66689103a22687e84be15510b 100644 --- a/core/lib/Drupal/Core/Field/WidgetBase.php +++ b/core/lib/Drupal/Core/Field/WidgetBase.php @@ -286,6 +286,7 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f '#name' => strtr($id_prefix, '-', '_') . '_add_more', '#value' => $this->t('Add another item'), '#attributes' => ['class' => ['field-add-more-submit']], + '#button_type' => 'small', '#limit_validation_errors' => [], '#submit' => [[static::class, 'addMoreSubmit']], '#ajax' => [ diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme index 207ec48ac7a3e2024c05b413e74b395c619cbd36..c406fed47c22b286d4c074bd10eaeb8f5e55ceb1 100644 --- a/core/themes/claro/claro.theme +++ b/core/themes/claro/claro.theme @@ -1113,11 +1113,6 @@ function claro_preprocess_field_multiple_value_form(&$variables): void { } } } - - // Make add-more button smaller. - if (!empty($variables['button'])) { - $variables['button']['#attributes']['class'][] = 'button--small'; - } } }