update
This commit is contained in:
29
templates/accounts/login.html
Normal file
29
templates/accounts/login.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Вход - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Вход в Системата</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="id_username">Потребителско Име</label>
|
||||
<input type="text" name="username" id="id_username" class="form-control" required autofocus>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_password">Парола</label>
|
||||
<input type="password" name="password" id="id_password" class="form-control" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">Вход</button>
|
||||
</form>
|
||||
<div class="auth-links">
|
||||
<a href="{% url 'accounts:password_reset' %}">Забравена парола?</a>
|
||||
<span>|</span>
|
||||
<a href="{% url 'accounts:register' %}">Създаване на акаунт</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
25
templates/accounts/mfa_disable.html
Normal file
25
templates/accounts/mfa_disable.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Деактивиране на Двуфакторна Автентификация - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="form-container">
|
||||
<h2>Деактивиране на Двуфакторна Автентификация</h2>
|
||||
<div class="gov-alert gov-alert-warning">
|
||||
<div class="alert-icon">⚠</div>
|
||||
<div class="alert-content">
|
||||
<p><strong>Внимание:</strong> Деактивирането на ДА ще намали сигурността на вашия акаунт.</p>
|
||||
<p>Сигурни ли сте, че искате да деактивирате двуфакторната автентификация?</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="post" data-loading>
|
||||
{% csrf_token %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-danger" data-tooltip="Това ще деактивира двуфакторната автентификация">Да, Деактивирам ДА</button>
|
||||
<a href="{% url 'accounts:profile' %}" class="btn btn-secondary">Отказ</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
41
templates/accounts/mfa_enable.html
Normal file
41
templates/accounts/mfa_enable.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Активиране на Двуфакторна Автентификация - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Активиране на Двуфакторна Автентификация</h2>
|
||||
<p>Въведете кода за потвърждение от вашето приложение за автентификация, за да активирате ДА.</p>
|
||||
|
||||
<form method="post" data-loading>
|
||||
{% csrf_token %}
|
||||
<div class="mfa-form-group">
|
||||
<label for="id_token">Код за Потвърждение</label>
|
||||
<input type="text"
|
||||
name="token"
|
||||
id="id_token"
|
||||
class="mfa-token-input"
|
||||
placeholder="000000"
|
||||
maxlength="6"
|
||||
pattern="[0-9]{6}"
|
||||
autofocus
|
||||
required
|
||||
inputmode="numeric">
|
||||
{% if form.token.errors %}
|
||||
<div class="error-message">{{ form.token.errors }}</div>
|
||||
{% endif %}
|
||||
<small class="mfa-help-text">Въведете 6-цифрения код от вашето приложение за автентификация</small>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">Активиране на ДА</button>
|
||||
</form>
|
||||
|
||||
<div class="auth-links">
|
||||
<a href="{% url 'accounts:mfa_setup' %}">Обратно към Настройка</a>
|
||||
<span>|</span>
|
||||
<a href="{% url 'accounts:profile' %}">Отказ</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
81
templates/accounts/mfa_setup.html
Normal file
81
templates/accounts/mfa_setup.html
Normal file
@@ -0,0 +1,81 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Настройка на Двуфакторна Автентификация - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="form-container">
|
||||
<h2>Настройка на Двуфакторна Автентификация</h2>
|
||||
|
||||
{% if mfa_enabled %}
|
||||
<div class="gov-alert gov-alert-info">
|
||||
<div class="alert-icon">ℹ</div>
|
||||
<div class="alert-content">
|
||||
<p>Двуфакторната автентификация вече е активирана за вашия акаунт.</p>
|
||||
<a href="{% url 'accounts:mfa_disable' %}" class="btn btn-danger" style="margin-top: 1rem;">Деактивиране</a>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="mfa-setup-steps">
|
||||
<div class="step">
|
||||
<h3>Стъпка 1: Инсталиране на Приложение за Автентификация</h3>
|
||||
<p>Ако все още нямате такова, инсталирайте приложение за автентификация на вашето мобилно устройство:</p>
|
||||
<ul>
|
||||
<li><strong>Google Authenticator</strong> (iOS, Android)</li>
|
||||
<li><strong>Microsoft Authenticator</strong> (iOS, Android)</li>
|
||||
<li><strong>Authy</strong> (iOS, Android)</li>
|
||||
<li><strong>1Password</strong> (iOS, Android, Desktop)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<h3>Стъпка 2: Сканиране на QR Код</h3>
|
||||
<p>Отворете вашето приложение за автентификация и сканирайте този QR код:</p>
|
||||
{% if qr_code %}
|
||||
<div class="qr-code-container">
|
||||
<img src="{{ qr_code }}" alt="QR Code" class="qr-code">
|
||||
</div>
|
||||
<div class="secret-key">
|
||||
<p><strong>Или въведете този ключ ръчно:</strong></p>
|
||||
<div class="secret-code">{{ secret_key }}</div>
|
||||
<button type="button" class="btn btn-sm btn-secondary" onclick="copySecretKey('{{ secret_key }}')" style="margin-top: 1rem;" data-tooltip="Копиране на секретния ключ">
|
||||
Копиране на Ключ
|
||||
</button>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Генериране на QR код...</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<h3>Стъпка 3: Потвърждаване на Настройката</h3>
|
||||
<p>Въведете 6-цифрения код от вашето приложение за автентификация, за да потвърдите настройката:</p>
|
||||
<div style="text-align: center; margin-top: 1.5rem;">
|
||||
<a href="{% url 'accounts:mfa_enable' %}" class="btn btn-primary" data-tooltip="Продължете към страницата за потвърждаване">Продължи към Потвърждаване</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-actions">
|
||||
<a href="{% url 'accounts:profile' %}" class="btn btn-secondary">Обратно към Профил</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function copySecretKey(key) {
|
||||
navigator.clipboard.writeText(key).then(function() {
|
||||
if (typeof Toast !== 'undefined') {
|
||||
Toast.success('Секретният ключ е копиран в клипборда!');
|
||||
} else {
|
||||
alert('Секретният ключ е копиран в клипборда!');
|
||||
}
|
||||
}, function(err) {
|
||||
console.error('Failed to copy: ', err);
|
||||
if (typeof Toast !== 'undefined') {
|
||||
Toast.error('Неуспешно копиране. Моля, копирайте ръчно.');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
39
templates/accounts/mfa_verify.html
Normal file
39
templates/accounts/mfa_verify.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Двуфакторна Автентификация - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Двуфакторна Автентификация</h2>
|
||||
<p>Моля, въведете кода за потвърждение от вашето приложение за автентификация, за да завършите входа.</p>
|
||||
|
||||
<form method="post" data-loading>
|
||||
{% csrf_token %}
|
||||
<div class="mfa-form-group">
|
||||
<label for="id_token">Код за Потвърждение</label>
|
||||
<input type="text"
|
||||
name="token"
|
||||
id="id_token"
|
||||
class="mfa-token-input"
|
||||
placeholder="000000"
|
||||
maxlength="6"
|
||||
pattern="[0-9]{6}"
|
||||
autofocus
|
||||
required
|
||||
inputmode="numeric">
|
||||
{% if form.token.errors %}
|
||||
<div class="error-message">{{ form.token.errors }}</div>
|
||||
{% endif %}
|
||||
<small class="mfa-help-text">Въведете 6-цифрения код от вашето приложение за автентификация</small>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">Потвърждаване</button>
|
||||
</form>
|
||||
|
||||
<div class="auth-links">
|
||||
<a href="{% url 'accounts:login' %}">Обратно към Вход</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
39
templates/accounts/password_change.html
Normal file
39
templates/accounts/password_change.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Смяна на Парола - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="form-container">
|
||||
<h2>Смяна на Парола</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="id_old_password">Текуща Парола</label>
|
||||
<input type="password" name="old_password" id="id_old_password" class="form-control" required autofocus>
|
||||
{% if form.old_password.errors %}
|
||||
<div class="error-message">{{ form.old_password.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_new_password1">Нова Парола</label>
|
||||
<input type="password" name="new_password1" id="id_new_password1" class="form-control" required>
|
||||
{% if form.new_password1.errors %}
|
||||
<div class="error-message">{{ form.new_password1.errors }}</div>
|
||||
{% endif %}
|
||||
<small class="form-text">Минимум 12 символа</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_new_password2">Потвърждение на Новата Парола</label>
|
||||
<input type="password" name="new_password2" id="id_new_password2" class="form-control" required>
|
||||
{% if form.new_password2.errors %}
|
||||
<div class="error-message">{{ form.new_password2.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Смяна на Парола</button>
|
||||
<a href="{% url 'accounts:profile' %}" class="btn btn-secondary">Отказ</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
27
templates/accounts/password_reset.html
Normal file
27
templates/accounts/password_reset.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Възстановяване на Парола - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Възстановяване на Парола</h2>
|
||||
<p>Въведете вашия имейл адрес и ще ви изпратим връзка за възстановяване на паролата.</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="id_email">Имейл</label>
|
||||
<input type="email" name="email" id="id_email" class="form-control" required autofocus>
|
||||
{% if form.email.errors %}
|
||||
<div class="error-message">{{ form.email.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">Изпращане на Връзка</button>
|
||||
</form>
|
||||
<div class="auth-links">
|
||||
<a href="{% url 'accounts:login' %}">Обратно към Вход</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
16
templates/accounts/password_reset_complete.html
Normal file
16
templates/accounts/password_reset_complete.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Възстановяване на Парола Завършено - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Възстановяване на Парола Завършено</h2>
|
||||
<p>Вашата парола е зададена. Можете да влезете в системата сега.</p>
|
||||
<div class="auth-links">
|
||||
<a href="{% url 'accounts:login' %}" class="btn btn-primary btn-block">Вход</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
41
templates/accounts/password_reset_confirm.html
Normal file
41
templates/accounts/password_reset_confirm.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Задаване на Нова Парола - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Задаване на Нова Парола</h2>
|
||||
{% if validlink %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="id_new_password1">Нова Парола</label>
|
||||
<input type="password" name="new_password1" id="id_new_password1" class="form-control" required autofocus>
|
||||
{% if form.new_password1.errors %}
|
||||
<div class="error-message">{{ form.new_password1.errors }}</div>
|
||||
{% endif %}
|
||||
<small class="form-text">Минимум 12 символа</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_new_password2">Потвърждение на Новата Парола</label>
|
||||
<input type="password" name="new_password2" id="id_new_password2" class="form-control" required>
|
||||
{% if form.new_password2.errors %}
|
||||
<div class="error-message">{{ form.new_password2.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">Смяна на Парола</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="gov-alert gov-alert-error">
|
||||
<div class="alert-icon">✕</div>
|
||||
<div class="alert-content">
|
||||
<p>Връзката за възстановяване на парола е невалидна или е изтекла. Моля, заявете нова.</p>
|
||||
<a href="{% url 'accounts:password_reset' %}" class="btn btn-primary" style="margin-top: 1rem;">Заявка за Нова Връзка</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
17
templates/accounts/password_reset_done.html
Normal file
17
templates/accounts/password_reset_done.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Имейл за Възстановяване Изпратен - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Имейл за Възстановяване Изпратен</h2>
|
||||
<p>Изпратихме ви инструкции за задаване на вашата парола. Ако съществува акаунт с въведения имейл, трябва да ги получите скоро.</p>
|
||||
<p>Ако не получите имейл, моля, уверете се, че сте въвели адреса, с който сте се регистрирали, и проверете папката за спам.</p>
|
||||
<div class="auth-links">
|
||||
<a href="{% url 'accounts:login' %}">Обратно към Вход</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
22
templates/accounts/password_reset_email.html
Normal file
22
templates/accounts/password_reset_email.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% load i18n %}{% autoescape off %}
|
||||
Здравейте,
|
||||
|
||||
Получихте този имейл, защото заявихте възстановяване на парола за вашия акаунт в {{ site_name|default:"Портал за Докладване на Измами" }}.
|
||||
|
||||
Моля, кликнете на следната връзка, за да зададете нова парола:
|
||||
|
||||
{{ protocol }}://{{ domain }}{% url 'accounts:password_reset_confirm' uidb64=uid token=token %}
|
||||
|
||||
Ако връзката не работи, копирайте и поставете адреса в браузъра си.
|
||||
|
||||
Ако не сте заявили възстановяване на парола, моля, игнорирайте този имейл. Вашата парола няма да бъде променена.
|
||||
|
||||
Тази връзка е валидна за ограничен период от време за вашата сигурност.
|
||||
|
||||
С уважение,
|
||||
Екипът на {{ site_name|default:"Портал за Докладване на Измами" }}
|
||||
|
||||
---
|
||||
Това е автоматично генериран имейл. Моля, не отговаряйте на този имейл.
|
||||
{% endautoescape %}
|
||||
|
||||
2
templates/accounts/password_reset_email_subject.txt
Normal file
2
templates/accounts/password_reset_email_subject.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Възстановяване на Парола - {{ site_name|default:"Портал за Докладване на Измами" }}
|
||||
|
||||
96
templates/accounts/profile.html
Normal file
96
templates/accounts/profile.html
Normal file
@@ -0,0 +1,96 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Моят Профил - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="profile-container">
|
||||
<div class="gov-card">
|
||||
<div class="gov-card-header">
|
||||
<h2>Моят Профил</h2>
|
||||
<a href="{% url 'accounts:profile_edit' %}" class="btn btn-primary">Редактиране на Профил</a>
|
||||
</div>
|
||||
<div class="gov-card-body">
|
||||
<div class="info-section">
|
||||
<h3>Информация за Акаунта</h3>
|
||||
<div class="profile-info">
|
||||
<div class="info-row">
|
||||
<strong>Потребителско Име:</strong>
|
||||
<span>{{ user_obj.username }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<strong>Имейл:</strong>
|
||||
<span>{{ user_obj.email }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<strong>Роля:</strong>
|
||||
<span class="badge badge-{{ user_obj.role }}">{{ user_obj.get_role_display }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<strong>Потвърден Имейл:</strong>
|
||||
<span>{% if user_obj.is_verified %}Да{% else %}Не{% endif %}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<strong>Двуфакторна Автентификация:</strong>
|
||||
<span>{% if user_obj.mfa_enabled %}Активирана{% else %}Деактивирана{% endif %}</span>
|
||||
{% if user_obj.mfa_enabled %}
|
||||
<a href="{% url 'accounts:mfa_disable' %}"
|
||||
class="btn btn-sm btn-danger"
|
||||
data-confirm="Сигурни ли сте, че искате да деактивирате двуфакторната автентификация? Това ще намали сигурността на вашия акаунт."
|
||||
data-confirm-title="Деактивиране на MFA"
|
||||
data-tooltip="Деактивиране на двуфакторна автентификация">Деактивиране</a>
|
||||
{% else %}
|
||||
<a href="{% url 'accounts:mfa_setup' %}"
|
||||
class="btn btn-sm btn-primary"
|
||||
data-tooltip="Активиране на двуфакторна автентификация за по-голяма сигурност">Активиране</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<strong>Член от:</strong>
|
||||
<span>{{ user_obj.created_at|date:"d F Y" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if user_obj.profile %}
|
||||
<div class="info-section">
|
||||
<h3>Лична Информация</h3>
|
||||
<div class="profile-info">
|
||||
{% if user_obj.profile.first_name %}
|
||||
<div class="info-row">
|
||||
<strong>Име:</strong>
|
||||
<span>{{ user_obj.profile.first_name }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if user_obj.profile.last_name %}
|
||||
<div class="info-row">
|
||||
<strong>Фамилия:</strong>
|
||||
<span>{{ user_obj.profile.last_name }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if user_obj.profile.phone %}
|
||||
<div class="info-row">
|
||||
<strong>Телефон:</strong>
|
||||
<span>{{ user_obj.profile.phone }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="info-row">
|
||||
<strong>Предпочитан Език:</strong>
|
||||
<span>{{ user_obj.profile.get_preferred_language_display }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gov-card">
|
||||
<div class="gov-card-body">
|
||||
<div class="profile-actions">
|
||||
<a href="{% url 'accounts:password_change' %}" class="btn btn-secondary">Смяна на Парола</a>
|
||||
<a href="{% url 'legal:data_request' %}" class="btn btn-secondary">Заявка за Данни</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
37
templates/accounts/profile_edit.html
Normal file
37
templates/accounts/profile_edit.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Редактиране на Профил - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="form-container">
|
||||
<h2>Редактиране на Профил</h2>
|
||||
<form method="post" data-loading>
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="id_first_name">Име</label>
|
||||
<input type="text" name="first_name" id="id_first_name" class="form-control" value="{{ form.first_name.value|default:'' }}" data-tooltip="Вашето първо име">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_last_name">Фамилия</label>
|
||||
<input type="text" name="last_name" id="id_last_name" class="form-control" value="{{ form.last_name.value|default:'' }}" data-tooltip="Вашата фамилия">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_phone">Телефон</label>
|
||||
<input type="text" name="phone" id="id_phone" class="form-control" value="{{ form.phone.value|default:'' }}" placeholder="+359..." data-tooltip="Телефонен номер в международен формат">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_preferred_language">Предпочитан Език</label>
|
||||
<select name="preferred_language" id="id_preferred_language" class="form-control" data-tooltip="Изберете предпочитания език за интерфейса">
|
||||
{% for value, label in form.preferred_language.field.choices %}
|
||||
<option value="{{ value }}" {% if form.preferred_language.value == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary" data-tooltip="Промените ще бъдат запазени">Запазване на Промените</button>
|
||||
<a href="{% url 'accounts:profile' %}" class="btn btn-secondary">Отказ</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
57
templates/accounts/register.html
Normal file
57
templates/accounts/register.html
Normal file
@@ -0,0 +1,57 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Регистрация - Официален Портал{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<h2>Създаване на Акаунт</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="id_username">Потребителско Име</label>
|
||||
<input type="text" name="username" id="id_username" class="form-control" required autofocus>
|
||||
{% if form.username.errors %}
|
||||
<div class="error-message">{{ form.username.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_email">Имейл</label>
|
||||
<input type="email" name="email" id="id_email" class="form-control" required>
|
||||
{% if form.email.errors %}
|
||||
<div class="error-message">{{ form.email.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_password1">Парола</label>
|
||||
<input type="password" name="password1" id="id_password1" class="form-control" required>
|
||||
{% if form.password1.errors %}
|
||||
<div class="error-message">{{ form.password1.errors }}</div>
|
||||
{% endif %}
|
||||
<small class="form-text">Минимум 12 символа</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="id_password2">Потвърждение на Парола</label>
|
||||
<input type="password" name="password2" id="id_password2" class="form-control" required>
|
||||
{% if form.password2.errors %}
|
||||
<div class="error-message">{{ form.password2.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox" name="consent_given" id="id_consent_given" required>
|
||||
Съгласен съм с <a href="{% url 'legal:privacy' %}" target="_blank">Политиката за Поверителност</a> и <a href="{% url 'legal:terms' %}" target="_blank">Условията за Ползване</a>
|
||||
</label>
|
||||
{% if form.consent_given.errors %}
|
||||
<div class="error-message">{{ form.consent_given.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">Регистрация</button>
|
||||
</form>
|
||||
<div class="auth-links">
|
||||
<a href="{% url 'accounts:login' %}">Вече имате акаунт? Вход</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user