Loading css/block-class.css +13 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,19 @@ display: none; } .hidden-attribute-field { display: none; } /* Attributes that will be managed dynamically using JS */ .multiple-textfield-attribute { display: none; } #edit-attributes-add-another-attribute { display: none; } #edit-attributes-remove-attribute { display: none; } src/Service/BlockClassHelperService.php +14 −0 Original line number Diff line number Diff line Loading @@ -548,6 +548,20 @@ class BlockClassHelperService { } $form['attributes']['add_another_attribute'] = [ '#type' => 'button', '#value' => 'Add another attribute', ]; $form['attributes']['add_another_attribute']['#attributes']['class'][] = 'block-class-add-another-attribute'; $form['attributes']['remove_attribute'] = [ '#type' => 'button', '#value' => 'Remove attribute', ]; $form['attributes']['remove_attribute']['#attributes']['class'][] = 'block-class-remove-attribute'; // Get the field type if exists. if (!empty($config->get('field_type_attributes'))) { $field_type_attributes = $config->get('field_type_attributes'); Loading Loading
css/block-class.css +13 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,19 @@ display: none; } .hidden-attribute-field { display: none; } /* Attributes that will be managed dynamically using JS */ .multiple-textfield-attribute { display: none; } #edit-attributes-add-another-attribute { display: none; } #edit-attributes-remove-attribute { display: none; }
src/Service/BlockClassHelperService.php +14 −0 Original line number Diff line number Diff line Loading @@ -548,6 +548,20 @@ class BlockClassHelperService { } $form['attributes']['add_another_attribute'] = [ '#type' => 'button', '#value' => 'Add another attribute', ]; $form['attributes']['add_another_attribute']['#attributes']['class'][] = 'block-class-add-another-attribute'; $form['attributes']['remove_attribute'] = [ '#type' => 'button', '#value' => 'Remove attribute', ]; $form['attributes']['remove_attribute']['#attributes']['class'][] = 'block-class-remove-attribute'; // Get the field type if exists. if (!empty($config->get('field_type_attributes'))) { $field_type_attributes = $config->get('field_type_attributes'); Loading