From 0fdc6d0855d2866f1654f8b69ad0d55d3f6f3866 Mon Sep 17 00:00:00 2001 From: Nicolas Roman Date: Tue, 30 Jul 2019 17:24:17 +0200 Subject: [PATCH] move final success message out of the view with the other messages --- inc/webadmin-letsencrypt.php | 11 +++++++++-- tpl/webadmin-letsencrypt.tpl.php | 4 +--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/inc/webadmin-letsencrypt.php b/inc/webadmin-letsencrypt.php index 47ca4e5..3b9e839 100644 --- a/inc/webadmin-letsencrypt.php +++ b/inc/webadmin-letsencrypt.php @@ -191,9 +191,9 @@ if (isset($_POST['submit'])) { if (empty($domainsNotIncluded)) { - $errorMessage = "Le certificat existant couvre déjà tous les domaines jusqu'au " . $validUntil . "."; + $noticeMessage = "Le certificat existant couvre déjà tous les domaines jusqu'au " . $validUntil . "."; - array_push($messages, ["type" => "notice", "content" => $errorMessage]); + array_push($messages, ["type" => "notice", "content" => $noticeMessage]); break; } @@ -212,9 +212,16 @@ if (isset($_POST['submit'])) { } array_push($messages, ["type" => "warning", "content" => $warningMessage]); + break; } + + $noticeMessage = "Votre certificat SSL a bien été installé !"; + array_push($messages, ["type" => "notice", "content" => $noticeMessage]); + break; } + + } include_once EVOADMIN_BASE . '../tpl/webadmin-letsencrypt.tpl.php'; diff --git a/tpl/webadmin-letsencrypt.tpl.php b/tpl/webadmin-letsencrypt.tpl.php index ab4653e..80fb8a0 100644 --- a/tpl/webadmin-letsencrypt.tpl.php +++ b/tpl/webadmin-letsencrypt.tpl.php @@ -33,7 +33,7 @@ if (!empty($messages)) { } } } else { - if (isset($_POST["submit"])) { + if (!isset($_POST["submit"])) { echo "

Les domaines suivants seront intégrés au certificat :

"; if (count($_SESSION['letsencrypt-domains']) > 0) { echo '

'; @@ -47,7 +47,5 @@ if (!empty($messages)) {