labd / wagtail-2fa

2 Factor Authentication for Wagtail
https://wagtail-2fa.readthedocs.io/en/latest/
MIT License
85 stars 44 forks source link

Use new template for wagtail >= 4 #196

Closed th3hamm0r closed 1 year ago

th3hamm0r commented 1 year ago

This fixes crashes due to a reference to a non-existent CSS file (removed in wagtail >= 4.0), but also tries to adapt the html based on the latest login.html.

See #187

Note: I've copied the last version of otp_form.html to a legacy folder, and adapted the template for the new requirements. On the frontend, the output is not optimal yet (secondary button has some margin), but at least it does not crash.

wagtail_2fa_wagtail_4_fixes

davisnando commented 1 year ago

@th3hamm0r Can you fix the conflicts and fix the margin as well?

th3hamm0r commented 1 year ago

@davisnando I've now fixed the conflicts. Unfortunately, I don't have a clean solution for the margin atm. Initially, I've tried to find wagtail css classes or components, but I wasn't successful. So maybe someone else could fix that (e.g. using a new ticket/PR).

tjwalch commented 1 year ago

@davisnando @th3hamm0r I fixed the margins in #203 . Did not use any builtin classes, just added som styling in extra_css block