From e5f9952ed51b8114c2433be5cf024b66461febfc Mon Sep 17 00:00:00 2001 From: flifloo Date: Tue, 29 Sep 2020 16:17:47 +0200 Subject: [PATCH] Error & payment rework --- locales/en.json | 1 + locales/fr.json | 1 + views/error.pug | 8 ++++---- views/mixin.pug | 4 ---- views/order.pug | 13 ++++++------- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/locales/en.json b/locales/en.json index a6718e5..f50770d 100644 --- a/locales/en.json +++ b/locales/en.json @@ -77,6 +77,7 @@ "chooseUser": "Choose an user" }, "payment": { + "payment": "Payment", "successful": "Payment successful !", "canceled": "Payment canceled", "error": "An error occurred with the payment", diff --git a/locales/fr.json b/locales/fr.json index bea7027..6b1b91e 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -77,6 +77,7 @@ "chooseUser": "Choisissez un utilisateur" }, "payment": { + "payment": "Paiement", "successful": "Paiement réussi !", "canceled": "Paiement annulé", "error": "Une erreur est survenue lors du paiement", diff --git a/views/error.pug b/views/error.pug index 9c621a6..506af40 100644 --- a/views/error.pug +++ b/views/error.pug @@ -1,7 +1,7 @@ extends layout block content - div.card - h1= message - h2= error.status - pre #{error.stack} + div.container.center + h1=message + h3=error.status + h5=error.stack diff --git a/views/mixin.pug b/views/mixin.pug index a8af50a..1c45b53 100644 --- a/views/mixin.pug +++ b/views/mixin.pug @@ -2,7 +2,3 @@ mixin submit(value) div.recaptcha.recaptcha-cb button.btn.waves-effect.waves-light(type="submit" name="action")=value i.material-icons.right send - -mixin list(id, list, name, value="", autocomplete="on", required=false) - span.list_arrow - input(id=id type="list" list=list name=name value=value autocomplete=autocomplete required=required) diff --git a/views/order.pug b/views/order.pug index 0c5ee05..c08f936 100644 --- a/views/order.pug +++ b/views/order.pug @@ -1,14 +1,13 @@ extends layout block content - div.card - h1 Payment + div.container.center + h1=__("payment.payment") if (state === "success") - h2=__("payment.successful") + h4=__("payment.successful") else if (state === "cancel") - h2=__("payment.canceled") + h4=__("payment.canceled") else if (state === "error") - h2=__("payment.error") + h4=__("payment.error") if (state !== "success") - a(href="/order/retry") - button=__("payment.retry") + a.waves-effect.waves-teal.btn(href="/order/retry")=__("payment.retry")