Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
|
@ -121,9 +121,9 @@ class MessageForm extends ContentEntityForm {
|
|||
// prevent the impersonation of other users.
|
||||
else {
|
||||
$form['name']['#type'] = 'item';
|
||||
$form['name']['#value'] = $user->getUsername();
|
||||
$form['name']['#value'] = $user->getDisplayName();
|
||||
$form['name']['#required'] = FALSE;
|
||||
$form['name']['#plain_text'] = $user->getUsername();
|
||||
$form['name']['#plain_text'] = $user->getDisplayName();
|
||||
|
||||
$form['mail']['#type'] = 'item';
|
||||
$form['mail']['#value'] = $user->getEmail();
|
||||
|
|
@ -206,9 +206,12 @@ class MessageForm extends ContentEntityForm {
|
|||
$message = $this->entity;
|
||||
$user = $this->currentUser();
|
||||
$this->mailHandler->sendMailMessages($message, $user);
|
||||
$contact_form = $message->getContactForm();
|
||||
|
||||
$this->flood->register('contact', $this->config('contact.settings')->get('flood.interval'));
|
||||
drupal_set_message($this->t('Your message has been sent.'));
|
||||
if ($submission_message = $contact_form->getMessage()) {
|
||||
drupal_set_message($submission_message);
|
||||
}
|
||||
|
||||
// To avoid false error messages caused by flood control, redirect away from
|
||||
// the contact form; either to the contacted user account or the front page.
|
||||
|
|
@ -216,7 +219,7 @@ class MessageForm extends ContentEntityForm {
|
|||
$form_state->setRedirectUrl($message->getPersonalRecipient()->urlInfo());
|
||||
}
|
||||
else {
|
||||
$form_state->setRedirect('<front>');
|
||||
$form_state->setRedirectUrl($contact_form->getRedirectUrl());
|
||||
}
|
||||
// Save the message. In core this is a no-op but should contrib wish to
|
||||
// implement message storage, this will make the task of swapping in a real
|
||||
|
|
|
|||
Reference in a new issue