X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fmodules%2Fajax_forms_test%2Fsrc%2FCallbacks.php;h=71350305ffee40430a1dc791e911e20bbe1be09b;hb=4f1b9b4ab48a8498afac9e2213a02a23ccf4a06c;hp=9b35ef7694fc921b13249c28497b462ea0558ce9;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php b/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php index 9b35ef769..71350305f 100644 --- a/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php +++ b/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php @@ -27,7 +27,8 @@ class Callbacks { */ public function dateCallback($form, FormStateInterface $form_state) { $response = new AjaxResponse(); - $response->addCommand(new HtmlCommand('#ajax_date_value', $form_state->getValue('date'))); + $date = $form_state->getValue('date'); + $response->addCommand(new HtmlCommand('#ajax_date_value', sprintf('
%s
', $date))); $response->addCommand(new DataCommand('#ajax_date_value', 'form_state_value_date', $form_state->getValue('date'))); return $response; } @@ -39,7 +40,7 @@ class Callbacks { $datetime = $form_state->getValue('datetime')['date'] . ' ' . $form_state->getValue('datetime')['time']; $response = new AjaxResponse(); - $response->addCommand(new HtmlCommand('#ajax_datetime_value', $datetime)); + $response->addCommand(new HtmlCommand('#ajax_datetime_value', sprintf('
%s
', $datetime))); $response->addCommand(new DataCommand('#ajax_datetime_value', 'form_state_value_datetime', $datetime)); return $response; }