diff --git a/src/Form/UwContentModerationForm.php b/src/Form/UwContentModerationForm.php index 380c2c04b9c9f2c25f8f01c93fd626f51765abb9..d7923dfc42ba6cf3c16353184cc04a2dadb9296d 100644 --- a/src/Form/UwContentModerationForm.php +++ b/src/Form/UwContentModerationForm.php @@ -80,8 +80,17 @@ class UwContentModerationForm extends ConfirmFormBase { */ public function submitForm(array &$form, FormStateInterface $form_state) { + // Set the options for the URL. + $options = ['absolute' => TRUE]; + + // Return the URL back to the node. + $url = Url::fromRoute('entity.node.canonical', ['node' => $this->nid], $options); + + // Adding the redirect back to the node + $form_state->setRedirectUrl($url); + // Set the message that the permissions have been saved. - $this->messenger()->addStatus($this->t('The changes have been saved.')); + $this->messenger()->addStatus($this->t('There is still work to be done to unpublish, but we made it here.')); } /**