projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website]
/
web
/
core
/
modules
/
system
/
tests
/
modules
/
ajax_forms_test
/
src
/
Callbacks.php
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 9b35ef7694fc921b13249c28497b462ea0558ce9..71350305ffee40430a1dc791e911e20bbe1be09b 100644
(file)
--- 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();
*/
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('<div>%s</div>', $date)));
$response->addCommand(new DataCommand('#ajax_date_value', 'form_state_value_date', $form_state->getValue('date')));
return $response;
}
$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();
$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('<div>%s</div>', $datetime)
));
$response->addCommand(new DataCommand('#ajax_datetime_value', 'form_state_value_datetime', $datetime));
return $response;
}
$response->addCommand(new DataCommand('#ajax_datetime_value', 'form_state_value_datetime', $datetime));
return $response;
}