finishing
This commit is contained in:
parent
b66a9d0d2c
commit
41a5ed92f1
5 changed files with 62 additions and 60 deletions
|
|
@ -67,8 +67,8 @@
|
|||
display: none;
|
||||
}
|
||||
.footer {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
backdrop-filter: blur(10px);
|
||||
background: transparent;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
.footer-links a {
|
||||
font-size: 0.9rem;
|
||||
|
|
@ -83,6 +83,13 @@
|
|||
.footer-text a:hover {
|
||||
color: #667eea !important;
|
||||
}
|
||||
.footer-text a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.footer-text {
|
||||
font-size: 0.8rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.legal-content {
|
||||
text-align: left;
|
||||
line-height: 1.6;
|
||||
|
|
@ -98,6 +105,9 @@
|
|||
.legal-content ul {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.main-container {
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
|
|
@ -108,7 +118,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer mt-5 pt-4 border-top">
|
||||
<footer class="footer mt-5 pt-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="text-center">
|
||||
<h1 class="title display-4">Datenschutzerklärung</h1>
|
||||
<h1 class="title display-4">
|
||||
<a href="/" class="text-decoration-none text-dark">Fragify</a>
|
||||
</h1>
|
||||
<h2 class="text-muted h4 mt-3">Datenschutzerklärung</h2>
|
||||
</div>
|
||||
|
||||
<div class="legal-content">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="text-center">
|
||||
<h1 class="title display-4">Impressum</h1>
|
||||
<h1 class="title display-4">
|
||||
<a href="/" class="text-decoration-none text-dark">Fragify</a>
|
||||
</h1>
|
||||
<h2 class="text-muted h4 mt-3">Impressum</h2>
|
||||
</div>
|
||||
|
||||
<div class="legal-content">
|
||||
|
|
|
|||
|
|
@ -41,12 +41,10 @@
|
|||
|
||||
<div id="result" class="mt-4" style="display: none;">
|
||||
<h5 class="text-success mb-3">Link erfolgreich generiert!</h5>
|
||||
<div class="result-link">
|
||||
<a href="" id="generatedLink" target="_blank"></a>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="generatedLinkInput" readonly>
|
||||
<button class="btn btn-outline-primary" type="button" id="copyBtn">In Zwischenablage</button>
|
||||
</div>
|
||||
<button class="btn btn-outline-primary mt-3" onclick="copyToClipboard()">
|
||||
Link kopieren
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -72,14 +70,14 @@
|
|||
processResults: function(data, params) {
|
||||
params.page = params.page || 1;
|
||||
return {
|
||||
results: data.results.map(function(item) {
|
||||
results: data.objects.map(function(item) {
|
||||
return {
|
||||
id: item.id,
|
||||
text: item.name + ' (' + item.jurisdiction + ')'
|
||||
text: item.name + ' (' + item.jurisdiction.name + ')'
|
||||
};
|
||||
}),
|
||||
pagination: {
|
||||
more: data.next !== null
|
||||
more: data.meta.next !== null
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
@ -87,52 +85,41 @@
|
|||
}
|
||||
});
|
||||
|
||||
// Handle form submission
|
||||
// Handle form submission (client-side)
|
||||
$('#fragifyForm').on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const formData = new FormData(this);
|
||||
const submitBtn = $('button[type="submit"]');
|
||||
const btnText = submitBtn.find('.btn-text');
|
||||
const loading = submitBtn.find('.loading');
|
||||
|
||||
// Show loading state
|
||||
btnText.hide();
|
||||
loading.show();
|
||||
submitBtn.prop('disabled', true);
|
||||
|
||||
fetch('/', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
$('#generatedLink').attr('href', data.link).text(data.link);
|
||||
$('#result').show();
|
||||
$('#fragifyForm')[0].reset();
|
||||
$('#publicbody').val(null).trigger('change');
|
||||
} else {
|
||||
alert('Fehler: ' + data.error);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Fehler beim Generieren des Links: ' + error);
|
||||
})
|
||||
.finally(() => {
|
||||
// Hide loading state
|
||||
btnText.show();
|
||||
loading.hide();
|
||||
submitBtn.prop('disabled', false);
|
||||
|
||||
const publicbodyId = $('#publicbody').val() || '';
|
||||
const subject = $('#subject').val() || '';
|
||||
const body = $('#body').val() || '';
|
||||
|
||||
let link = 'https://fragdenstaat.de/anfrage-stellen/';
|
||||
if (publicbodyId) {
|
||||
link += `an/${publicbodyId}/`;
|
||||
}
|
||||
|
||||
const params = new URLSearchParams();
|
||||
if (subject) params.set('subject', subject);
|
||||
if (body) params.set('body', body);
|
||||
|
||||
if ([...params].length > 0) {
|
||||
link += `?${params.toString()}`;
|
||||
}
|
||||
|
||||
$('#generatedLinkInput').val(link);
|
||||
$('#result').show();
|
||||
});
|
||||
|
||||
// Copy to clipboard
|
||||
$(document).on('click', '#copyBtn', function() {
|
||||
const link = $('#generatedLinkInput').val();
|
||||
navigator.clipboard.writeText(link).then(function() {
|
||||
const btn = $('#copyBtn');
|
||||
const originalText = btn.text();
|
||||
btn.text('Kopiert!');
|
||||
setTimeout(() => btn.text(originalText), 1500);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function copyToClipboard() {
|
||||
const link = document.getElementById('generatedLink').href;
|
||||
navigator.clipboard.writeText(link).then(function() {
|
||||
alert('Link wurde in die Zwischenablage kopiert!');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue