forked from CGM_Public/pretix_original
This commit is contained in:
committed by
Raphael Michel
parent
488ee19b11
commit
28242e52aa
@@ -32,7 +32,8 @@ class LoginForm(forms.Form):
|
||||
for k, f in backend.login_form_fields.items():
|
||||
self.fields[k] = f
|
||||
|
||||
if not settings.PRETIX_LONG_SESSIONS:
|
||||
# Authentication backends which use urls cannot have long sessions.
|
||||
if not settings.PRETIX_LONG_SESSIONS or backend.url:
|
||||
del self.fields['keep_logged_in']
|
||||
else:
|
||||
self.fields.move_to_end('keep_logged_in')
|
||||
|
||||
@@ -22,9 +22,16 @@
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
<div class="form-group buttons">
|
||||
{% if backend.login_form_fields %}
|
||||
<button type="submit" class="btn btn-primary btn-block">
|
||||
{% trans "Log in" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if backend.url %}
|
||||
<a href="{{ backend.url }}" class="btn btn-primary btn-block">
|
||||
{{ backend.verbose_name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if backend.identifier == "native" %}
|
||||
{% if can_reset %}
|
||||
<a href="{% url "control:auth.forgot" %}" class="btn btn-link btn-block">
|
||||
|
||||
Reference in New Issue
Block a user