From 8e3c39d3191ad772f699e46c408bf25bb8a8748b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 17 Feb 2022 10:38:24 -0800 Subject: [PATCH] Adds admin key field to admin user setup form --- bookwyrm/templates/setup/admin.html | 30 ++++++++++++- .../templates/snippets/register_form.html | 44 ++++++++++++++++--- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/bookwyrm/templates/setup/admin.html b/bookwyrm/templates/setup/admin.html index a92870e2..713577d5 100644 --- a/bookwyrm/templates/setup/admin.html +++ b/bookwyrm/templates/setup/admin.html @@ -3,7 +3,9 @@ {% block header %}

{% trans "Setup admin user" %}

-
Your account a user and an admin
+
+ {% trans "Your account a user and an admin" %} +
{% endblock %} {% block panel %} @@ -12,13 +14,37 @@

{% trans "Create your account" %}

+
+ +
+ +

+ {% blocktrans trimmed %} + An admin key was created when you installed BookWyrm. + You can get your admin key by running ./bw-dev admin-code from the command line on your server. + {% endblocktrans %} +

+
+
{% include 'snippets/register_form.html' %}

- {% trans "As an admin, you'll be able to configure the instance name and information, and moderate your instance. This means you will have access to private information about your users, and are responsible for repsonding to reports of bad behavior or spam." %} + {% blocktrans trimmed %} + As an admin, you'll be able to configure the instance name and information, and moderate your instance. + This means you will have access to private information about your users, and are responsible for repsonding to reports of bad behavior or spam. + {% endblocktrans %}

{% trans "Once the instance is set up, you can promote other users to moderator or admin roles from the admin panel." %} diff --git a/bookwyrm/templates/snippets/register_form.html b/bookwyrm/templates/snippets/register_form.html index a1af78ef..dd8cff3a 100644 --- a/bookwyrm/templates/snippets/register_form.html +++ b/bookwyrm/templates/snippets/register_form.html @@ -3,27 +3,61 @@

- - - {% include 'snippets/form_errors.html' with errors_list=register_form.localname.errors id="desc_localname_register" %} + +
+

+ {% trans "Choose wisely! Your username cannot be changed." %} +

+ + {% include 'snippets/form_errors.html' with errors_list=register_form.localname.errors id="desc_localname_register" %} +
+
- + {% include 'snippets/form_errors.html' with errors_list=register_form.email.errors id="desc_email_register" %}
+
- + {% include 'snippets/form_errors.html' with errors_list=register_form.password.errors id="desc_password_register" %}
+