From 82892b26a927f0084e3b3060e61f1b85e8abd092 Mon Sep 17 00:00:00 2001
From: kaiyou <pierre@jaury.eu>
Date: Fri, 1 Nov 2019 19:31:56 +0100
Subject: [PATCH] Fix the avatar management code

---
 hiboo/identity/templates/avatar_create.html | 20 ++++++++++++++------
 hiboo/identity/templates/avatar_pick.html   | 19 ++++++++-----------
 2 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/hiboo/identity/templates/avatar_create.html b/hiboo/identity/templates/avatar_create.html
index 83cec6e..8ad2f71 100644
--- a/hiboo/identity/templates/avatar_create.html
+++ b/hiboo/identity/templates/avatar_create.html
@@ -1,13 +1,21 @@
 {% extends "base.html" %}
 
+{% set service_name = service.name %}
 {% block title %}{% trans %}Sign-up{% endtrans %}{% endblock %}
 {% block subtitle %}{% trans service_name %}for the service {{ service_name }}{% endtrans %}{% endblock %}
 
 {% block content %}
-<div class="box">
-  <div class="box-body">
-    <p>{% trans %}Your are about to sign up for {{ service.name }}{% endtrans %}.</p>
-  </div>
-  {{ macros.form(form) }}
-</div>
+<p>{% trans service_name %}Your are about to sign up for {{ service_name }}{% endtrans %}.</p>
+{{ macros.form(form) }}
+
+{% call macros.help(_("The service that does not support profiles"), auto=utils.display_help("main")) %}
+<p>{% trans %}The service does not support profiles as alternate identities. You will thus simply need to signup.{% endtrans %}</p>
+<p>{% trans %}The service will be able to access your current Hiboo username.{% endtrans %}</p>
+<p>{% trans %}Depending on your settings, the service might also be able to send you notifications.
+  Hiboo will not directly communicate your email address or any notification destination to the service,
+  but opaque identifiers instead. Thus, you can set your notifications preferences at anytime
+  directly in Hiboo settings.{% endtrans %}
+</p>
+{% endcall %}
+
 {% endblock %}
diff --git a/hiboo/identity/templates/avatar_pick.html b/hiboo/identity/templates/avatar_pick.html
index e7efa23..b9428e8 100644
--- a/hiboo/identity/templates/avatar_pick.html
+++ b/hiboo/identity/templates/avatar_pick.html
@@ -1,17 +1,14 @@
 {% extends "base.html" %}
 
-{% block title %}{% trans %}Sign in{% endtrans %}{% endblock %}
+{% set service_name = service.name %}
+{% block title %}{% trans %}Sign-in{% endtrans %}{% endblock %}
 {% block subtitle %}{% trans service_name %}for the service {{ service_name }}{% endtrans %}{% endblock %}
 
 {% block content %}
-<div class="box">
-  <div class="box-body">
-    <p>{% trans %}Please confirm that you wish to sign in to {{ service.name }}.{% endtrans %}</p>
-  </div>
-  <form method="POST" action="{{ utils.url_or_intent("account.home") }}" class="form">
-      {{ form.hidden_tag() }}
-      <input type="hidden" name="identity_uuid" value="{{ avatar.uuid }}">
-      <input type="submit" value="Sign in" class="btn btn-lg btn-flat bg-gray text-black">
-  </form>
-</div>
+<p>{% trans service_name %}Your are about to sign in for {{ service_name }}{% endtrans %}.</p>
+<form method="POST" action="{{ utils.url_or_intent("account.home") }}" class="form">
+    {{ form.hidden_tag() }}
+    <input type="hidden" name="identity_uuid" value="{{ avatar.uuid }}">
+    <input type="submit" value="Sign in as {{ current_user.username }}" class="btn btn-lg btn-flat bg-gray text-black">
+</form>
 {% endblock %}
-- 
GitLab