Commit a472a576 authored by Noe Nieto's avatar Noe Nieto 💬

Papercut: Add *subscribe* link to the login page; Purism/LibremOne/task#272

parent ff6d0d35
Pipeline #6874 failed with stage
......@@ -69,3 +69,6 @@ EMAIL_PORT = 465
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True
DEFAULT_FROM_EMAIL = "Do not replay <noreply@example.com>"
# This is the link to the subscribe page, used in different parts of the middleware
SUBSCRIBE_HREF = /#bundle
......@@ -16,6 +16,7 @@ SPDX-License-Identifier: AGPL-3.0
<link rel="icon" sizes="960x960" href="{% static 'favicon.png' %}"/>
<meta name="application-name" content="Purist"/>
<meta charset="UTF-8"/>
<style>{% block extra_css%}{% endblock %}</style>
</head>
<body>
......
......@@ -4,11 +4,16 @@
{% block header %}{% trans 'Log in' %}{% endblock %}
{% block byline %}{% trans 'Please fill in your credentials' %}{% endblock %}
{% block content %}
{% block extra_css%}
.login p {
margin-left: 40px;
}
{% endblock %}
{% block content %}
<!-- Main Content -->
<section class="row">
<section>
<section class="login">
<form method="post" action=".">
{% csrf_token %} {{ form|crispy}}
......@@ -17,9 +22,8 @@
<input type="hidden" name="next" value="{{ next }}"/>
</div>
</form>
<a href="{% url 'password_reset_recover' %}"> forgot your password? </a>
<p>New user?<a href="{{ site_settings.SUBSCRIBE_HREF }}">Subscribe now!</a></p>
<p><a href="{% url 'password_reset_recover' %}"> forgot your password? </a></p>
</section>
</section>
{% endblock %}
......@@ -141,6 +141,13 @@ DATABASES = {
DATABASE_ROUTERS = ['ldapdb.router.Router']
#
# Context processor that makes the django settings avaiable to templates
#
TEMPLATES[0]['OPTIONS']['context_processors'].append('purist.context_processors.settings')
#
# STATIC AND SITE SETTINGS
#
......@@ -272,3 +279,6 @@ EMAIL_PORT = config('EMAIL_PORT', 25, cast=int)
EMAIL_USE_TLS = config('EMAIL_USE_TLS', False, cast=bool)
EMAIL_USE_SSL = config('EMAIL_USE_SSL', False, cast=bool)
# This is the link to the subscribe page, used in different parts of the middleware
SUBSCRIBE_HREF = config('SUBSCRIBE_HREF')
from django.conf import settings as django_settings
def settings(request):
return {
'site_settings': django_settings,
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment