diff --git a/web/profiles/custom/os2loop/modules/os2loop_share_with_a_friend/src/Form/ShareWithAFriendForm.php b/web/profiles/custom/os2loop/modules/os2loop_share_with_a_friend/src/Form/ShareWithAFriendForm.php index d95d2efff..604529837 100644 --- a/web/profiles/custom/os2loop/modules/os2loop_share_with_a_friend/src/Form/ShareWithAFriendForm.php +++ b/web/profiles/custom/os2loop/modules/os2loop_share_with_a_friend/src/Form/ShareWithAFriendForm.php @@ -92,26 +92,36 @@ public function buildForm(array $form, FormStateInterface $form_state) { /** @var \Drupal\node\NodeInterface $node */ $node = $this->routeMatcher->getParameter('node'); - $form['title'] = [ + $form['wrapper'] = [ + '#type' => 'container', + '#attributes' => ['class' => ['container', 'col-6']], + ]; + + $form['wrapper']['title'] = [ '#type' => 'page_title', '#title' => $this->t('Share the following with a friend: @document', ['@document' => $node->label()]), ]; - $form['message'] = [ - '#type' => 'textarea', - '#title' => $this->t('Message'), - '#description' => $this->t('Write a message to the recipient'), + $form['wrapper']['to_email'] = [ + '#type' => 'email', '#required' => TRUE, + '#title' => $this->t('Email address of recipient'), + '#attributes' => [ + 'class' => [ + 'form-control', + ], + ], ]; - $form['to_email'] = [ - '#type' => 'email', + $form['wrapper']['message'] = [ + '#type' => 'textarea', + '#title' => $this->t('Message'), + '#description' => $this->t('Write a message to the recipient'), '#required' => TRUE, - '#title' => $this->t('Email address of recipient'), ]; - $form['actions']['#type'] = 'actions'; - $form['actions']['submit'] = [ + $form['wrapper']['actions']['#type'] = 'actions'; + $form['wrapper']['actions']['submit'] = [ '#type' => 'submit', '#value' => $this->t('Send'), '#attributes' => [ @@ -120,7 +130,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ], ], ]; - $form['actions']['cancel'] = [ + $form['wrapper']['actions']['cancel'] = [ '#type' => 'link', '#url' => $node->toUrl(), '#title' => $this->t('Cancel'),