Skip to content
Snippets Groups Projects
Commit e0db7eba authored by Alex Pott's avatar Alex Pott
Browse files

Issue #1999344 by aaronott: Use Symfony Request for edit module.

parent 96c82a29
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -101,10 +101,13 @@ public function attachments(Request $request) {
* The name of the language for which the field is being edited.
* @param string $view_mode_id
* The view mode the field should be rerendered in.
* @param \Symfony\Component\HttpFoundation\Request $request
* The current request object containing the search string.
*
* @return \Drupal\Core\Ajax\AjaxResponse
* The Ajax response.
*/
public function fieldForm(EntityInterface $entity, $field_name, $langcode, $view_mode_id) {
public function fieldForm(EntityInterface $entity, $field_name, $langcode, $view_mode_id, Request $request) {
$response = new AjaxResponse();
$form_state = array(
......@@ -134,7 +137,7 @@ public function fieldForm(EntityInterface $entity, $field_name, $langcode, $view
}
// When working with a hidden form, we don't want any CSS or JS to be loaded.
if (isset($_POST['nocssjs']) && $_POST['nocssjs'] === 'true') {
if ($request->request->get('nocssjs') === 'true') {
drupal_static_reset('drupal_add_css');
drupal_static_reset('drupal_add_js');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment