diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js index 1b51850..e7f64dc 100644 --- a/core/misc/vertical-tabs.js +++ b/core/misc/vertical-tabs.js @@ -149,7 +149,7 @@ // Display the tab. this.item.show(); // Show the vertical tabs. - this.item.closest('.form-type-vertical-tabs').show(); + this.item.closest('.js-form-type-vertical-tabs').show(); // Update .first marker for items. We need recurse from parent to retain the // actual DOM element order as jQuery implements sortOrder, but not as public // method. @@ -182,7 +182,7 @@ } // Hide the vertical tabs (if no tabs remain). else { - this.item.closest('.form-type-vertical-tabs').hide(); + this.item.closest('.js-form-type-vertical-tabs').hide(); } return this; } diff --git a/core/modules/locale/config/optional/tour.tour.locale.yml b/core/modules/locale/config/optional/tour.tour.locale.yml index e3f6d8d..0fe00d1 100644 --- a/core/modules/locale/config/optional/tour.tour.locale.yml +++ b/core/modules/locale/config/optional/tour.tour.locale.yml @@ -55,7 +55,7 @@ tips: body: 'You can write your own translation in the text fields of the right column. Try to figure out in which context the text will be used in order to translate it in the appropriate way.' weight: 6 attributes: - data-class: form-type-textarea + data-class: js-form-type-textarea locale-validate: id: locale-validate diff --git a/core/modules/system/src/Tests/Common/RenderWebTest.php b/core/modules/system/src/Tests/Common/RenderWebTest.php index c5b1152..f88a13d 100644 --- a/core/modules/system/src/Tests/Common/RenderWebTest.php +++ b/core/modules/system/src/Tests/Common/RenderWebTest.php @@ -91,7 +91,7 @@ function testDrupalRenderFormElements() { '#markup' => $this->randomMachineName(), ); $this->assertRenderedElement($element, '//div[contains(@class, :class) and contains(., :markup)]/label[contains(., :label)]', array( - ':class' => 'form-type-item', + ':class' => 'js-form-type-item', ':markup' => $element['#markup'], ':label' => $element['#title'], )); @@ -138,7 +138,7 @@ function testDrupalRenderFormElements() { '#markup' => $this->randomMachineName(), ); $this->assertRenderedElement($element, '//details/div/div[contains(@class, :class) and contains(., :markup)]', array( - ':class' => 'form-type-item', + ':class' => 'js-form-type-item', ':markup' => $element['item']['#markup'], )); } diff --git a/core/modules/system/templates/form-element.html.twig b/core/modules/system/templates/form-element.html.twig index a961801..dbbb830 100644 --- a/core/modules/system/templates/form-element.html.twig +++ b/core/modules/system/templates/form-element.html.twig @@ -48,7 +48,7 @@ {% set classes = [ 'form-item', - 'form-type-' ~ type|clean_class, + 'js-form-type-' ~ type|clean_class, 'form-item-' ~ name|clean_class, title_display not in ['after', 'before'] ? 'form-no-label', disabled == 'disabled' ? 'form-disabled', diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js index 7f217dc..b71c1d7 100644 --- a/core/modules/views_ui/js/views-admin.js +++ b/core/modules/views_ui/js/views-admin.js @@ -786,7 +786,7 @@ }); }); // Uncheck the select all checkbox if any of the others are unchecked. - $('#views-ui-handler-form').find('div.form-type-checkbox').not($('.form-item-options-value-all')) + $('#views-ui-handler-form').find('div.js-form-type-checkbox').not($('.form-item-options-value-all')) .find('input[type=checkbox]') .on('click', function () { if ($(this).is('checked') === false) { diff --git a/core/themes/classy/templates/form/form-element.html.twig b/core/themes/classy/templates/form/form-element.html.twig index cf54c20..5dc4000 100644 --- a/core/themes/classy/templates/form/form-element.html.twig +++ b/core/themes/classy/templates/form/form-element.html.twig @@ -46,6 +46,7 @@ {% set classes = [ 'form-item', + 'js-form-type-' ~ type|clean_class, 'form-type-' ~ type|clean_class, 'form-item-' ~ name|clean_class, title_display not in ['after', 'before'] ? 'form-no-label',