Merge "Show WEBSSO disclaimer only when it is needed"
This commit is contained in:
commit
94aea2fedd
@ -30,7 +30,9 @@
|
||||
<input type="password" name="fake_password" value="" />
|
||||
</div>
|
||||
{%endif%}
|
||||
{% if show_sso_opts %}
|
||||
{% include "auth/_description.html" %}
|
||||
{% endif %}
|
||||
<fieldset hz-login-finder>
|
||||
{% if request.user.is_authenticated and 'next' in request.GET %}
|
||||
<div class="form-group clearfix error help-block alert alert-danger">
|
||||
|
@ -92,6 +92,10 @@ def login(request, template_name=None, extra_context=None, **kwargs):
|
||||
|
||||
extra_context['csrf_failure'] = request.GET.get('csrf_failure')
|
||||
|
||||
choices = getattr(settings, 'WEBSSO_CHOICES', ())
|
||||
extra_context['show_sso_opts'] = (utils.is_websso_enabled() and
|
||||
len(choices) > 1)
|
||||
|
||||
if not template_name:
|
||||
if request.is_ajax():
|
||||
template_name = 'auth/_login.html'
|
||||
|
Loading…
Reference in New Issue
Block a user