]> git.ipfire.org Git - ipfire.org.git/commitdiff
auth: Style the activated screen
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 26 Nov 2024 17:58:18 +0000 (17:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 26 Nov 2024 17:58:18 +0000 (17:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/auth/activated.html
src/web/__init__.py
src/web/auth.py

index eff7ffdbfe98685f65408de5a4410d7ff2ad796c..44b906ce0a389d6e8ff63aa8c2c3e993d4ef8d02 100644 (file)
@@ -3,23 +3,31 @@
 {% block title %}{{ _("Thank You for Activating Your Account") }}{% end block %}
 
 {% block content %}
-       <div class="row justify-content-center my-5">
-               <div class="col col-md-4 text-center">
-                       <h5>{{ _("Thank You for Activating Your Account") }}</h5>
+       <section class="hero is-large">
+               <div class="hero-body">
+                       <h5 class="title">{{ _("Thank You for Activating Your Account") }}</h5>
 
-                       <p class="my-4">
-                               {{ _("To kick things off, would you like to setup a donation to the IPFire Project?") }}
-                       </p>
+                       <div class="block">
+                               <p>
+                                       {{ _("To kick things off, would you like to setup a donation to the IPFire Project?") }}
+                               </p>
+                       </div>
 
-                       <div class="d-grid">
-                               <a class="btn btn-lg btn-primary mb-1" href="https://www.ipfire.org/donate?first_name={{ url_escape(account.first_name) }}&last_name={{ url_escape(account.last_name) }}">
+                       <div class="block">
+                               <a class="button is-primary is-large is-fullwidth" href="/donate">
                                        {{ _("Donate Now") }}
                                </a>
                        </div>
 
-                       <a class="link-secondary small" href="/">
-                               {{ _("No thanks, I have already donated") }}
-                       </a>
+                       <div class="block">
+                               <p class="has-text-centered">
+                                       <small>
+                                               <a href="/">
+                                                       {{ _("No thanks, I already donated") }}
+                                               </a>
+                                       </small>
+                               </p>
+                       </div>
                </div>
-       </div>
+       </section>
 {% end block %}
index 8f80d6ba913ca5cb01b373dfa25499a3915e3910..0e29e4d61fe0341e26a4f0670df9205c1b4a81cd 100644 (file)
@@ -135,6 +135,7 @@ class Application(tornado.web.Application):
                        (r"/login", auth.LoginHandler),
                        (r"/logout", auth.LogoutHandler),
                        (r"/activate/([a-z_][a-z0-9_-]{0,31})/(\w+)", auth.ActivateHandler),
+                       (r"/debug/activated", auth.DebugActivatedHandler),
 
                        # Blog
                        (r"/blog", blog.IndexHandler),
index 4d2c0f51b89f703022a4762d9ae24f12ecc3e188..9e81631c4e8b329c2fa5fdfc91dedbf10c2b3a4e 100644 (file)
@@ -129,6 +129,12 @@ class ActivateHandler(AuthenticationMixin, base.BaseHandler):
                self.render("auth/activated.html", account=account)
 
 
+class DebugActivatedHandler(base.BaseHandler):
+       @tornado.web.authenticated
+       def get(self):
+               self.render("auth/activated.html", account=self.current_user)
+
+
 class PasswordResetInitiationHandler(base.BaseHandler):
        def get(self):
                username = self.get_argument("username", None)