diff --git a/core/misc/machine-name.js b/core/misc/machine-name.js index 2b304bf87a2290140e9c8b1d31b213bcd858da86..688c4b6bade27f42e14a4522b7d8e81f832b25b1 100644 --- a/core/misc/machine-name.js +++ b/core/misc/machine-name.js @@ -92,7 +92,7 @@ var $source = $context.find(source_id).addClass('machine-name-source').once('machine-name'); var $target = $context.find(options.target).addClass('machine-name-target'); var $suffix = $context.find(options.suffix); - var $wrapper = $target.closest('.form-item'); + var $wrapper = $target.closest('.js-form-item'); // All elements have to exist. if (!$source.length || !$target.length || !$suffix.length || !$wrapper.length) { return; diff --git a/core/misc/states.js b/core/misc/states.js index c10e3069e415ecef805ad0f4a9bf9e11af1f098b..c87bf581fedc6f4201c88f8591274e3fd958f011 100644 --- a/core/misc/states.js +++ b/core/misc/states.js @@ -596,7 +596,7 @@ if (e.trigger) { $(e.target) .prop('disabled', e.value) - .closest('.form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value) + .closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value) .find('select, input, textarea').prop('disabled', e.value); // Note: WebKit nightlies don't reflect that change correctly. @@ -607,21 +607,21 @@ $(document).on('state:required', function (e) { if (e.trigger) { if (e.value) { - var $label = $(e.target).attr({'required': 'required', 'aria-required': 'aria-required'}).closest('.form-item, .js-form-wrapper').find('label'); + var $label = $(e.target).attr({'required': 'required', 'aria-required': 'aria-required'}).closest('.js-form-item, .js-form-wrapper').find('label'); // Avoids duplicate required markers on initialization. if (!$label.hasClass('js-form-required').length) { $label.addClass('js-form-required form-required'); } } else { - $(e.target).removeAttr('required aria-required').closest('.form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required'); + $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required'); } } }); $(document).on('state:visible', function (e) { if (e.trigger) { - $(e.target).closest('.form-item, .js-form-submit, .js-form-wrapper').toggle(e.value); + $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggle(e.value); } }); diff --git a/core/modules/filter/filter.filter_html.admin.js b/core/modules/filter/filter.filter_html.admin.js index 75a9824b4ea0f4692d8ea8547f9b42937ed3afd0..a52edd18c8f088ae830b308bfe7521b79bd41e6f 100644 --- a/core/modules/filter/filter.filter_html.admin.js +++ b/core/modules/filter/filter.filter_html.admin.js @@ -76,7 +76,7 @@ var that = this; $(context).find('[name="filters[filter_html][settings][allowed_html]"]').once('filter-filter_html-updating').each(function () { that.$allowedHTMLFormItem = $(this); - that.$allowedHTMLDescription = that.$allowedHTMLFormItem.closest('.form-item').find('.description'); + that.$allowedHTMLDescription = that.$allowedHTMLFormItem.closest('.js-form-item').find('.description'); that.userTags = that._parseSetting(this.value); // Update the new allowed tags based on added text editor features. diff --git a/core/modules/filter/templates/text-format-wrapper.html.twig b/core/modules/filter/templates/text-format-wrapper.html.twig index 367de098341c613b8452a330724288b5e46281c3..de61d923c8312053e0fd2a54de044169be4c4b18 100644 --- a/core/modules/filter/templates/text-format-wrapper.html.twig +++ b/core/modules/filter/templates/text-format-wrapper.html.twig @@ -15,7 +15,7 @@ * @ingroup themeable */ #} -
+
{{ children }} {% if description %} {{ description }}
diff --git a/core/modules/language/templates/language-negotiation-configure-form.html.twig b/core/modules/language/templates/language-negotiation-configure-form.html.twig index 8bddb46d84260a71986a8c0751d63603db0e3a96..12528acd4400b31fd900c269b2ac212388cae9de 100644 --- a/core/modules/language/templates/language-negotiation-configure-form.html.twig +++ b/core/modules/language/templates/language-negotiation-configure-form.html.twig @@ -23,6 +23,7 @@ {% for language_type in language_types %} {% set language_classes = [ + 'js-form-item', 'form-item', 'table-language-group', 'table-' ~ language_type.type ~ '-wrapper', diff --git a/core/modules/locale/locale.admin.js b/core/modules/locale/locale.admin.js index 6bfe59418280b13d402ab01272f7fddfc8cb3f50..be54349f24bcb355a25831e031fe9a27583957de 100644 --- a/core/modules/locale/locale.admin.js +++ b/core/modules/locale/locale.admin.js @@ -36,7 +36,7 @@ $row.addClass('changed'); // Add an asterisk only once if row changed. if ($rowToMark.length) { - $rowToMark.find('td:first-child .form-item').append(marker); + $rowToMark.find('td:first-child .js-form-item').append(marker); } }); } diff --git a/core/modules/system/templates/field-multiple-value-form.html.twig b/core/modules/system/templates/field-multiple-value-form.html.twig index f18a85366a161440fdd7026776e2c6f628435e1e..348621ce98ca965a656b0d68ef8d057efb598fa7 100644 --- a/core/modules/system/templates/field-multiple-value-form.html.twig +++ b/core/modules/system/templates/field-multiple-value-form.html.twig @@ -20,7 +20,7 @@ */ #} {% if multiple %} -
+
{{ table }} {% if description %}
{{ description }}
diff --git a/core/modules/system/templates/fieldset.html.twig b/core/modules/system/templates/fieldset.html.twig index d8372a759e9e608066bfc00cabe2006e40ce3fa2..b67ec85f3cdc040c5276cbb155d9501c1d1a6a83 100644 --- a/core/modules/system/templates/fieldset.html.twig +++ b/core/modules/system/templates/fieldset.html.twig @@ -24,6 +24,7 @@ #} {% set classes = [ + 'js-form-item', 'form-item', 'js-form-wrapper', 'form-wrapper', diff --git a/core/modules/system/templates/form-element.html.twig b/core/modules/system/templates/form-element.html.twig index 9292fd7e3d3cd1287e099b50447160b177a3f4b0..2599e3436228a4f59363d828343b2bd20bc80107 100644 --- a/core/modules/system/templates/form-element.html.twig +++ b/core/modules/system/templates/form-element.html.twig @@ -48,6 +48,7 @@ #} {% set classes = [ + 'js-form-item', 'form-item', 'js-form-type-' ~ type|clean_class, 'form-item-' ~ name|clean_class, diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php index 7adaa167cab3d0c8625cf9479105174c9d063556..38c0f2db3a588c93f0ddc6c4c24e90cb7f5ff2cc 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -154,7 +154,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { $vocabulary = $this->vocabularyStorage->load($this->options['vid']); if (empty($vocabulary) && $this->options['limit']) { $form['markup'] = array( - '#markup' => '
' . $this->t('An invalid vocabulary is selected. Please change it in the options.') . '
', + '#markup' => '
' . $this->t('An invalid vocabulary is selected. Please change it in the options.') . '
', ); return; } diff --git a/core/modules/text/text.js b/core/modules/text/text.js index 382b6f2fc00b4af970d14da30b4e074c380de3c7..54da56c5e118b19233fc96372a34e6d4601de56b 100644 --- a/core/modules/text/text.js +++ b/core/modules/text/text.js @@ -22,7 +22,7 @@ var $summary = $widget.find('.js-text-summary-wrapper'); var $summaryLabel = $summary.find('label').eq(0); - var $full = $widget.find('.js-text-full').closest('.form-item'); + var $full = $widget.find('.js-text-full').closest('.js-form-item'); var $fullLabel = $full.find('label').eq(0); // Create a placeholder label when the field cardinality is greater diff --git a/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php b/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php index cdd235e850e210d90b78c66e17271a308fca6533..2f6fab1a6dae88c0847f1d4698546d25582c26e7 100644 --- a/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php +++ b/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php @@ -69,7 +69,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['description'] = array( '#type' => 'container', '#attributes' => array( - 'class' => array('form-item', 'description'), + 'class' => array('js-form-item', 'form-item', 'description'), ), 'description_top' => array( '#markup' => '

' . $description_top . '

', diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index a049afc9cbc6998d7bbe01625e917cdff5b61d3c..09fa1291efcc3867fc79fe7825a82f844fe40781 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -1543,7 +1543,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $access_plugin = $this->getPlugin('access'); if ($access_plugin->usesOptions()) { $form['markup'] = array( - '#prefix' => '
', + '#prefix' => '
', '#markup' => $this->t('You may also adjust the !settings for the currently selected access restriction.', array('!settings' => $this->optionLink(t('settings'), 'access_options'))), '#suffix' => '
', ); @@ -1580,7 +1580,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $cache_plugin = $this->getPlugin('cache'); if ($cache_plugin->usesOptions()) { $form['markup'] = array( - '#prefix' => '
', + '#prefix' => '
', '#suffix' => '
', '#markup' => $this->t('You may also adjust the !settings for the currently selected cache mechanism.', array('!settings' => $this->optionLink(t('settings'), 'cache_options'))), ); @@ -1652,7 +1652,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { if ($style_plugin->usesOptions()) { $form['markup'] = array( - '#prefix' => '
', + '#prefix' => '
', '#suffix' => '
', '#markup' => $this->t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'style_options'))), ); @@ -1700,7 +1700,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { if ($row_plugin_instance->usesOptions()) { $form['markup'] = array( - '#prefix' => '
', + '#prefix' => '
', '#suffix' => '
', '#markup' => $this->t('You may also adjust the !settings for the currently selected row style.', array('!settings' => $this->optionLink(t('settings'), 'row_options'))), ); @@ -1767,7 +1767,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { case 'exposed_block': $form['#title'] .= $this->t('Put the exposed form in a block'); $form['description'] = array( - '#markup' => '
' . $this->t('If set, any exposed widgets will not appear with this view. Instead, a block will be made available to the Drupal block administration system, and the exposed form will appear there. Note that this block must be enabled manually, Views will not enable it for you.') . '
', + '#markup' => '
' . $this->t('If set, any exposed widgets will not appear with this view. Instead, a block will be made available to the Drupal block administration system, and the exposed form will appear there. Note that this block must be enabled manually, Views will not enable it for you.') . '
', ); $form['exposed_block'] = array( '#type' => 'radios', @@ -1795,7 +1795,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $exposed_form_plugin = $this->getPlugin('exposed_form'); if ($exposed_form_plugin->usesOptions()) { $form['markup'] = array( - '#prefix' => '
', + '#prefix' => '
', '#suffix' => '
', '#markup' => $this->t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'exposed_form_options'))), ); @@ -1831,7 +1831,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $pager_plugin = $this->getPlugin('pager'); if ($pager_plugin->usesOptions()) { $form['markup'] = array( - '#prefix' => '
', + '#prefix' => '
', '#suffix' => '
', '#markup' => $this->t('You may also adjust the !settings for the currently selected pager.', array('!settings' => $this->optionLink(t('settings'), 'pager_options'))), ); diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index 8868c8b41edd8fa02083a7d65873a12824833b7f..656105c82e767a76bfa02642405fa64ef4c0db5e 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -366,7 +366,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { } $form['tab_markup'] = array( - '#markup' => '
' . $this->t('When providing a menu item as a tab, Drupal needs to know what the parent menu item of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent item will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.') . '
', + '#markup' => '
' . $this->t('When providing a menu item as a tab, Drupal needs to know what the parent menu item of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent item will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.') . '
', ); $form['tab_options'] = array( diff --git a/core/modules/views/src/Plugin/views/style/Table.php b/core/modules/views/src/Plugin/views/style/Table.php index 199383808f91b1e277fb8e014b8bab3c6c211c88..6e4e15827b255bf70ef27994e419b7f4401b45c8 100644 --- a/core/modules/views/src/Plugin/views/style/Table.php +++ b/core/modules/views/src/Plugin/views/style/Table.php @@ -413,7 +413,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ); $form['description_markup'] = array( - '#markup' => '
' . $this->t('Place fields into columns; you may combine multiple fields into the same column. If you do, the separator in the column specified will be used to separate the fields. Check the sortable box to make that column click sortable, and check the default sort radio to determine which column will be sorted by default, if any. You may control column order and field labels in the fields section.') . '
', + '#markup' => '
' . $this->t('Place fields into columns; you may combine multiple fields into the same column. If you do, the separator in the column specified will be used to separate the fields. Check the sortable box to make that column click sortable, and check the default sort radio to determine which column will be sorted by default, if any. You may control column order and field labels in the fields section.') . '
', ); } diff --git a/core/modules/views_ui/src/Form/Ajax/AddHandler.php b/core/modules/views_ui/src/Form/Ajax/AddHandler.php index a60da37180b0ecb62282cd910c4e3624c2b48d2a..eef8f7da03bf0da83acf33c397361891a7da4d34 100644 --- a/core/modules/views_ui/src/Form/Ajax/AddHandler.php +++ b/core/modules/views_ui/src/Form/Ajax/AddHandler.php @@ -162,7 +162,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { } else { $form['options']['markup'] = array( - '#markup' => '
' . $this->t('There are no @types available to add.', array('@types' => $ltitle)) . '
', + '#markup' => '
' . $this->t('There are no @types available to add.', array('@types' => $ltitle)) . '
', ); } // Add a div to show the selected items diff --git a/core/modules/views_ui/src/Form/Ajax/Analyze.php b/core/modules/views_ui/src/Form/Ajax/Analyze.php index 95e126ad649e4177ddd41464edd0b26f6d311736..b53800dfb04045939b89fd3fee45dd341cdd6ef1 100644 --- a/core/modules/views_ui/src/Form/Ajax/Analyze.php +++ b/core/modules/views_ui/src/Form/Ajax/Analyze.php @@ -44,7 +44,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $messages = $analyzer->getMessages($view->getExecutable()); $form['analysis'] = array( - '#prefix' => '
', + '#prefix' => '
', '#suffix' => '
', '#markup' => $analyzer->formatMessages($messages), ); diff --git a/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php b/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php index e2907894435b60a576b82a817288bc025a7a76f5..8df344a832e6201b8fa216df6f65d9b3303b5e2a 100644 --- a/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php +++ b/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php @@ -160,7 +160,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Request $ $form['options']['form_description'] = array( '#markup' => $handler->definition['help'], '#theme_wrappers' => array('container'), - '#attributes' => array('class' => array('form-item description')), + '#attributes' => array('class' => array('js-form-item form-item description')), '#weight' => -1000, ); } diff --git a/core/themes/classy/templates/content-edit/text-format-wrapper.html.twig b/core/themes/classy/templates/content-edit/text-format-wrapper.html.twig index 4bd1566b0ca19e94baea548dd5777d103fc58500..08a88ca1ce1d95fba8fe44a30f3fdaca95210143 100644 --- a/core/themes/classy/templates/content-edit/text-format-wrapper.html.twig +++ b/core/themes/classy/templates/content-edit/text-format-wrapper.html.twig @@ -13,7 +13,7 @@ * @see template_preprocess_text_format_wrapper() */ #} -
+
{{ children }} {% if description %} {% diff --git a/core/themes/classy/templates/form/field-multiple-value-form.html.twig b/core/themes/classy/templates/form/field-multiple-value-form.html.twig index 1eac971e3ff08045e4fd0254526e5273ea882148..bcc7b89bb58187325da4129e7015b5ff5b44b586 100644 --- a/core/themes/classy/templates/form/field-multiple-value-form.html.twig +++ b/core/themes/classy/templates/form/field-multiple-value-form.html.twig @@ -18,7 +18,7 @@ */ #} {% if multiple %} -
+
{{ table }} {% if description %}
{{ description }}
diff --git a/core/themes/classy/templates/form/fieldset.html.twig b/core/themes/classy/templates/form/fieldset.html.twig index e507d4cb6a5af0676fd8365b60ecf2cdf11e4d3b..4bd7d0a62aca53a0179c396caa1940a00e07ef27 100644 --- a/core/themes/classy/templates/form/fieldset.html.twig +++ b/core/themes/classy/templates/form/fieldset.html.twig @@ -22,6 +22,7 @@ #} {% set classes = [ + 'js-form-item', 'form-item', 'js-form-wrapper', 'form-wrapper', diff --git a/core/themes/classy/templates/form/form-element.html.twig b/core/themes/classy/templates/form/form-element.html.twig index 65028fa3be565b697e4be16740d8a140afc3e751..7e28b6453b76677d709fae46f30d15078319a9d6 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 = [ + 'js-form-item', 'form-item', 'js-form-type-' ~ type|clean_class, 'form-type-' ~ type|clean_class,