diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 63bd90d..0326923 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -594,7 +594,7 @@ public static function fieldSettingsAjaxProcessElement(&$element, $main_form) { if (!empty($element['#ajax'])) { $element['#ajax'] = array( 'callback' => array(get_called_class(), 'settingsAjax'), - 'wrapper' => $main_form['#id'], + 'wrapper_selector' => $main_form['#id'], 'element' => $main_form['#array_parents'], ); } diff --git a/core/lib/Drupal/Core/Render/Element/RenderElement.php b/core/lib/Drupal/Core/Render/Element/RenderElement.php index 1f39e10..8e30355 100644 --- a/core/lib/Drupal/Core/Render/Element/RenderElement.php +++ b/core/lib/Drupal/Core/Render/Element/RenderElement.php @@ -243,7 +243,7 @@ public static function processAjaxForm(&$element, FormStateInterface $form_state * - #ajax['url'] * - #ajax['callback'] * - #ajax['options'] - * - #ajax['wrapper'] + * - #ajax['wrapper_selector'] * - #ajax['parameters'] * - #ajax['effect'] * - #ajax['accepts'] diff --git a/core/modules/book/src/BookManager.php b/core/modules/book/src/BookManager.php index 60754be..a6e9603 100644 --- a/core/modules/book/src/BookManager.php +++ b/core/modules/book/src/BookManager.php @@ -226,7 +226,7 @@ public function addFormElements(array $form, FormStateInterface $form_state, Nod '#attributes' => array('class' => array('book-title-select')), '#ajax' => array( 'callback' => 'book_form_update', - 'wrapper' => 'edit-book-plid-wrapper', + 'wrapper_selector' => 'edit-book-plid-wrapper', 'effect' => 'fade', 'speed' => 'fast', ), diff --git a/core/modules/config/tests/config_test/src/ConfigTestForm.php b/core/modules/config/tests/config_test/src/ConfigTestForm.php index 8a375b8..38f7d39 100644 --- a/core/modules/config/tests/config_test/src/ConfigTestForm.php +++ b/core/modules/config/tests/config_test/src/ConfigTestForm.php @@ -99,7 +99,7 @@ public function form(array $form, FormStateInterface $form_state) { '#default_value' => $size, '#ajax' => array( 'callback' => '::updateSize', - 'wrapper' => 'size-wrapper', + 'wrapper_selector' => 'size-wrapper', ), ); $form['size_wrapper']['size_submit'] = array( diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index 8df1f04..9e3d2d4 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -130,7 +130,7 @@ function editor_form_filter_format_form_alter(&$form, FormStateInterface $form_s '#ajax' => array( 'trigger_as' => array('name' => 'editor_configure'), 'callback' => 'editor_form_filter_admin_form_ajax', - 'wrapper' => 'editor-settings-wrapper', + 'wrapper_selector' => 'editor-settings-wrapper', ), '#weight' => -10, ); @@ -142,7 +142,7 @@ function editor_form_filter_format_form_alter(&$form, FormStateInterface $form_s '#submit' => array('editor_form_filter_admin_format_editor_configure'), '#ajax' => array( 'callback' => 'editor_form_filter_admin_form_ajax', - 'wrapper' => 'editor-settings-wrapper', + 'wrapper_selector' => 'editor-settings-wrapper', ), '#weight' => -10, '#attributes' => array('class' => array('js-hide')), diff --git a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php index 4b9a85d..b073e02 100644 --- a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php +++ b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php @@ -235,7 +235,7 @@ public function form(array $form, FormStateInterface $form_state) { '#submit' => array('::multistepSubmit'), '#ajax' => array( 'callback' => '::multistepAjax', - 'wrapper' => 'field-display-overview-wrapper', + 'wrapper_selector' => 'field-display-overview-wrapper', 'effect' => 'fade', // The button stays hidden, so we hide the Ajax spinner too. Ad-hoc // spinners will be added manually by the client-side script. @@ -347,7 +347,7 @@ protected function buildFieldRow(FieldDefinitionInterface $field_definition, arr '#submit' => array('::multistepSubmit'), '#ajax' => array( 'callback' => '::multistepAjax', - 'wrapper' => 'field-display-overview-wrapper', + 'wrapper_selector' => 'field-display-overview-wrapper', 'effect' => 'fade', ), '#field_name' => $field_name, diff --git a/core/modules/file/src/Element/ManagedFile.php b/core/modules/file/src/Element/ManagedFile.php index f465b18..12ba6c9 100644 --- a/core/modules/file/src/Element/ManagedFile.php +++ b/core/modules/file/src/Element/ManagedFile.php @@ -226,7 +226,7 @@ public static function processManagedFile(&$element, FormStateInterface $form_st 'element_parents' => implode('/', $element['#array_parents']), ], ], - 'wrapper' => $ajax_wrapper_id, + 'wrapper_selector' => $ajax_wrapper_id, 'effect' => 'fade', 'progress' => [ 'type' => $element['#progress_indicator'], diff --git a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php index b2386b4..ec3e4b8 100644 --- a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php +++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php @@ -415,7 +415,7 @@ public static function process($element, FormStateInterface $form_state, $form) foreach (Element::children($element) as $key) { if (isset($element[$key]['#ajax'])) { $element[$key]['#ajax']['options'] = $new_options; - $element[$key]['#ajax']['wrapper'] = $new_wrapper; + $element[$key]['#ajax']['wrapper_selector'] = $new_wrapper; } } unset($element['#prefix'], $element['#suffix']); diff --git a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php index 3e5b051..04cd92f 100644 --- a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php +++ b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php @@ -98,7 +98,7 @@ public function form(array $form, FormStateInterface $form_state) { '#description' => $description, '#ajax' => array( 'callback' => '::breakpointMappingFormAjax', - 'wrapper' => 'responsive-image-style-breakpoints-wrapper', + 'wrapper_selector' => 'responsive-image-style-breakpoints-wrapper', ), ); diff --git a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestLazyLoadForm.php b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestLazyLoadForm.php index 19aaaf3..47a9538 100644 --- a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestLazyLoadForm.php +++ b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestLazyLoadForm.php @@ -35,7 +35,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'submit', '#value' => $this->t('Submit'), '#ajax' => array( - 'wrapper' => 'ajax-forms-test-lazy-load-ajax-wrapper', + 'wrapper_selector' => 'ajax-forms-test-lazy-load-ajax-wrapper', 'callback' => 'ajax_forms_test_lazy_load_form_ajax', ), '#prefix' => '
', diff --git a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php index 8ec5b71..fecf4cc 100644 --- a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php +++ b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php @@ -83,7 +83,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#title' => $this->t('AJAX checkbox in a group'), '#ajax' => [ 'callback' => [$object, 'checkboxGroupCallback'], - 'wrapper' => 'checkbox-wrapper', + 'wrapper_selector' => 'checkbox-wrapper', ], ], 'nested_group' => [ @@ -97,7 +97,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#title' => $this->t('AJAX checkbox in a nested group'), '#ajax' => [ 'callback' => [$object, 'checkboxGroupCallback'], - 'wrapper' => 'checkbox-wrapper', + 'wrapper_selector' => 'checkbox-wrapper', ], ], ]; diff --git a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestValidationForm.php b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestValidationForm.php index dbf0b7f..e1bf80f 100644 --- a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestValidationForm.php +++ b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestValidationForm.php @@ -28,7 +28,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => $form_state->getValue('drivertext', ''), '#ajax' => array( 'callback' => 'ajax_forms_test_validation_form_callback', - 'wrapper' => 'message_area', + 'wrapper_selector' => 'message_area', 'method' => 'replace', ), '#suffix' => '
', @@ -41,7 +41,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#default_value' => $form_state->getValue('drivernumber', ''), '#ajax' => array( 'callback' => 'ajax_forms_test_validation_number_form_callback', - 'wrapper' => 'message_area_number', + 'wrapper_selector' => 'message_area_number', 'method' => 'replace', ), '#suffix' => '
', diff --git a/core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php b/core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php index aa50cc4..4152bbc 100644 --- a/core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php +++ b/core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php @@ -84,7 +84,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], '#ajax' => [ 'callback' => '::updateOptions', - 'wrapper' => 'edit-test1-wrapper', + 'wrapper_selector' => 'edit-test1-wrapper', ], '#prefix' => '
', '#suffix' => '
', diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php index 4431460..a935fb3 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php @@ -38,7 +38,7 @@ function tableselectFormBuilder($form, FormStateInterface $form_state, $element_ '#empty' => t('Empty text.'), '#ajax' => array( 'callback' => 'form_test_tableselect_ajax_callback', - 'wrapper' => 'tableselect-wrapper', + 'wrapper_selector' => 'tableselect-wrapper', ), ); diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index fd031d2..8eee203 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -54,7 +54,7 @@ function views_ui_add_ajax_trigger(&$wrapping_element, $trigger_key, $refresh_pa // to request so that the wrapper can be recognized by the AJAX system and // its content can be dynamically updated. So instead, we will keep track of // duplicate IDs (within a single request) on our own, later in this function. - $triggering_element['#ajax']['wrapper'] = 'edit-view-' . implode('-', $refresh_parents) . '-wrapper'; + $triggering_element['#ajax']['wrapper_selector'] = 'edit-view-' . implode('-', $refresh_parents) . '-wrapper'; // Add a submit button for users who do not have JavaScript enabled. It // should be displayed next to the triggering element on the form. @@ -107,11 +107,11 @@ function views_ui_add_ajax_trigger(&$wrapping_element, $trigger_key, $refresh_pa // Attach custom data to the triggering element and submit button, so we can // use it in both the process function and AJAX callback. $ajax_data = array( - 'wrapper' => $triggering_element['#ajax']['wrapper'], + 'wrapper_selector' => $triggering_element['#ajax']['wrapper'], 'trigger_key' => $trigger_key, 'refresh_parents' => $refresh_parents, ); - $seen_ids[$triggering_element['#ajax']['wrapper']] = TRUE; + $seen_ids[$triggering_element['#ajax']['wrapper_selector']] = TRUE; $triggering_element['#views_ui_ajax_data'] = $ajax_data; $wrapping_element[$button_key]['#views_ui_ajax_data'] = $ajax_data; } diff --git a/core/modules/views_ui/src/ViewPreviewForm.php b/core/modules/views_ui/src/ViewPreviewForm.php index 7b77929..b3a2099 100644 --- a/core/modules/views_ui/src/ViewPreviewForm.php +++ b/core/modules/views_ui/src/ViewPreviewForm.php @@ -85,7 +85,7 @@ protected function actions(array $form, FormStateInterface $form_state) { '#id' => 'preview-submit', '#ajax' => array( 'url' => Url::fromRoute('entity.view.preview_form', ['view' => $view->id(), 'display_id' => $this->displayID]), - 'wrapper' => 'views-preview-wrapper', + 'wrapper_selector' => 'views-preview-wrapper', 'event' => 'click', 'progress' => array('type' => 'fullscreen'), 'method' => 'replaceWith', diff --git a/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php b/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php index 3b52f9a..e50c7da 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php @@ -62,7 +62,7 @@ public function testPreRenderAjaxForm() { '#type' => 'select', '#id' => 'test', '#ajax' => [ - 'wrapper' => 'foo', + 'wrapper_selector' => 'foo', 'callback' => 'test-callback', ], ]; @@ -93,7 +93,7 @@ public function testPreRenderAjaxFormWithQueryOptions() { '#type' => 'select', '#id' => 'test', '#ajax' => [ - 'wrapper' => 'foo', + 'wrapper_selector' => 'foo', 'callback' => 'test-callback', 'options' => [ 'query' => [