- Consent giving UI introduced
- Possibility to view the document version the consent is given to - Blocking functionality is no valid consent
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
<!-- Gebundelde CSS (bevat nu al je CSS) -->
|
||||
<link href="{{ asset_url('dist/main.css') }}" rel="stylesheet" />
|
||||
<!-- Consent viewer specific styles -->
|
||||
<link href="{{ prefixed_url_for('static', filename='assets/css/eveai-consent-viewer.css') }}" rel="stylesheet" />
|
||||
<base href="/admin/">
|
||||
</head>
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
{'name': 'Consent Versions', 'url': 'user/consent_versions', 'roles': ['Super User']},
|
||||
{'name': 'Tenant Overview', 'url': 'user/tenant_overview', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
{'name': 'Edit Tenant', 'url': 'user/tenant/' ~ session['tenant'].get('id'), 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
{'name': 'Tenant Consents', 'url': 'user/consent/tenant', 'roles': ['Tenant Admin']},
|
||||
{'name': 'Consent Renewal', 'url': 'user/consent/tenant_renewal', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
{'name': 'Consents Overview', 'url': 'user/tenants/' ~ session['tenant'].get('id') ~ '/consents', 'roles': ['Super User', 'Partner Admin']},
|
||||
{'name': 'Tenant Partner Services', 'url': 'user/tenant_partner_services', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
{'name': 'Tenant Makes', 'url': 'user/tenant_makes', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
{'name': 'Tenant Projects', 'url': 'user/tenant_projects', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||
|
||||
13
eveai_app/templates/user/consent_renewal.html
Normal file
13
eveai_app/templates/user/consent_renewal.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Consent Renewal{% endblock %}
|
||||
{% block content_title %}Consent Renewal{% endblock %}
|
||||
{% block content_description %}Consent renewal process{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="alert alert-info">This page will guide you through the consent renewal process.</div>
|
||||
<p>Please navigate to the Tenant Consents page to renew the required consents.</p>
|
||||
<a href="{{ prefixed_url_for('user_bp.tenant_consent') }}" class="btn btn-primary">Go to Tenant Consents</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
15
eveai_app/templates/user/no_consent.html
Normal file
15
eveai_app/templates/user/no_consent.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Consent Required{% endblock %}
|
||||
{% block content_title %}Consent Required{% endblock %}
|
||||
{% block content_description %}Access is restricted until required consents are provided{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="alert alert-danger">You currently do not have access because required consents are missing or expired.</div>
|
||||
<p>Please contact your Tenant Admin or Management Partner to review and accept the latest Data Privacy Agreement and Terms & Conditions.</p>
|
||||
{% if current_user.has_roles('Tenant Admin', 'Partner Admin', 'Super User') %}
|
||||
<a href="{{ prefixed_url_for('user_bp.tenant_consent') }}" class="btn btn-primary">Go to Tenant Consents</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,4 @@
|
||||
{# HTML fragment to render consent markdown content #}
|
||||
<div class="markdown-body">
|
||||
{{ markdown_content | markdown }}
|
||||
</div>
|
||||
64
eveai_app/templates/user/tenant_consent.html
Normal file
64
eveai_app/templates/user/tenant_consent.html
Normal file
@@ -0,0 +1,64 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from "macros.html" import debug_to_console %}
|
||||
|
||||
{% block title %}Tenant Consents{% endblock %}
|
||||
{% block content_title %}Tenant Consents{% endblock %}
|
||||
{% block content_description %}Please consent if required before continuing{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
{% if statuses %}
|
||||
<div class="row">
|
||||
{% for s in statuses %}
|
||||
<div class="col-12 col-md-6 mb-4">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ s.consent_type }}</h5>
|
||||
<p class="card-text">
|
||||
Status: <span class="badge {% if s.status == 'CONSENTED' %}bg-success{% elif s.status == 'RENEWAL_REQUIRED' %}bg-warning text-dark{% else %}bg-danger{% endif %}">{{ s.status }}</span>
|
||||
</p>
|
||||
<p class="card-text small text-muted">Active version: {{ s.active_version or 'n/a' }}, Last accepted: {{ s.last_version or 'n/a' }}</p>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="button" class="btn btn-outline-secondary btn-view-consent"
|
||||
data-consent-type="{{ s.consent_type }}" data-version="{{ s.active_version }}"
|
||||
data-url="{{ prefixed_url_for('user_bp.view_consent_markdown', consent_type=s.consent_type, version=s.active_version) }}"
|
||||
{% if not s.active_version %}disabled{% endif %}>
|
||||
Bekijk document
|
||||
</button>
|
||||
{% if s.status != 'CONSENTED' %}
|
||||
<form method="post" action="{{ prefixed_url_for('user_bp.accept_tenant_consent', tenant_id=tenant_id, consent_type=s.consent_type) }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" class="btn btn-primary">I agree</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<span class="text-success align-self-center">Up to date</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-info">No consent status information available.</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Consent document viewer moved into main content -->
|
||||
<div class="container mt-4" id="consent-viewer-section" style="display:none;">
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>Document viewer:</strong>
|
||||
<span id="viewer-type"></span>
|
||||
<span class="text-muted">version</span>
|
||||
<span id="viewer-version"></span>
|
||||
</div>
|
||||
<div id="viewer-loading" class="text-muted" style="display:none;">Loading...</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="consent-document-viewer" class="markdown-body"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
60
eveai_app/templates/user/tenant_consent_renewal.html
Normal file
60
eveai_app/templates/user/tenant_consent_renewal.html
Normal file
@@ -0,0 +1,60 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Consent Renewal{% endblock %}
|
||||
{% block content_title %}Consent Renewal{% endblock %}
|
||||
{% block content_description %}Renew consents that require attention{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
{% if statuses and statuses|length > 0 %}
|
||||
<div class="alert alert-warning">Some consents need renewal. Please review and accept the latest version.</div>
|
||||
<div class="row">
|
||||
{% for s in statuses %}
|
||||
<div class="col-12 col-md-6 mb-4">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ s.consent_type }}</h5>
|
||||
<p class="card-text">
|
||||
Status: <span class="badge {% if s.status == 'RENEWAL_REQUIRED' %}bg-warning text-dark{% else %}bg-danger{% endif %}">{{ s.status }}</span>
|
||||
</p>
|
||||
<p class="card-text small text-muted">Active version: {{ s.active_version or 'n/a' }}, Last accepted: {{ s.last_version or 'n/a' }}</p>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="button" class="btn btn-outline-secondary btn-view-consent"
|
||||
data-consent-type="{{ s.consent_type }}" data-version="{{ s.active_version }}"
|
||||
data-url="{{ prefixed_url_for('user_bp.view_consent_markdown', consent_type=s.consent_type, version=s.active_version) }}"
|
||||
{% if not s.active_version %}disabled{% endif %}>
|
||||
Bekijk document
|
||||
</button>
|
||||
<form method="post" action="{{ prefixed_url_for('user_bp.accept_tenant_consent', tenant_id=tenant_id, consent_type=s.consent_type) }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" class="btn btn-primary">Renew and accept</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-success">All consents are up to date.</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Consent document viewer moved into main content -->
|
||||
<div class="container mt-4" id="consent-viewer-section" style="display:none;">
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>Document viewer:</strong>
|
||||
<span id="viewer-type"></span>
|
||||
<span class="text-muted">version</span>
|
||||
<span id="viewer-version"></span>
|
||||
</div>
|
||||
<div id="viewer-loading" class="text-muted" style="display:none;">Loading...</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="consent-document-viewer" class="markdown-body"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
59
eveai_app/templates/user/tenant_consents_overview.html
Normal file
59
eveai_app/templates/user/tenant_consents_overview.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Tenant Consents Overview{% endblock %}
|
||||
{% block content_title %}Tenant Consents Overview{% endblock %}
|
||||
{% block content_description %}Manage consents for this tenant{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{% for s in statuses %}
|
||||
<div class="col-12 col-md-6 mb-4">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ s.consent_type }}</h5>
|
||||
<p class="card-text">
|
||||
Status: <span class="badge {% if s.status == 'CONSENTED' %}bg-success{% elif s.status == 'RENEWAL_REQUIRED' %}bg-warning text-dark{% else %}bg-danger{% endif %}">{{ s.status }}</span>
|
||||
</p>
|
||||
<p class="card-text small text-muted">Active version: {{ s.active_version or 'n/a' }}, Last accepted: {{ s.last_version or 'n/a' }}</p>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="button" class="btn btn-outline-secondary btn-view-consent"
|
||||
data-consent-type="{{ s.consent_type }}" data-version="{{ s.active_version }}"
|
||||
data-url="{{ prefixed_url_for('user_bp.view_consent_markdown', consent_type=s.consent_type, version=s.active_version) }}"
|
||||
{% if not s.active_version %}disabled{% endif %}>
|
||||
Bekijk document
|
||||
</button>
|
||||
{% if s.status != 'CONSENTED' %}
|
||||
<form method="post" action="{{ prefixed_url_for('user_bp.accept_tenant_consent', tenant_id=tenant_id, consent_type=s.consent_type) }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" class="btn btn-primary">Accept on behalf</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<span class="text-success align-self-center">Up to date</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- Consent document viewer moved into main content -->
|
||||
<div class="container mt-4" id="consent-viewer-section" style="display:none;">
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>Document viewer:</strong>
|
||||
<span id="viewer-type"></span>
|
||||
<span class="text-muted">version</span>
|
||||
<span id="viewer-version"></span>
|
||||
</div>
|
||||
<div id="viewer-loading" class="text-muted" style="display:none;">Loading...</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="consent-document-viewer" class="markdown-body"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user