Объединены изменения из промежуточных миграций в начальные миграции для упрощения истории базы данных. Удалены миграции: accounts/0002, discounts/0002, orders/0003-0004, products/0002-0005, user_roles/0002, system_settings/0001-0002, integrations/0001-0002. Добавлена автоматическая creation пользователя при установке пароля. Обновлен UI страницы установки пароля с кастомным стилем. Добавлен conditional rendering для кнопки синхронизации Recommerce. Исправлены редиректы с 'index' на '/' в accounts views. Добавлена проверка request.tenant в navbar и authenticate метод в auth backend.
109 lines
3.1 KiB
HTML
109 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Установка пароля</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
.container {
|
|
background: white;
|
|
border-radius: 12px;
|
|
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
|
|
padding: 40px;
|
|
max-width: 400px;
|
|
width: 100%;
|
|
}
|
|
h1 {
|
|
color: #333;
|
|
margin-bottom: 10px;
|
|
font-size: 24px;
|
|
}
|
|
.subtitle {
|
|
color: #666;
|
|
margin-bottom: 30px;
|
|
font-size: 14px;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
label {
|
|
display: block;
|
|
color: #333;
|
|
font-weight: 500;
|
|
margin-bottom: 8px;
|
|
}
|
|
input[type="password"] {
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
}
|
|
input[type="password"]:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
}
|
|
.btn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
}
|
|
.btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
.messages {
|
|
margin-bottom: 20px;
|
|
}
|
|
.messages .error {
|
|
background: #fee;
|
|
color: #c33;
|
|
padding: 10px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Установка пароля</h1>
|
|
<p class="subtitle">для {{ tenant.name }}</p>
|
|
|
|
{% if messages %}
|
|
<div class="messages">
|
|
{% for message in messages %}
|
|
<div class="{{ message.tags }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<div class="form-group">
|
|
<label for="id_password1">Пароль</label>
|
|
<input type="password" name="password1" id="id_password1" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="id_password2">Подтвердите пароль</label>
|
|
<input type="password" name="password2" id="id_password2" required>
|
|
</div>
|
|
<button type="submit" class="btn">Установить пароль</button>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html>
|