Skip to content

Commit

Permalink
COR-42 / Registration disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Yan Rudenko committed Oct 14, 2021
1 parent 66a69b5 commit 5789dd2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions ckanorg/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
EMAIL_HOST_USER = 'AKIAUWX42BAVQ3UFZFUU'
DEFAULT_FROM_EMAIL = '[email protected]'

ACCOUNT_ADAPTER = 'ckan_pages.adapter.NoNewUsersAccountAdapter'
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_CONFIRM_EMAIL_ON_GET = True
ACCOUNT_EMAIL_REQUIRED = True
Expand Down
2 changes: 1 addition & 1 deletion ckanorg/templates/account/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<li><a href="{% url 'account_logout' %}">Sign Out</a></li>
{% else %}
<li><a href="{% url 'account_login' %}">Sign In</a></li>
<li><a href="{% url 'account_signup' %}">Sign Up</a></li>
<!-- <li><a href="{% url 'account_signup' %}">Sign Up</a></li> -->
{% endif %}
</ul>
</div>
Expand Down
7 changes: 5 additions & 2 deletions ckanorg/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ <h1>{% trans "Sign In" %}</h1>
{% include "socialaccount/snippets/login_extra.html" %}

{% else %}
<p>{% blocktrans %}If you have not created an account yet, then please
<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
<p>{% blocktrans %}
Want to write a blog post? Contact
<a href="mailto:[email protected]">[email protected]</a>. Or use our
<a data-micromodal-trigger="modal-1" href="javascript:void(0);" id="contact">Contact form</a>.
{% endblocktrans %}</p>
{% endif %}

<form class="login" method="POST" action="{% url 'account_login' %}">
Expand Down
10 changes: 7 additions & 3 deletions ckanorg/templates/account/signup_closed.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{% extends "account/base.html" %}
{% extends "base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Sign Up Closed" %}{% endblock %}

{% block content %}
<h1>{% trans "Sign Up Closed" %}</h1>
<div class="row">
<div class="center-block ckanorg-auth-form">
<h1>{% trans "Sign Up Closed" %}</h1>

<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
</div>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions ckanorg/templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<li>
<a href="{% url 'account_login' %}">Login</a>
</li>
<li>
<!-- <li>
<a href="{% url 'account_signup' %}">Sign up</a>
</li>
</li> -->
</ul>
{% endif %}
<ul class="social footer-btns">
Expand Down

0 comments on commit 5789dd2

Please sign in to comment.