Commit 00b34d7c authored by renatog's avatar renatog Committed by renatog
Browse files

Issue #3270591 by RenatoG: Insert #attributes class inside of form API for...

Issue #3270591 by RenatoG: Insert #attributes class inside of form API for bulk operation to identify the field with class and apply the logic in front-end
parent 491942f9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,14 +22,14 @@

          if (default_case == 'uppercase') {

            $('#edit-third-party-settings-block-class-classes, #edit-classes-to-be-added').keyup(function() {
            $('#edit-third-party-settings-block-class-classes, .block-class-bulk-operations-insert-classes_to_be_added, .block-class-bulk-operations-update-class-new-class').keyup(function() {
              $(this).val($(this).val().toUpperCase());
            });

          }
          else {

            $('#edit-third-party-settings-block-class-classes, #edit-classes-to-be-added').keyup(function() {
            $('#edit-third-party-settings-block-class-classes, .block-class-bulk-operations-insert-classes_to_be_added, .block-class-bulk-operations-update-class-new-class').keyup(function() {
              $(this).val($(this).val().toLowerCase());
            });

+4 −0
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@ class BlockClassBulkOperationsForm extends ConfigFormBase {
      ],
    ];

    $form['classes_to_be_added']['#attributes']['class'][] = 'block-class-bulk-operations-insert-classes_to_be_added';

    // Default field type for attributes.
    $field_type_attributes = 'textarea';

@@ -244,6 +246,8 @@ class BlockClassBulkOperationsForm extends ConfigFormBase {
      ],
    ];

    $form['new_class']['#attributes']['class'][] = 'block-class-bulk-operations-update-class-new-class';

    $form['current_attribute'] = [
      '#title' => $this->t("Current attribute"),
      '#type' => 'textfield',