Skip to content
Snippets Groups Projects

Added base class and removed button from actions

1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
@@ -165,7 +165,7 @@ function commerce_product_availability_webform_request_add_request_button(&$form
$target = $thirdPartySettings['cpawr_link_display_mode'] === 'blank' ? '_blank' : '_self';
// Classes logic:
$classes = ['button'];
$classes = ['button', 'commerce-product-availability-webform-request'];
if (!empty($thirdPartySettings['cpawr_additional_link_classes'])) {
$classes = array_merge($classes, $thirdPartySettings['cpawr_additional_link_classes']);
}
@@ -179,7 +179,11 @@ function commerce_product_availability_webform_request_add_request_button(&$form
'class' => $classes,
]);
$form['actions']['webform_request'] = [
// We don't put this into ['actions'] intentionally,
// as it would make things harder to theme in combination
// with add_to_cart button.
// @see https://www.drupal.org/project/commerce_product_availability/issues/3468292
$form['webform_request'] = [
'#theme' => 'commerce_product_availability_webform_request_link',
'#attributes' => $attributes->toArray(),
'#label' => $buttonLabel,
Loading