Commit 3e75cacd authored by Thomas Citharel's avatar Thomas Citharel 🌲

Fix messages for status domains

Signed-off-by: Thomas Citharel's avatarThomas Citharel <tcit@tcit.fr>
parent e4daddd4
Pipeline #26087 failed with stage
in 2 minutes and 54 seconds
......@@ -115,8 +115,10 @@ domain:
dns_changed: DNS Modifiés
vhost_added: Fichier de configuration ajouté
waiting_configuration: En attente de configuration
unknown_error: Erreur inconnue
ok: OK
detached: Détaché
unknown_error: Erreur inconnue
removed: Supprimé
succeeded:
title: Enregistrement du domaine effectué avec succès !
desc: Vous êtes maintenant l'heureux possesseur du domaine %domain%.
......
......@@ -604,6 +604,7 @@ class DomainController extends Controller
$em = $this->getDoctrine()->getManager();
$domain->removeSite();
$domain->setStatus(Domain::DOMAIN_DETACHED);
$em->persist($domain);
$em->flush();
......
......@@ -3,6 +3,7 @@
namespace AppBundle\Twig;
use AppBundle\Entity\Blog\Blog;
use AppBundle\Entity\Domain;
use AppBundle\Entity\Site;
use AppBundle\Entity\Wiki\Wiki;
use AppBundle\Helper\PaymentFactory;
......@@ -89,27 +90,33 @@ class FramasitesExtension extends \Twig_Extension
public function domainStatus(int $status): string
{
switch ($status) {
case 10:
case Domain::DOMAIN_REQUESTED:
$trans = 'domain.status.requested';
break;
case 20:
case Domain::DOMAIN_PAYED:
$trans = 'domain.status.payed';
break;
case 30:
case Domain::DOMAIN_VALIDATED:
$trans = 'domain.status.validated';
break;
case 40:
$trans = 'domain.status.dns_changed';
case Domain::DOMAIN_DNS_CHANGED:
$trans = 'domain.status.dns_changed'; // depreciated
break;
case 50:
case Domain::DOMAIN_WAITING_CONFIGURATION:
$trans = 'domain.status.waiting_configuration';
break;
case 60:
$trans = 'domain.status.vhost_added';
case Domain::DOMAIN_VHOST_ADDED:
$trans = 'domain.status.vhost_added'; // depreciated
break;
case 200:
case Domain::DOMAIN_OK:
$trans = 'domain.status.ok';
break;
case Domain::DOMAIN_DETACHED:
$trans = 'domain.status.detached';
break;
case Domain::DOMAIN_REMOVED:
$trans = 'domain.status.removed'; // depreciated
break;
case 0:
default:
$trans = 'domain.status.unknown_error';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment