Commit 805c4cd2 authored by Theresa Grannum's avatar Theresa Grannum Committed by Ted Bowman
Browse files

Issue #3239759 by Theresa.Grannum, rkoller, phenaproxima: Remind users to back...

Issue #3239759 by Theresa.Grannum, rkoller, phenaproxima: Remind users to back up their database before starting an update
parent 8bb18523
Loading
Loading
Loading
Loading
+1 −1
Changes for src/Form/UpdateReady.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ class UpdateReady extends FormBase {
    ];
    $form['backup'] = [
      '#prefix' => '<strong>',
      '#markup' => $this->t('Back up your database and site before you continue. <a href=":backup_url">Learn how</a>.', [':backup_url' => 'https://www.drupal.org/node/22281']),
      '#markup' => $this->t('This cannot be undone, so it is strongly recommended to <a href=":url">back up your database and site</a> before continuing, if you haven\'t already.', [':url' => 'https://www.drupal.org/node/22281']),
      '#suffix' => '</strong>',
    ];
    if (!$this->state->get('system.maintenance_mode')) {
+4 −0
Changes for src/Form/UpdaterForm.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -257,6 +257,10 @@ class UpdaterForm extends FormBase {
      ],
    ];

    $form['backup'] = [
      '#markup' => $this->t('It\'s a good idea to <a href=":url">back up your database</a> before you begin.', [':url' => 'https://www.drupal.org/node/22281#s-backing-up-the-database']),
    ];

    if ($form_state->getUserInput()) {
      $results = [];
    }