]> git.ipfire.org Git - ipfire.org.git/commitdiff
auth: Rename Registering -> Joining
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Dec 2023 14:09:34 +0000 (14:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Dec 2023 14:09:34 +0000 (14:09 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
14 files changed:
Makefile.am
src/backend/accounts.py
src/static/img/auth/join.jpg [moved from src/static/img/auth/register.jpg with 100% similarity]
src/templates/auth/join-success.html [new file with mode: 0644]
src/templates/auth/join.html [moved from src/templates/auth/register.html with 93% similarity]
src/templates/auth/login.html
src/templates/auth/messages/join.html [moved from src/templates/auth/messages/register.html with 52% similarity]
src/templates/auth/messages/join.txt [new file with mode: 0644]
src/templates/auth/messages/register.txt [deleted file]
src/templates/auth/register-success.html [deleted file]
src/templates/blog/index.html
src/templates/blog/post.html
src/web/__init__.py
src/web/auth.py

index 28e0b2942dfa23532337b10dde7d01abc44a4f33..37a6c084f88b1531d6225f0aed05918948beed4e 100644 (file)
@@ -116,26 +116,26 @@ templatesdir = $(datadir)/templates
 templates_auth_DATA = \
        src/templates/auth/activate.html \
        src/templates/auth/activated.html \
+       src/templates/auth/join.html \
+       src/templates/auth/join-success.html \
        src/templates/auth/login.html \
        src/templates/auth/password-reset.html \
        src/templates/auth/password-reset-initiation.html \
-       src/templates/auth/password-reset-successful.html \
-       src/templates/auth/register.html \
-       src/templates/auth/register-success.html
+       src/templates/auth/password-reset-successful.html
 
 templates_authdir = $(templatesdir)/auth
 
 templates_auth_messages_DATA = \
        src/templates/auth/messages/donation-reminder.html \
        src/templates/auth/messages/donation-reminder.txt \
+       src/templates/auth/messages/join.html \
+       src/templates/auth/messages/join.txt \
        src/templates/auth/messages/password-reset.html \
        src/templates/auth/messages/password-reset.txt \
        src/templates/auth/messages/profile-setup.html \
        src/templates/auth/messages/profile-setup.txt \
        src/templates/auth/messages/profile-setup-2.html \
-       src/templates/auth/messages/profile-setup-2.txt \
-       src/templates/auth/messages/register.html \
-       src/templates/auth/messages/register.txt
+       src/templates/auth/messages/profile-setup-2.txt
 
 templates_auth_messagesdir = $(templates_authdir)/messages
 
@@ -975,13 +975,13 @@ static_imgdir = $(staticdir)/img
 # From https://www.pexels.com/photo/123-let-s-go-imaginary-text-704767/
 
 dist_static_img_auth_DATA = \
-       src/static/img/auth/register.jpg
+       src/static/img/auth/join.jpg
 
 static_img_auth_DATA = \
-       src/static/img/auth/register@600.jpg
+       src/static/img/auth/join@600.jpg
 
 CLEANFILES += \
-       src/static/img/auth/register@600.jpg
+       src/static/img/auth/join@600.jpg
 
 static_img_authdir = $(static_imgdir)/auth
 
index 9242f4b0e17676627bb23cbec26fc62a62903d4b..6310d4d346ec0cdf81e3f0055d80f832ba929e28 100644 (file)
@@ -442,9 +442,9 @@ class Accounts(Object):
                if account and account.check_password(password):
                        return account
 
-       # Registration
+       # Join
 
-       def register(self, uid, email, first_name, last_name, country_code=None):
+       def join(self, uid, email, first_name, last_name, country_code=None):
                # Convert all uids to lowercase
                uid = uid.lower()
 
@@ -474,7 +474,7 @@ class Accounts(Object):
                        uid, activation_code, email, first_name, last_name, country_code)
 
                # Send an account activation email
-               self.backend.messages.send_template("auth/messages/register",
+               self.backend.messages.send_template("auth/messages/join",
                        priority=100, uid=uid, activation_code=activation_code, email=email,
                        first_name=first_name, last_name=last_name)
 
diff --git a/src/templates/auth/join-success.html b/src/templates/auth/join-success.html
new file mode 100644 (file)
index 0000000..a6da052
--- /dev/null
@@ -0,0 +1,29 @@
+{% extends "../base.html" %}
+
+{% block title %}{{ _("Thank You") }}{% end block %}
+
+{% block content %}
+       <section class="section">
+               <div class="container">
+                       <div class="columns is-centered">
+                               <div class="column is-half">
+                                       <div class="notification is-success">
+                                               <h1 class="title">
+                                                       {{ _("Thank you for joining!") }}
+                                               </h1>
+
+                                               <h4 class="subtitle">
+                                                       {{ _("Please check your email for next steps.") }}
+                                               </h4>
+
+                                               <div class="block has-text-centered">
+                                                       <span class="icon m-5">
+                                                               <i class="fas fa-check fa-5x"></i>
+                                                       </span>
+                                               </div>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </section>
+{% end block %}
similarity index 93%
rename from src/templates/auth/register.html
rename to src/templates/auth/join.html
index 9cf067ead8b5e6cb7f2b7e2b9ae9b592b3b87f05..4a6dc1e11689809633ab39d029751006137322ad 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "../base.html" %}
 
-{% block title %}{{ _("Register") }}{% end block %}
+{% block title %}{{ _("Join Our Community") }}{% end block %}
 
 {% block content %}
        <section class="section">
                                        <h1 class="title">
                                                IPFire<span class="has-text-primary">_</span>
                                        </h1>
-                                       <h4 class="subtitle">{{ _("Register A New Account") }}</h4>
+                                       <h4 class="subtitle">{{ _("Join Our Community") }}</h4>
 
-                                       <div class="block">
-                                               <p class="is-size-5">
-                                                       {{ _("Become a part of our community by registering an account!") }}
-                                               </p>
-                                       </div>
-
-                                       <form id="form-register" action="" method="POST">
+                                       <form id="form-join" action="" method="POST">
                                                {% raw xsrf_form_html() %}
 
                                                <input type="hidden" name="next" value="{{ next or "" }}">
                                                <div class="field">
                                                        <div class="control">
                                                                <button class="button is-primary is-medium is-fullwidth">
-                                                                       {{ _("Register") }}
+                                                                       {{ _("Join Now") }}
                                                                </button>
                                                        </div>
                                                </div>
 
 {% block javascript %}
        <script>
-               var form = $("#form-register");
+               var form = $("#form-join");
                var submit = form.find(":submit");
 
                // Store the valid status
index 3a7db4e229c09d2a4f2ee1c64adbf5303f0667a0..151ba9d1830465dd91ead46e657282f3887d763b 100644 (file)
@@ -48,8 +48,8 @@
                                                </div>
 
                                                <div class="block has-text-centered">
-                                                       <a href="/register">
-                                                               {{ _("Don't have an account, yet? Register Now") }}
+                                                       <a href="/join">
+                                                               {{ _("Don't have an account, yet? Join Now") }}
                                                        </a>
                                                </div>
                                        </div>
similarity index 52%
rename from src/templates/auth/messages/register.html
rename to src/templates/auth/messages/join.html
index bd3fc29945dcb7e7a840dbe6233f1dfa3d4d25b2..145bcc7238df420c7558514a56e8a09777f57517 100644 (file)
@@ -3,7 +3,7 @@
 {% block hero %}
        <tr class="hero">
                <td>
-                       <img class="g-img" src="{{ embed_image("img/auth/register@600.jpg") }}" alt="IPFire">
+                       <img class="g-img" src="{{ embed_image("img/auth/join@600.jpg") }}" alt="IPFire">
                </td>
        </tr>
 {% end block %}
 {% block content %}
        <tr class="section">
                <td>
-                       <h1>{{ _("Hello %s!") % first_name }}</h1>
+                       <h1>{{ _("Dear %s!") % first_name }}</h1>
 
                        <p>
-                               {{ _("Thank you for registering a new account with us.") }}
+                               {{ _("Welcome to our vibrant community! We're thrilled to have you on board.") }}
                        </p>
 
                        <p>
-                               {{ _("This account will allow you to take part in our project. Either by joining conversations, writing documentation, or becoming a developer.") }}
-                               {{ _("There are many things you can do with your account.") }}
+                               {{ _("To activate your membership, please click on the activation link below:") }}
                        </p>
 
                        <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0">
                                <tr class="button">
                                        <td>
                                                 <a class="primary" href="https://www.ipfire.org/activate/{{ uid }}/{{ activation_code }}">
-                                                       {{ _("Activate Account") }}
+                                                       {{ _("Activate Now") }}
                                                 </a>
                                        </td>
                                </tr>
                        </table>
+
+                       <p>
+                               {{ _("We look forward to seeing you actively participate in our community.") }}
+                       </p>
                </td>
        </tr>
 {% end block %}
diff --git a/src/templates/auth/messages/join.txt b/src/templates/auth/messages/join.txt
new file mode 100644 (file)
index 0000000..d6674b4
--- /dev/null
@@ -0,0 +1,16 @@
+From: IPFire Project <no-reply@ipfire.org>
+To: {{ first_name }} {{ last_name }} <{{ email }}>
+Subject: {{ _("Activate Your Community Membership Now!") }}
+X-Auto-Response-Suppress: OOF
+
+{{ _("Dear %s!") % first_name }}
+
+{{ _("Welcome to our vibrant community! We're thrilled to have you on board.") }}
+
+{{ _("To activate your membership, please click on the activation link below:") }}
+
+  https://www.ipfire.org/activate/{{ uid }}/{{ activation_code }}
+
+{{ _("If the link doesn't work, copy and paste it into your browser.") }}
+
+{{ _("We look forward to seeing you actively participate in our community.") }}
diff --git a/src/templates/auth/messages/register.txt b/src/templates/auth/messages/register.txt
deleted file mode 100644 (file)
index 9fafa9b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-From: IPFire Project <no-reply@ipfire.org>
-To: {{ first_name }} {{ last_name }} <{{ email }}>
-Subject: {{ _("Please activate your account for the IPFire Project") }}
-X-Auto-Response-Suppress: OOF
-
-{{ _("Hello %s!") % first_name }}
-
-{{ _("Thank you for registering a new account with us.") }}
-
-{{ _("This account will allow you to take part in our project. Either by joining conversations, writing documentation, or becoming a developer.") }} {{ _("There are many things you can do with your account.") }}
-
-{{ _("To activate it, please click on this link:") }}
-
-  https://www.ipfire.org/activate/{{ uid }}/{{ activation_code }}
diff --git a/src/templates/auth/register-success.html b/src/templates/auth/register-success.html
deleted file mode 100644 (file)
index c3726bc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Thank You") }}{% end block %}
-
-{% block content %}
-<section class="section">
-       <div class="container">
-               <div class="columns is-centered">
-                       <div class="column is-one-third">
-                               <h1 class="title">
-                                       IPFire<span class="has-text-primary">_</span>
-                               </h1>
-                               <h4 class="subtitle">
-                                       {{ _("Your account has been created.") }}
-                                       {{ _("Please check your email for next steps.") }}
-                               </h4>
-
-                               <div class="block">
-                                       <p class="is-size-5">
-                                               <span class="fas fa-check fa-5x my-4"></span>
-                                       </p>
-                               </div>
-                       </div>
-               </div>
-       </div>
-</section>
-{% end block %}
index 678f9e840cfeedf5c1e666673c8ff2f765111e9f..20e5efb9eec131533e9e95968f4a8b6a1cb87f80 100644 (file)
                                        {# Show a button to sign up for anonymous users #}
                                        {% if not current_user %}
                                                <div class="block">
-                                                       <a class="button is-primary is-large is-fullwidth wrap-text" href="/register">
+                                                       <a class="button is-primary is-large is-fullwidth wrap-text" href="/join">
                                                                <span class="icon">
                                                                        <i class="fa-solid fa-envelope"></i>
                                                                </span>
-                                                               <span>{{ _("Sign Up & Subscribe to our Newsletter") }}</span>
+                                                               <span>{{ _("Join Now & Subscribe to our Newsletter") }}</span>
                                                        </a>
                                                </div>
 
index f057fe5e0854847c27a787611c2b6f6a18abcd82..fd143eb63994aca02d226f80c6863680246c52c0 100644 (file)
@@ -93,7 +93,7 @@
                                        &nbsp;
 
                                        {% if not current_user %}
-                                               <a class="has-text-weight-bold" href="/register">
+                                               <a class="has-text-weight-bold" href="/join">
                                                        {{ _("Join Now") }}
                                                </a>
                                        {% else %}
index 1b7dbfb9b595e39cb53d9488b3a3347d7fc3e604..cdb534c1b5f0e6c31406a19093c88898984dd89c 100644 (file)
@@ -119,9 +119,9 @@ class Application(tornado.web.Application):
                        (r"/", IndexHandler),
 
                        # Authentication
+                       (r"/join", auth.JoinHandler),
                        (r"/login", auth.LoginHandler),
                        (r"/logout", auth.LogoutHandler),
-                       (r"/register", auth.RegisterHandler),
                        (r"/activate/([a-z_][a-z0-9_-]{0,31})/(\w+)", auth.ActivateHandler),
 
                        # Blog
@@ -342,7 +342,7 @@ class Application(tornado.web.Application):
                # people.ipfire.org
                self.add_handlers(r"people\.([a-z]+\.dev\.)?ipfire\.org", [
                        (r"/", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users" }),
-                       (r"/register", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/register" }),
+                       (r"/register", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/join" }),
                        (r"/users", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users" }),
                        (r"/users/([a-z_][a-z0-9_-]{0,31})", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users/{0}" }),
                        (r"/users/([a-z_][a-z0-9_-]{0,31})\.jpg", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/users/{0}.jpg" }),
index f14a184cfb69319f240bb6d52f0090064cbb087d..023ca6e8d4c35f6c272db74290b4bbec6d989ad3 100644 (file)
@@ -74,14 +74,14 @@ class LogoutHandler(AuthenticationMixin, base.BaseHandler):
                self.redirect("/")
 
 
-class RegisterHandler(base.BaseHandler):
+class JoinHandler(base.BaseHandler):
        def get(self):
                # Redirect logged in users away
                if self.current_user:
                        self.redirect("/")
                        return
 
-               self.render("auth/register.html")
+               self.render("auth/join.html")
 
        @base.ratelimit(minutes=15, requests=5)
        async def post(self):
@@ -94,13 +94,13 @@ class RegisterHandler(base.BaseHandler):
                # Register account
                try:
                        with self.db.transaction():
-                               self.backend.accounts.register(uid, email,
+                               self.backend.accounts.join(uid, email,
                                        first_name=first_name, last_name=last_name,
                                        country_code=self.current_country_code)
                except ValueError as e:
                        raise tornado.web.HTTPError(400, "%s" % e) from e
 
-               self.render("auth/register-success.html")
+               self.render("auth/join-success.html")
 
 
 class ActivateHandler(AuthenticationMixin, base.BaseHandler):