-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI og funktionalitet til at anonymisere personer og familier
- Loading branch information
1 parent
ff95955
commit e46fa9e
Showing
5 changed files
with
193 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
members/migrations/0064_family_anonymized_person_anonymized.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.2.17 on 2025-01-12 13:52 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("members", "0063_merge_20241229_1529"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="family", | ||
name="anonymized", | ||
field=models.BooleanField(default=False, verbose_name="Anonymiseret"), | ||
), | ||
migrations.AddField( | ||
model_name="person", | ||
name="anonymized", | ||
field=models.BooleanField(default=False, verbose_name="Anonymiseret"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{% extends "admin/base_site.html" %} | ||
{% load i18n admin_urls static admin_modify %} | ||
|
||
{% block extrahead %}{{ block.super }} | ||
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script> | ||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" /> | ||
{{mass_confirmation_form.media}} | ||
{{ media }} | ||
{% endblock %} | ||
|
||
{% block extrastyle %}{{ block.super }} | ||
<script type="text/javascript" src="{% static "admin/js/core.js" %}"></script> | ||
<script type="text/javascript" src="{% static "admin/js/vendor/jquery/jquery.min.js" %}"></script> | ||
<script type="text/javascript" src="{% static "admin/js/jquery.init.js" %}"></script> | ||
{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
<div class="breadcrumbs"> | ||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> | ||
› <a href="{% url 'admin:app_list' 'members' %}">Members</a> | ||
› <a href="">Personer</a> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content_title %}<h1>Anonymisér person(er)</h1>{% endblock %} | ||
|
||
{% block content %} | ||
<div id="content-main"> | ||
<form action="" method="post"> | ||
<div> | ||
<fieldset class="module aligned"> | ||
<h2>VIGTIGT!</h2> | ||
<div class="description"> | ||
<p><b>Du er ved at anonymisere én eller flere personer.</b></p> | ||
<p>Dette betyder at de fleste informationer om personen slettes, primært bevares information | ||
om vedkommendes kommune, således at der stadig vil kunne trækkes statistik ud senere.</p> | ||
</div> | ||
|
||
{% csrf_token %} | ||
<input type="hidden" name="action" value="anonymize_persons"> | ||
<input type="hidden" name="select_across" value="0"> | ||
<input type="hidden" name="index" value="0"> | ||
{% for obj in queryset %} | ||
<input type="hidden" name="_selected_action" value="{{ obj.pk }}" /> | ||
{% endfor %} | ||
|
||
<h2>Bekræft person(er)</h2> | ||
<div class="description"> | ||
<p>Følgende ({{persons.count}}) personer vil blive anonymiseret:</p> | ||
<p> | ||
<ul> | ||
{% for person in persons %} | ||
<li>{{person.name}}</li> | ||
{% endfor %} | ||
</ul> | ||
</p> | ||
<p style="color: red; font-weight: bold; font-size: large;">Dette kan ikke fortrydes!</p> | ||
</div> | ||
|
||
<div class="submit-row"> | ||
<input type="checkbox" id="id_confirmation" name="confirmation" value="1" required> | ||
<label name="confirmation" for="id_confirmation" style="width: unset">Jeg godkender at ovenstående personer anonymiseres</label> | ||
</input> | ||
</div> | ||
|
||
<div class="submit-row"> | ||
<p class="deletelink-box"><a href="#" id="abort" class="deletelink">Fortryd</a></p> | ||
<p><input class="default" style="background-color: rgb(199, 183, 0); color: black; float: right;" type="submit" value="Anonymisér"></p> | ||
</div> | ||
</fieldset> | ||
</div> | ||
</form> | ||
|
||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById("abort").addEventListener("click", () => { | ||
history.back(); | ||
}); | ||
</script> | ||
|
||
{% endblock %} |