Complete implementation of Phase 1-3 (64 tasks): - Phase 1: Project setup with Flask, pytest, configuration - Phase 2: Core infrastructure (auth, models, services, testing) - Phase 3: Anonymous feedback submission with file uploads Features: - Anonymous feedback submission (text and/or up to 3 file attachments) - Multi-language support (any language accepted) - File validation (type, size) and virus scanning (ClamAV) - Product management with active/archived status - File-based storage with YAML metadata - User authentication system (Flask-Login) - CSRF protection and rate limiting - Test coverage: 10 passing tests (contract + integration) Security: - No IP address logging (FR-055 compliance) - File type whitelist and size limits (10MB max) - Virus scanning with graceful degradation - Filename sanitization and secure storage Test Results: - 8 contract tests passed - 2 integration tests passed - End-to-end workflow verified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
218 lines
5.9 KiB
HTML
218 lines
5.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Reklamator - Anonymous Feedback{% endblock %}</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
background-color: #f5f5f5;
|
|
padding: 20px;
|
|
}
|
|
.container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
background: white;
|
|
padding: 30px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
h1, h2, h3 {
|
|
margin-bottom: 20px;
|
|
color: #2c3e50;
|
|
}
|
|
h1 {
|
|
font-size: 2em;
|
|
border-bottom: 3px solid #3498db;
|
|
padding-bottom: 10px;
|
|
}
|
|
h2 {
|
|
font-size: 1.5em;
|
|
}
|
|
.flash-messages {
|
|
margin-bottom: 20px;
|
|
}
|
|
.flash {
|
|
padding: 12px 20px;
|
|
margin-bottom: 10px;
|
|
border-radius: 4px;
|
|
border-left: 4px solid;
|
|
}
|
|
.flash.success {
|
|
background-color: #d4edda;
|
|
border-color: #28a745;
|
|
color: #155724;
|
|
}
|
|
.flash.error {
|
|
background-color: #f8d7da;
|
|
border-color: #dc3545;
|
|
color: #721c24;
|
|
}
|
|
.flash.info {
|
|
background-color: #d1ecf1;
|
|
border-color: #17a2b8;
|
|
color: #0c5460;
|
|
}
|
|
.flash.warning {
|
|
background-color: #fff3cd;
|
|
border-color: #ffc107;
|
|
color: #856404;
|
|
}
|
|
form {
|
|
margin: 20px 0;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
font-weight: 600;
|
|
color: #555;
|
|
}
|
|
input[type="text"],
|
|
input[type="email"],
|
|
input[type="password"],
|
|
textarea,
|
|
select {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
font-size: 1em;
|
|
font-family: inherit;
|
|
}
|
|
textarea {
|
|
min-height: 150px;
|
|
resize: vertical;
|
|
}
|
|
button,
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 10px 20px;
|
|
background-color: #3498db;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 1em;
|
|
text-decoration: none;
|
|
transition: background-color 0.3s;
|
|
}
|
|
button:hover,
|
|
.btn:hover {
|
|
background-color: #2980b9;
|
|
}
|
|
button.secondary,
|
|
.btn.secondary {
|
|
background-color: #95a5a6;
|
|
}
|
|
button.secondary:hover,
|
|
.btn.secondary:hover {
|
|
background-color: #7f8c8d;
|
|
}
|
|
button.danger,
|
|
.btn.danger {
|
|
background-color: #e74c3c;
|
|
}
|
|
button.danger:hover,
|
|
.btn.danger:hover {
|
|
background-color: #c0392b;
|
|
}
|
|
.nav {
|
|
margin-bottom: 30px;
|
|
padding-bottom: 15px;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
.nav a {
|
|
margin-right: 20px;
|
|
color: #3498db;
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
}
|
|
.nav a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.error-text {
|
|
color: #e74c3c;
|
|
font-size: 0.9em;
|
|
margin-top: 5px;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin: 20px 0;
|
|
}
|
|
th, td {
|
|
padding: 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
th {
|
|
background-color: #f8f9fa;
|
|
font-weight: 600;
|
|
color: #555;
|
|
}
|
|
tr:hover {
|
|
background-color: #f8f9fa;
|
|
}
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 4px 8px;
|
|
border-radius: 3px;
|
|
font-size: 0.85em;
|
|
font-weight: 600;
|
|
}
|
|
.badge.new {
|
|
background-color: #3498db;
|
|
color: white;
|
|
}
|
|
.badge.analyzed {
|
|
background-color: #2ecc71;
|
|
color: white;
|
|
}
|
|
.badge.archived {
|
|
background-color: #95a5a6;
|
|
color: white;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
{% if current_user and current_user.is_authenticated %}
|
|
<div class="nav">
|
|
{% if current_user.role == 'product_owner' %}
|
|
<a href="{{ url_for('dashboard.list') }}">Dashboard</a>
|
|
<a href="{{ url_for('dashboard.products') }}">Products</a>
|
|
{% elif current_user.role == 'administrator' %}
|
|
<a href="{{ url_for('admin.dashboard') }}">Admin Dashboard</a>
|
|
<a href="{{ url_for('admin.users') }}">Users</a>
|
|
<a href="{{ url_for('admin.products') }}">Products</a>
|
|
{% endif %}
|
|
<a href="{{ url_for('auth.logout') }}" style="float: right;">Logout ({{ current_user.username }})</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="flash-messages">
|
|
{% for category, message in messages %}
|
|
<div class="flash {{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</body>
|
|
</html>
|