From 989acd6b4bd17bf0efea3f4560b34623bd66ecba Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Thu, 30 Mar 2023 13:30:51 -0400 Subject: [PATCH] Update success.tpl CSS (pre/post upgrade messages) --- CRM/Upgrade/Incremental/General.php | 7 +- templates/CRM/common/success.tpl | 104 ++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 33 deletions(-) diff --git a/CRM/Upgrade/Incremental/General.php b/CRM/Upgrade/Incremental/General.php index 9f7bf56080ff..ddb68743841f 100644 --- a/CRM/Upgrade/Incremental/General.php +++ b/CRM/Upgrade/Incremental/General.php @@ -178,10 +178,9 @@ public static function updateMessageTemplate(&$message, $version) { return sprintf("
  • %s - %s
  • ", htmlentities($k), htmlentities($v)); }, array_keys($messages), $messages); - $message .= '
    ' . ts("The default copies of the message templates listed below will be updated to handle new features or correct a problem. Your installation has customized versions of these message templates, and you will need to apply the updates manually after running this upgrade. Click here for detailed instructions. %2", [ - 1 => 'https://docs.civicrm.org/user/en/latest/email/message-templates/#modifying-system-workflow-message-templates', - 2 => '', - ]); + $message .= '
    ' . ts("The default copies of the message templates listed below will be updated to handle new features or correct a problem. Your installation has customized versions of these message templates, and you will need to apply the updates manually after running this upgrade. View detailed instructions.", [ + 1 => 'href="https://docs.civicrm.org/user/en/latest/email/message-templates/#modifying-system-workflow-message-templates" target="_blank"', + ]) . ''; $messageObj->updateTemplates(); } diff --git a/templates/CRM/common/success.tpl b/templates/CRM/common/success.tpl index 2fdc0b5eb2e6..ee7d083b7ac2 100644 --- a/templates/CRM/common/success.tpl +++ b/templates/CRM/common/success.tpl @@ -12,42 +12,88 @@

    {$pageTitle}

    {/if} {if !$upgraded} -
    -
    -

    - - {ts 1=$currentVersion 2=$newVersion}The database will be upgraded from %1 to %2.{/ts} -

    +
    +
    + {if $preUpgradeMessage} -
    - - {ts}Warning:{/ts} - {$preUpgradeMessage} -
    +
    +
    +
    {ts}Warning{/ts}
    +
    + {$preUpgradeMessage} {/if}

    {ts}Back up your database before continuing.{/ts} {ts}This process may change your database structure and values. In case of emergency you may need to revert to a backup.{/ts} {docURL page="sysadmin/upgrade"}

    +

    {ts 1=$currentVersion 2=$newVersion}The database will be upgraded from %1 to %2.{/ts}

    -    - - - {ts}Cancel{/ts} - - +
    + +
    + +
    - {else} -
    -
    -

    - - {ts 1="https://civicrm.org/core-team" 2="https://civicrm.org/contributors" 3="https://civicrm.org/members" 4="https://civicrm.org/partners" 5="https://civicrm.org/become-a-member?src=ug&sid=$sid" 6=$newVersion 7="https://civicrm.org/become-a-partner" 8="https://civicrm.org"}Thank you for upgrading to %6. This release was made possible by the CiviCRM Core Team and an incredible group of CiviCRM Contributors. The CiviCRM project could not exist without the continued financial support of CiviCRM Members and CiviCRM Partners. We invite you to support CiviCRM by becoming a CiviCRM Member or CiviCRM Partner today. Providing financial support ensures that the CiviCRM project can continue to provide the essential resources and services to support the CiviCRM community.{/ts} -

    +
    +
    +

    {ts 1=$newVersion}Thank you for upgrading to %1.{/ts}

    +

    {ts 1="href='https://civicrm.org/core-team' target='_blank'" 2="href='https://civicrm.org/contributors' target='_blank'" 3="href='https://civicrm.org/civicrm/contribute/transact?reset=1&id=47&src=ug' target='_blank'"}This release was made possible by the CiviCRM Core Team and an incredible group of CiviCRM Contributors. We are committed to keeping CiviCRM free and open, forever. We depend on your support to help make that happen. Support us by making a small donation today.{/ts}

    +
    +
    +
    {$message}
    +
    +
    -

    {$message}

    -

    {ts}Return to CiviCRM home page.{/ts}

    {/if} +{literal} + +{/literal}