X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fmodules%2Fajax_forms_test%2Fsrc%2FCallbacks.php;h=cf821515b2d724c9cdd5d7990ca7feb747321c04;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=71350305ffee40430a1dc791e911e20bbe1be09b;hpb=9424afc6c1f518c301bf87a23c047d1873435d05;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 71350305f..cf821515b 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 @@ -50,7 +50,7 @@ class Callbacks { */ public function checkboxCallback($form, FormStateInterface $form_state) { $response = new AjaxResponse(); - $response->addCommand(new HtmlCommand('#ajax_checkbox_value', (int) $form_state->getValue('checkbox'))); + $response->addCommand(new HtmlCommand('#ajax_checkbox_value', $form_state->getValue('checkbox') ? 'checked' : 'unchecked')); $response->addCommand(new DataCommand('#ajax_checkbox_value', 'form_state_value_select', (int) $form_state->getValue('checkbox'))); return $response; }