From a1b2cb81f55470f2cdeca2923e623939cb052871 Mon Sep 17 00:00:00 2001 From: Andy Byers Date: Tue, 11 Jun 2024 14:11:07 +0100 Subject: [PATCH 1/3] #4272 removes django tags from registration pages. --- src/themes/OLH/templates/core/accounts/register.html | 4 ++-- src/themes/clean/templates/core/accounts/register.html | 4 ++-- src/themes/material/templates/core/accounts/register.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/themes/OLH/templates/core/accounts/register.html b/src/themes/OLH/templates/core/accounts/register.html index 2cb43771b..a4d11a725 100644 --- a/src/themes/OLH/templates/core/accounts/register.html +++ b/src/themes/OLH/templates/core/accounts/register.html @@ -27,8 +27,8 @@
{% trans "Register for an account with" %} {{ request.press.name }}.

{% trans "Password Rules" %}:

{% blocktrans %}For more information read our password guide.{% endblocktrans %}

diff --git a/src/themes/clean/templates/core/accounts/register.html b/src/themes/clean/templates/core/accounts/register.html index fd56ba4bc..9fc380e59 100644 --- a/src/themes/clean/templates/core/accounts/register.html +++ b/src/themes/clean/templates/core/accounts/register.html @@ -18,8 +18,8 @@
{% trans "Register for an account with" %} {{ request.press.name }}.

{% trans "Password Rules" %}:

{% blocktrans %}For more information read our password guide.{% endblocktrans %}

diff --git a/src/themes/material/templates/core/accounts/register.html b/src/themes/material/templates/core/accounts/register.html index b9db87560..116f7b7cd 100644 --- a/src/themes/material/templates/core/accounts/register.html +++ b/src/themes/material/templates/core/accounts/register.html @@ -20,8 +20,8 @@

{% trans "Password Rules" %}:

{% blocktrans %}For more information read our password guide From 0f004024506a03773150ba88ca8f9358ba51a1a7 Mon Sep 17 00:00:00 2001 From: Andy Byers Date: Tue, 11 Jun 2024 14:15:45 +0100 Subject: [PATCH 2/3] Remove whitespace. --- src/themes/material/templates/core/accounts/register.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/themes/material/templates/core/accounts/register.html b/src/themes/material/templates/core/accounts/register.html index 116f7b7cd..c6b673261 100644 --- a/src/themes/material/templates/core/accounts/register.html +++ b/src/themes/material/templates/core/accounts/register.html @@ -23,9 +23,7 @@ {% if request.press.password_upper %}

  • {% blocktrans %}Your password should contain at least one upper case letter.{% endblocktrans %}
  • {% endif %} {% if request.press.password_number %}
  • {% blocktrans %}Your password should contain at least one number.{% endblocktrans %}
  • {% endif %} -

    {% blocktrans %}For more information read our - password guide - .{% endblocktrans %}

    +

    {% blocktrans %}For more information read our password guide.{% endblocktrans %}

    {% include "elements/forms/errors.html" %} {% csrf_token %} From cf6677afc688ad6b7220fed352202dc659cd0b22 Mon Sep 17 00:00:00 2001 From: Andy Byers Date: Tue, 11 Jun 2024 16:39:26 +0100 Subject: [PATCH 3/3] #4272 update based on comments. --- src/templates/common/elements/password_rules.html | 14 ++++++++++++++ .../OLH/templates/core/accounts/register.html | 4 +--- .../clean/templates/core/accounts/register.html | 4 +--- .../material/templates/core/accounts/register.html | 10 ++++++---- 4 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 src/templates/common/elements/password_rules.html diff --git a/src/templates/common/elements/password_rules.html b/src/templates/common/elements/password_rules.html new file mode 100644 index 000000000..fab177b6a --- /dev/null +++ b/src/templates/common/elements/password_rules.html @@ -0,0 +1,14 @@ +
  • + {% blocktrans trimmed with password_length=request.press.password_length %} + Your password should be {{ password_length }} characters long. + {% endblocktrans %}
  • +{% if request.press.password_upper %} +
  • {% blocktrans trimmed %} + Your password should contain at least one upper case letter. + {% endblocktrans %}
  • +{% endif %} +{% if request.press.password_number %} +
  • {% blocktrans trimmed %} + Your password should contain at least one number. + {% endblocktrans %}
  • +{% endif %} \ No newline at end of file diff --git a/src/themes/OLH/templates/core/accounts/register.html b/src/themes/OLH/templates/core/accounts/register.html index a4d11a725..aef9c4269 100644 --- a/src/themes/OLH/templates/core/accounts/register.html +++ b/src/themes/OLH/templates/core/accounts/register.html @@ -26,9 +26,7 @@
    {% trans "Register for an account with" %} {{ request.press.name }}.

    {% trans "Password Rules" %}:

      -
    • {% blocktrans with password_length=request.press.password_length %}Your password should be {{ password_length }} characters long.{% endblocktrans %}
    • - {% if request.press.password_upper %}
    • {% blocktrans %}Your password should contain at least one upper case letter.{% endblocktrans %}
    • {% endif %} - {% if request.press.password_number %}
    • {% blocktrans %}Your password should contain at least one number.{% endblocktrans %}
    • {% endif %} + {% include "common/elements/password_rules.html" %}

    {% blocktrans %}For more information read our password guide.{% endblocktrans %}

    diff --git a/src/themes/clean/templates/core/accounts/register.html b/src/themes/clean/templates/core/accounts/register.html index 9fc380e59..76ff181bc 100644 --- a/src/themes/clean/templates/core/accounts/register.html +++ b/src/themes/clean/templates/core/accounts/register.html @@ -17,9 +17,7 @@
    {% trans "Register for an account with" %} {{ request.press.name }}.

    {% trans "Password Rules" %}:

      -
    • {% blocktrans with password_length=request.press.password_length %}Your password should be {{ password_length }} characters long.{% endblocktrans %}
    • - {% if request.press.password_upper %}
    • {% blocktrans %}Your password should contain at least one upper case letter.{% endblocktrans %}
    • {% endif %} - {% if request.press.password_number %}
    • {% blocktrans %}Your password should contain at least one number.{% endblocktrans %}
    • {% endif %} + {% include "common/elements/password_rules.html" %}

    {% blocktrans %}For more information read our password guide.{% endblocktrans %}

    diff --git a/src/themes/material/templates/core/accounts/register.html b/src/themes/material/templates/core/accounts/register.html index c6b673261..de2ad43c8 100644 --- a/src/themes/material/templates/core/accounts/register.html +++ b/src/themes/material/templates/core/accounts/register.html @@ -19,11 +19,13 @@ {% endif %}

    {% trans "Password Rules" %}:

      -
    • {% blocktrans with password_length=request.press.password_length %}Your password should be {{ password_length }} characters long.{% endblocktrans %}
    • - {% if request.press.password_upper %}
    • {% blocktrans %}Your password should contain at least one upper case letter.{% endblocktrans %}
    • {% endif %} - {% if request.press.password_number %}
    • {% blocktrans %}Your password should contain at least one number.{% endblocktrans %}
    • {% endif %} + {% include "common/elements/password_rules.html" %}
    -

    {% blocktrans %}For more information read our password guide.{% endblocktrans %}

    +

    + {% blocktrans trimmed %}For more information read our + password + guide.{% endblocktrans %} +

    {% include "elements/forms/errors.html" %} {% csrf_token %}