Merge develop into feature/registration_failed/html
This commit is contained in:
@@ -2,57 +2,58 @@
|
||||
|
||||
<html lang="ru" class="h-100">
|
||||
{% load static %}
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
|
||||
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
|
||||
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I" crossorigin="anonymous">
|
||||
|
||||
<style>
|
||||
.bd-placeholder-img {
|
||||
font-size: 1.125rem;
|
||||
text-anchor: middle;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.bd-placeholder-img {
|
||||
font-size: 1.125rem;
|
||||
text-anchor: middle;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.bd-placeholder-img-lg {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.bd-placeholder-img-lg {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
{% block extra_scripts %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body class="d-flex flex-column h-100">
|
||||
{% include 'base/menu.html' %}
|
||||
{% include 'base/menu.html' %}
|
||||
|
||||
<main class="flex-shrink-0">
|
||||
<div class="container mt-4 mb-4">
|
||||
<h1 class="mb-4 text-center">
|
||||
{% block heading %}
|
||||
<main class="flex-shrink-0">
|
||||
<div class="container mt-4 mb-4">
|
||||
<h1 class="mb-4 text-center">
|
||||
{% block heading %}
|
||||
{% endblock %}
|
||||
</h1>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</h1>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="footer mt-auto py-3 bg-light">
|
||||
<div class="container">
|
||||
<small class="text-muted mt-auto">Сайт сделан учениками Школы Программистов (Группа №02)</small>
|
||||
</div>
|
||||
</footer>
|
||||
<footer class="footer mt-auto py-3 bg-light">
|
||||
<div class="container">
|
||||
<small class="text-muted mt-auto">Сайт сделан учениками Школы Программистов (Группа №02)</small>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous">
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -3,20 +3,56 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<nav class="navbar navbar-light" style="background-color: #00FF00;">
|
||||
<nav class="navbar navbar-light" style="background-color: #113A60;">
|
||||
<a class="navbar-brand" href="{% url 'index' %}">
|
||||
<img src="{% static 'main/img/logo.png' %}" width="30" height="30" class="d-inline-block align-top" alt="" loading="lazy">
|
||||
Access Controller
|
||||
<img src="{% static 'main/img/logo_real.png' %}" width="107" height="22" class="d-inline-block align-top" style="margin-left: 15px" alt="" loading="lazy">
|
||||
<t style="color:#FFFFFF">Access Controller</t>
|
||||
</a>
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<a class="btn btn-secondary" href="{% url 'profile' %}">Профиль</a>
|
||||
<div class="btn-group" role="group" aria-label="Basic example" style="margin-right: 9px">
|
||||
<a {% if profile_lit %}
|
||||
class="btn btn-primary"
|
||||
{% else %}
|
||||
class="btn btn-secondary"
|
||||
{% endif %}
|
||||
href="{% url 'profile' %}">Профиль</a>
|
||||
{% if perms.main.has_control_access %}
|
||||
<a {% if control_lit %}
|
||||
class="btn btn-primary"
|
||||
{% else %}
|
||||
class="btn btn-secondary"
|
||||
{% endif %}
|
||||
href="{% url 'control' %}">Управление</a>
|
||||
<a {% if stats_lit %}
|
||||
class="btn btn-primary"
|
||||
{% else %}
|
||||
class="btn btn-secondary"
|
||||
{% endif %}
|
||||
href="{% url 'statistic' %}">Статистика</a>
|
||||
{% else %}
|
||||
<a {% if work_lit %}
|
||||
class="btn btn-primary"
|
||||
{% else %}
|
||||
class="btn btn-secondary"
|
||||
{% endif %}
|
||||
href="{% url 'work' request.user.id %}">Запрос прав</a>
|
||||
{% endif %}
|
||||
<a class="btn btn-secondary" href="{% url 'logout' %}">Выйти</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<a class="btn btn-secondary" href="/accounts/login">Войти</a>
|
||||
<a class="btn btn-secondary" href="/accounts/register">Зарегистрироваться</a>
|
||||
<div class="btn-group" role="group" aria-label="Basic example" style="margin-right: 9px">
|
||||
<a {% if login_lit %}
|
||||
class="btn btn-primary"
|
||||
{% else %}
|
||||
class="btn btn-secondary"
|
||||
{% endif %}
|
||||
href="/accounts/login">Войти</a>
|
||||
<a {% if registration_lit %}
|
||||
class="btn btn-primary"
|
||||
{% else %}
|
||||
class="btn btn-secondary"
|
||||
{% endif %}
|
||||
href="/accounts/register">Зарегистрироваться</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
|
||||
{% block content %}
|
||||
<br>
|
||||
<h4> Нет пользователя с указаным адресом электронной почты, либо был введён неверный пароль</h4>
|
||||
<h4> Нет пользователя с указаным адресом электронной почты.</h4>
|
||||
{% endblock %}
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
|
||||
{% block content %}
|
||||
<br>
|
||||
<h4> Регистрация прошла успешно. <a href="/login/">Войти сейчас</a></h4>
|
||||
<h4> Регистрация прошла успешно. <a href="{% url 'login'%}">Войти сейчас</a></h4>
|
||||
{% endblock %}
|
||||
|
||||
15
main/templates/django_registration/registration_error.html
Normal file
15
main/templates/django_registration/registration_error.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'base/base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}
|
||||
Регистрация завершена
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
Регистрация
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<br>
|
||||
<h4> Произошла ошибка при отправке электронного сообщения.</h4>
|
||||
{% endblock %}
|
||||
@@ -11,14 +11,12 @@
|
||||
{% block content %}
|
||||
<form method="post" action="">
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
{{ field.label_tag }}
|
||||
{{ field }}
|
||||
{{ form.email.label_tag }}
|
||||
{{ form.email }}
|
||||
<br>
|
||||
{% if field.errors %}
|
||||
<span>{{ field.errors }}</span>
|
||||
{% if form.email.errors %}
|
||||
<span>{{ form.email.errors }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<input type="submit" value="Зарегистрироваться" class="clearfix">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
112
main/templates/pages/adm_ruleset.html
Normal file
112
main/templates/pages/adm_ruleset.html
Normal file
@@ -0,0 +1,112 @@
|
||||
{% extends 'base/base.html' %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Управление{% endblock %}
|
||||
|
||||
{% block heading %}Управление{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{% static 'main/css/work.css' %}" xmlns="http://www.w3.org/1999/html">
|
||||
<link rel="stylesheet" href="{% static 'modules/notifications/dist/notifications.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
|
||||
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
|
||||
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||||
|
||||
<script src="{% static 'modules/notifications/dist/notifications.js' %}"></script>
|
||||
<script src="{% static 'main/js/control.js'%}" type="text/babel"></script>
|
||||
<script src="{% static 'main/js/notifications.js' %}"></script>
|
||||
{% endblock%}
|
||||
{% block content %}
|
||||
<div class="container-md">
|
||||
|
||||
<div class="new-section">
|
||||
<p class="row page-description" id="licences_remaining">Свободных Мест:</p>
|
||||
</div>
|
||||
|
||||
{% for message in messages %}
|
||||
<script>create_notification('{{message}}','','{{message.tags}}',2000)</script>
|
||||
{% endfor %}
|
||||
|
||||
{% block form %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="row justify-content-center new-section">
|
||||
|
||||
<div class="col-10">
|
||||
<h6 class="table-title">Список сотрудников</h6>
|
||||
|
||||
{% block table %}
|
||||
<table class="table table-dark light-table">
|
||||
|
||||
<thead>
|
||||
<th>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="head-checkbox"
|
||||
/>
|
||||
</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Role</th>
|
||||
</thead>
|
||||
<tbody id="tbody"></tbody>
|
||||
|
||||
</table>
|
||||
<p id="loading">Данные загружаются...</p>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block count %}
|
||||
<div class="row justify-content-center new-section">
|
||||
<div class="col-5">
|
||||
<div class="info">
|
||||
|
||||
<div class="info-row">
|
||||
<div class="info-target">Инженеров:</div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-green"></div>
|
||||
<span class="info-quantity-value">{{ engineers }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="info-row">
|
||||
<div class="info-target">Легких агентов:</div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-yellow"></div>
|
||||
<span class="info-quantity-value">{{ light_agents }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block buttons %}
|
||||
<div class="col-5">
|
||||
|
||||
<button type="submit" name="engineer" class="request-acess-button default-button">
|
||||
Назначить выбранных на роль инженера
|
||||
</button>
|
||||
|
||||
<button type="submit" name="light_agent" class="hand-over-acess-button default-button">
|
||||
Назначить выбранных на роль легкого агента
|
||||
</button>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -10,17 +10,14 @@
|
||||
|
||||
|
||||
{% block extra_css %}
|
||||
<style>
|
||||
.img{
|
||||
<style>
|
||||
.img {
|
||||
width:auto;
|
||||
height:auto;
|
||||
max-width:100px!important;
|
||||
max-height:100px!important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -28,24 +25,31 @@
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<div class="container">
|
||||
{% if image_url %}
|
||||
<img src={{image_url}} class="img img-thumbnail" alt="Аватар">
|
||||
{% else %}
|
||||
<img src="{% static 'no_avatar.png' %}" class="img img-thumbnail" alt="Нет изображения">
|
||||
{% endif %}
|
||||
<img
|
||||
src="{% if profile.image %}{{ profile.image }}{% else %}{% static 'no_avatar.png' %}{% endif %}"
|
||||
class="img img-thumbnail"
|
||||
alt="Нет изображения"
|
||||
>
|
||||
</div>
|
||||
<a href="{%url 'password_change' %}">Сменить пароль</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h5><span class="badge bg-secondary text-light">Имя пользователя</span> {{name}}</h5>
|
||||
<h5><span class="badge bg-secondary text-light">Имя пользователя</span> {{ profile.name }}</h5>
|
||||
<br>
|
||||
<h5><span class="badge bg-secondary text-light">Электронная почта</span> {{email}}</h5>
|
||||
<h5><span class="badge bg-secondary text-light">Электронная почта</span> {{ profile.user.email }}</h5>
|
||||
<br>
|
||||
<h5><span class="badge bg-secondary text-light">Текущая роль</span> {{role}}</h5>
|
||||
<h5><span class="badge bg-secondary text-light">Текущая роль</span>
|
||||
{% if profile.custom_role_id == ZENDESK_ROLES.engineer %}
|
||||
engineer
|
||||
{% elif profile.custom_role_id == ZENDESK_ROLES.light_agent %}
|
||||
light_agent
|
||||
{% endif %}
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div align="center">
|
||||
<form action="">
|
||||
<button class="btn btn-primary"><big>Запросить права доступа</big></button>
|
||||
<a href="{% url 'work' profile.user.id %}" class="btn btn-primary"><big>Запросить права доступа</big></a>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
106
main/templates/pages/statistic.html
Normal file
106
main/templates/pages/statistic.html
Normal file
@@ -0,0 +1,106 @@
|
||||
{% extends 'base/base.html' %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ pagename }}{% endblock %}
|
||||
|
||||
{% block heading %} Страницы просмотра статистики{% endblock %}
|
||||
|
||||
{% block content%}
|
||||
<div class="mt-5">
|
||||
<div class="container-fluid" style="font-size:2rem">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="row g-3">
|
||||
<div class="col-auto">
|
||||
{{ form.email.label }}
|
||||
</div>
|
||||
<div class="col-auto mt-4">
|
||||
{{ form.email }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.interval.label }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
{% for radio in form.interval%}
|
||||
{{ radio.tag }}
|
||||
<label class="btn btn-outline-secondary" for="{{ radio.id_for_label }}">
|
||||
{{ radio.choice_label }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.display_format.label }}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
{% for radio in form.display_format%}
|
||||
{{ radio.tag }}
|
||||
<label class="btn btn-outline-secondary" for="{{ radio.id_for_label }}">
|
||||
{{ radio.choice_label }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.range_start.label}}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class='col-sm-7'>
|
||||
{{ form.range_start}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3 mt-4">
|
||||
<div class="col-auto">
|
||||
{{ form.range_end.label}}
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class='col-sm-7'>
|
||||
{{ form.range_end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row text-center">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-outline-primary">Посмотреть статистику</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<ul>
|
||||
{% for error in errors %}
|
||||
<li><span class="badge bg-danger">{{error}}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul>
|
||||
{% for warning in warnings %}
|
||||
<li><span class="badge bg-warning">{{warning}}</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered text-center text-secondary mt-5" style="background-color:#f2f2f2;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td scope="col"> </td>
|
||||
{% for date in log_stats.keys %}
|
||||
<td scope="col">{{ date | date:'d.m' }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ form.email.value }}</td>
|
||||
{% for time in log_stats.values %}
|
||||
<td>{{ time | floatformat:2 }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -4,17 +4,22 @@
|
||||
|
||||
{% block title %}{{ pagename }}{% endblock %}
|
||||
|
||||
{% block heading %}Управление{% endblock %}
|
||||
{% block heading %}Управление правами{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{% static 'main/css/work.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'main/css/work.css' %}" xmlns="http://www.w3.org/1999/html">
|
||||
<link rel="stylesheet" href="{% static 'modules/notifications/dist/notifications.css' %}">
|
||||
{% endblock %}
|
||||
{% block extra_scripts %}
|
||||
<script src="{% static 'modules/notifications/dist/notifications.js' %}"></script>
|
||||
<script src="{% static 'main/js/notifications.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-md">
|
||||
|
||||
<div class="new-section">
|
||||
<p class="row page-description">Основаная информация о странице</p>
|
||||
<p class="row page-description">Свободных Мест: {{ licences_remaining }}</p>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center new-section">
|
||||
@@ -22,25 +27,16 @@
|
||||
<h6 class="table-title">Список сотрудников с правами инженера</h6>
|
||||
<table class="light-table">
|
||||
<thead>
|
||||
<th>ID</th>
|
||||
<th>email</th>
|
||||
<th>Expiration Date</th>
|
||||
<th>Name(link to profile)</th>
|
||||
<th>Email</th>
|
||||
<th>Name</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>big_boss123@example.ru</td>
|
||||
<td>19:30 18.02.21</td>
|
||||
<td><a href="#">Иван Иванов</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>gachi_cool456@example.ru</td>
|
||||
<td>21:00 18.02.21</td>
|
||||
<td><a href="#">Пётр Петров</a></td>
|
||||
</tr>
|
||||
{% for engineer in engineers %}
|
||||
<tr>
|
||||
<td>{{ engineer.email }}</td>
|
||||
<td>{{ engineer.name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -52,23 +48,33 @@
|
||||
<div class="info-target">инженеров: </div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-green"></div>
|
||||
<span class="info-quantity-value">13</span>
|
||||
<span class="info-quantity-value">{{ engineers|length }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<div class="info-target">легких агентов:</div>
|
||||
<div class="info-quantity">
|
||||
<div class="status-circle-small light-yellow"></div>
|
||||
<span class="info-quantity-value">22</span>
|
||||
<span class="info-quantity-value">{{ agents|length }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<button class="request-acess-button default-button">Получить права инженера</button>
|
||||
<button class="hand-over-acess-button default-button">Сдать права инженера</button>
|
||||
<a href="/work/become_engineer" class="request-acess-button default-button">Получить права инженера</a>
|
||||
<a href="/work/hand_over" class="hand-over-acess-button default-button">Сдать права инженера</a>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<form method="GET" action="/work/get_tickets">
|
||||
<input class="form-control mb-3" type="number" min="1" value="1" name="count_tickets">
|
||||
<button type="submit" class="default-button">Взять тикеты в работу</button>
|
||||
</form>
|
||||
</div>
|
||||
{% for message in messages %}
|
||||
<script>create_notification('{{message}}','','{{message.tags}}',2000)</script>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{% extends 'base/base.html' %}
|
||||
{% block title %}
|
||||
Авторизация
|
||||
{% endblock %}
|
||||
{% block heading %}
|
||||
Авторизация
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Авторизация{% endblock %}
|
||||
|
||||
{% block heading %}Авторизация{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="card mx-auto" style="width: 40rem">
|
||||
@@ -31,7 +30,7 @@
|
||||
{% endif %}
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary">Войти</button>
|
||||
<a href="" class="btn btn-link" style="display: block;">Забыли пароль?</a>
|
||||
<a href="{% url 'password_reset' %}" class="btn btn-link" style="display: block;">Забыли пароль?</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
12
main/templates/registration/password_change_done.html
Normal file
12
main/templates/registration/password_change_done.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "base/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Пароль успешно изменен{% endblock title %}
|
||||
|
||||
{% block heading %}Пароль успешно изменен{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<h4>Ваш пароль был изменен.</h4>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
14
main/templates/registration/password_change_form.html
Normal file
14
main/templates/registration/password_change_form.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "base/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Изменение пароля{% endblock title %}
|
||||
|
||||
{% block heading %}Сменить пароль{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Сменить" class="btn btn-success">
|
||||
</form>
|
||||
{% endblock content %}
|
||||
13
main/templates/registration/password_reset_complete.html
Normal file
13
main/templates/registration/password_reset_complete.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends "base/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ pagename }}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
Восстановление пароля
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Ваш новый пароль был установлен. Вы можете <a href="{% url 'login' %}">войти</a> сейчас</p>
|
||||
{% endblock %}
|
||||
23
main/templates/registration/password_reset_confirm.html
Normal file
23
main/templates/registration/password_reset_confirm.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends "base/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ pagename }}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
Восстановление пароля
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if validlink %}
|
||||
<p>Пожалуйста, введите пароль дважды:</p>
|
||||
<form action="." method="post">
|
||||
{{ form.as_p }}
|
||||
{% csrf_token %}
|
||||
<p><input class="btn btn-success" type="submit" value="Сменить пароль"/></p>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>Неверная ссылка восстановления пароля, возможно она уже была использована.
|
||||
Пожалуйста, запросите новый сброс пароля</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
14
main/templates/registration/password_reset_done.html
Normal file
14
main/templates/registration/password_reset_done.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "base/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ pagename }}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
Восстановление пароля
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Мы отправили вам на почту инструкцию по восстановлению</p>
|
||||
<p>Если вы не получили сообщение, убедитесь что верно ввели адрес электронной почты.</p>
|
||||
{% endblock %}
|
||||
18
main/templates/registration/password_reset_form.html
Normal file
18
main/templates/registration/password_reset_form.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "base/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ pagename }}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
Забыли пароль?
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Введте свой e-mail адрес для восстановления пароля.</p>
|
||||
<form action="." method="post">
|
||||
{{ form.as_p }}
|
||||
<p><input class="btn btn-success" type="submit" value="Отпрваить e-mail"></p>
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user