mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
allauth working and integrated
This commit is contained in:
56
cookbook/templates/account/login.html
Normal file
56
cookbook/templates/account/login.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_filters %}
|
||||
{% load i18n %}
|
||||
|
||||
{% load account socialaccount %}
|
||||
|
||||
{% block title %}{% trans 'Login' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: center">
|
||||
<h3>{% trans "Sign In" %}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 offset-3">
|
||||
<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 %}
|
||||
|
||||
<button class="btn btn-primary" type="submit">{% trans "Sign In" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% get_providers as socialaccount_providers %}
|
||||
|
||||
{% if socialaccount_providers %}
|
||||
<div class="row" style="margin-top: 2vh">
|
||||
<div class="col-6 offset-3">
|
||||
<h5>{% trans "Social Login" %}</h5>
|
||||
<span>{% trans 'You can use any of the following providers to sign in.' %}</span>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<ul class="socialaccount_providers">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||
</ul>
|
||||
|
||||
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
22
cookbook/templates/account/logout.html
Normal file
22
cookbook/templates/account/logout.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_filters %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Sign Out' %}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Sign Out" %}</h1>
|
||||
|
||||
<p>{% trans 'Are you sure you want to sign out?' %}</p>
|
||||
|
||||
<form method="post" action="{% url 'account_logout' %}">
|
||||
{% csrf_token %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
|
||||
{% endif %}
|
||||
<button class="btn btn-warning" type="submit">{% trans 'Sign Out' %}</button>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
11
cookbook/templates/account/password_reset.html
Normal file
11
cookbook/templates/account/password_reset.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_filters %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Password Reset' %}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<span>{% trans 'Password reset is not implemented for the time being!' %}</span>
|
||||
|
||||
{% endblock %}
|
||||
11
cookbook/templates/account/password_reset_done.html
Normal file
11
cookbook/templates/account/password_reset_done.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_filters %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Password Reset' %}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<span>{% trans 'Password reset is not implemented for the time being!' %}</span>
|
||||
|
||||
{% endblock %}
|
||||
20
cookbook/templates/no_groups_info.html
Normal file
20
cookbook/templates/no_groups_info.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Offline" %}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div style="text-align: center">
|
||||
|
||||
<h1 class="">{% trans 'No Permissions' %}</h1>
|
||||
<br/>
|
||||
|
||||
<span>{% trans 'You do not have any groups and therefor cannot use this application. Please contact your administrator.' %}</span> <br/>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Login' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{% trans "Your username and password didn't match. Please try again." %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<form role="form" class="form-horizontal" method="post" action="{% url 'account_login' %}">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for='{{ form.username.label_tag }}' class="col-sm-2 col-form-label">{{ form.username.label }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" id="{{ form.username.id_for_label }}"
|
||||
name="{{ form.username.html_name }}"/>
|
||||
</div>
|
||||
{% if form.username.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ form.username.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for='{{ form.password.label_tag }}' class="col-sm-2 col-form-label">{{ form.password.label }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" id="{{ form.password.id_for_label }}"
|
||||
name="{{ form.password.html_name }}" type="password"/>
|
||||
</div>
|
||||
{% if form.password.errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ form.password.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<input type="submit" class="btn btn-primary" value="{% trans 'Login' %}"/>
|
||||
<input type="hidden" name="next" value="{{ next }}"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user