Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / system / tests / modules / ajax_forms_test / src / Callbacks.php
index 71350305ffee40430a1dc791e911e20bbe1be09b..cf821515b2d724c9cdd5d7990ca7feb747321c04 100644 (file)
@@ -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;
   }