From abaa9c66ce450e1f2ddb182f310013e226a6f858 Mon Sep 17 00:00:00 2001 From: kitoy Date: Wed, 19 Jul 2023 01:38:55 +0200 Subject: [PATCH] Correction Formulaire inscription --- templates/inscription.html | 31 ++++++++++++++++++------------- views/inscription.py | 6 +++--- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/templates/inscription.html b/templates/inscription.html index 5f577ba..5f2866f 100644 --- a/templates/inscription.html +++ b/templates/inscription.html @@ -27,20 +27,25 @@
{% if signin_enable %} -
+ +

Choisissez votre nom d'utilisateur pour vous connecter sur le portail pywallter


- {% if MAIL_SERVER %} -
-
-
-

@{{hostname}}

-
- {% endif %} -
-
-
- -
+ {% if MAIL_SERVER or XMPP_SERVER %} +

Choisissez votre adresse sur ce serveur (Entrez juste le nom pas besoin de préciser le domaine)

+

Par exemple vous voulez toto@{{hostname}}; vous entrez juste toto :)

+
+
+ +
+ +
+ {% endif %} + +
+
+
+ + {% else %}

Désolé les inscriptions ne sont pas activés sur le serveur diff --git a/views/inscription.py b/views/inscription.py index 16da26d..fb28204 100644 --- a/views/inscription.py +++ b/views/inscription.py @@ -41,7 +41,7 @@ def signin(token) : signin_enable=app.config['SIGNIN_ENABLE'], token=token, hostname=hostname, url_inscription=url_inscription, - MAIL_SERVER=MAIL_SERVER) + MAIL_SERVER=MAIL_SERVER, XMPP_SERVER=XMPP_SERVER) if request.method == 'POST': @@ -57,7 +57,7 @@ def signin(token) : signin_enable=app.config['SIGNIN_ENABLE'], token=token, hostname=hostname, url_inscription=url_inscription, - MAIL_SERVER=MAIL_SERVER) + MAIL_SERVER=MAIL_SERVER, XMPP_SEVER=XMPP_SERVER) else: if len(request.form['user']) == 0 or \ len(request.form['passwd']) == 0 or \ @@ -68,7 +68,7 @@ def signin(token) : signin_enable=app.config['SIGNIN_ENABLE'], token=token, hostname=hostname, url_inscription=url_inscription, - MAIL_SERVER=MAIL_SERVER) + MAIL_SERVER=MAIL_SERVER, XMPP_SERVER=XMPP_SERVER) user = request.form['user'] passwd = request.form['passwd']