diff --git a/core/modules/big_pipe/big_pipe.info.yml b/core/modules/big_pipe/big_pipe.info.yml index c10cc4f..b0f6e91 100644 --- a/core/modules/big_pipe/big_pipe.info.yml +++ b/core/modules/big_pipe/big_pipe.info.yml @@ -1,4 +1,4 @@ -name: big_pipe +name: BigPipe type: module description: 'Enables BigPipe for authenticated users; first send+render the cheap parts of the page, then the expensive parts.' package: Core diff --git a/core/modules/big_pipe/big_pipe.module b/core/modules/big_pipe/big_pipe.module index a4abe2d..3bb6aca 100644 --- a/core/modules/big_pipe/big_pipe.module +++ b/core/modules/big_pipe/big_pipe.module @@ -1,2 +1,56 @@ 'hidden', + '#default_value' => '1', + ); + + $form['#after_build'][] = 'big_pipe_form_after_build'; + $form['#submit'][] = 'big_pipe_form_set_js_check'; +} + +/** + * After build handler for user_login_form(). + */ +function big_pipe_form_after_build($form, FormStateInterface $form_state) { + // This is tricky: We want Form API to default big_pipe_has_js to 1 in + // case it gets not send. We also want to set the value of the HTML element + // to 0 and add