Updated the loginpage to not show a link to register if registrations are disabled

This commit is contained in:
Rasmus Larsson 2011-07-09 15:19:55 +02:00
parent 13677ef97a
commit 13bb1d676e
2 changed files with 4 additions and 1 deletions

View File

@ -104,7 +104,8 @@ def login(request):
'mediagoblin/auth/login.html',
{'login_form': login_form,
'next': request.GET.get('next') or request.POST.get('next'),
'login_failed': login_failed})
'login_failed': login_failed,
'allow_registration': mg_globals.app_config["allow_registration"]})
def logout(request):

View File

@ -35,7 +35,9 @@
<input type="hidden" name="next" value="{{ next }}" class="button"
style="display: none;"/>
{% endif %}
{% if allow_registration %}
<p>Don't have an account yet?<br /><a href="{{ request.urlgen('mediagoblin.auth.register') }}">Create one here!</a></p>
{% endif %}
</div>
</form>
{% endblock %}