mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
crispy sign in
This commit is contained in:
parent
b1e0e09a90
commit
1c3fa186ec
42
InvenTree/templates/account/login.html
Normal file
42
InvenTree/templates/account/login.html
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n account socialaccount crispy_forms_tags %}
|
||||
|
||||
{% block head_title %}{% trans "Sign In" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% trans "Sign In" %}</h1>
|
||||
|
||||
{% get_providers as socialaccount_providers %}
|
||||
{% if socialaccount_providers %}
|
||||
<p>{% blocktrans with site.name as site_name %}Please sign in with one
|
||||
of your existing third party accounts or <a class="btn btn-primary btn-small" href="{{ signup_url }}">sign up</a>
|
||||
for a account and sign in below:{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<p>{% blocktrans %}If you have not created an account yet, then please
|
||||
<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
|
||||
<form class="login" method="POST" action="{% url 'account_login' %}">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
|
||||
<div class="btn-toolbar">
|
||||
<button class="btn btn-primary col-md-8" type="submit">{% trans "Sign In" %}</button>
|
||||
<a class="btn btn-primary" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<br>
|
||||
<h4 class="text-center">{% trans 'or use SSO' %}</h4>
|
||||
<div>
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||
</div>
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user