mirror of
https://github.com/ae-utbm/sith.git
synced 2025-04-16 02:50:22 +00:00
Add consent form for eurok partnership
This commit is contained in:
parent
77853b808a
commit
3431fbf2d1
@ -227,6 +227,19 @@ class FormerSubscriberMixin(AccessMixin):
|
|||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
class IsSubscriberMixin(AccessMixin):
|
||||||
|
"""Check if the user is a subscriber.
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
PermissionDenied: if the user isn't subscribed.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def dispatch(self, request, *args, **kwargs):
|
||||||
|
if not request.user.is_subscribed:
|
||||||
|
raise PermissionDenied
|
||||||
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class PermissionOrAuthorRequiredMixin(PermissionRequiredMixin):
|
class PermissionOrAuthorRequiredMixin(PermissionRequiredMixin):
|
||||||
"""Require that the user has the required perm or is the object author.
|
"""Require that the user has the required perm or is the object author.
|
||||||
|
|
||||||
|
@ -95,23 +95,36 @@
|
|||||||
<div class="category-header">
|
<div class="category-header">
|
||||||
<h3 class="margin-bottom">{% trans %}Eurockéennes 2025 partnership{% endtrans %}</h3>
|
<h3 class="margin-bottom">{% trans %}Eurockéennes 2025 partnership{% endtrans %}</h3>
|
||||||
{% if user.is_subscribed %}
|
{% if user.is_subscribed %}
|
||||||
<a
|
<div id="eurok-partner" style="
|
||||||
title="Logiciel billetterie en ligne"
|
min-height: 600px;
|
||||||
href="https://widget.weezevent.com/ticket/6ef65533-f5b0-4571-9d21-1f1bc63921f0?id_evenement=1211855&locale=fr-FR&code=34146"
|
background-color: lightgrey;
|
||||||
class="weezevent-widget-integration"
|
display: flex;
|
||||||
target="_blank"
|
justify-content: center;
|
||||||
data-src="https://widget.weezevent.com/ticket/6ef65533-f5b0-4571-9d21-1f1bc63921f0?id_evenement=1211855&locale=fr-FR&code=34146"
|
align-items: center;
|
||||||
data-width="650"
|
flex-direction: column;
|
||||||
data-height="600"
|
gap: 10px;
|
||||||
data-resize="1"
|
">
|
||||||
data-nopb="0"
|
<p style="text-align: center;">
|
||||||
data-type="neo"
|
{% trans trimmed %}
|
||||||
data-width_auto="1"
|
Our partner uses Weezevent to sell tickets.
|
||||||
data-noscroll="0"
|
Weezevent may collect user info according to
|
||||||
data-id="1211855">
|
it's own privacy policy.
|
||||||
Billetterie Weezevent
|
By clicking the accept button you consent to
|
||||||
</a>
|
their terms of services.
|
||||||
<script type="text/javascript" src="https://widget.weezevent.com/weez.js" async defer></script>
|
{% endtrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="https://weezevent.com/fr/politique-de-confidentialite/">{% trans %}Privacy policy{% endtrans %}</a>
|
||||||
|
|
||||||
|
<button
|
||||||
|
hx-get="{{ url("eboutic:eurok") }}"
|
||||||
|
hx-target="#eurok-partner"
|
||||||
|
hx-swap="outerHTML"
|
||||||
|
hx-trigger="click, load[document.cookie.includes('weezevent_accept=true')]"
|
||||||
|
@htmx:after-request="document.cookie = 'weezevent_accept=true'"
|
||||||
|
>{% trans %}Accept{% endtrans %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
{%- trans trimmed %}
|
{%- trans trimmed %}
|
||||||
|
17
eboutic/templates/eboutic/eurok_fragment.jinja
Normal file
17
eboutic/templates/eboutic/eurok_fragment.jinja
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<a
|
||||||
|
title="Logiciel billetterie en ligne"
|
||||||
|
href="https://widget.weezevent.com/ticket/6ef65533-f5b0-4571-9d21-1f1bc63921f0?id_evenement=1211855&locale=fr-FR&code=34146"
|
||||||
|
class="weezevent-widget-integration"
|
||||||
|
target="_blank"
|
||||||
|
data-src="https://widget.weezevent.com/ticket/6ef65533-f5b0-4571-9d21-1f1bc63921f0?id_evenement=1211855&locale=fr-FR&code=34146"
|
||||||
|
data-width="650"
|
||||||
|
data-height="600"
|
||||||
|
data-resize="1"
|
||||||
|
data-nopb="0"
|
||||||
|
data-type="neo"
|
||||||
|
data-width_auto="1"
|
||||||
|
data-noscroll="0"
|
||||||
|
data-id="1211855">
|
||||||
|
Billetterie Weezevent
|
||||||
|
</a>
|
||||||
|
<script type="text/javascript" src="https://widget.weezevent.com/weez.js" async defer></script>
|
@ -29,6 +29,7 @@ from eboutic.views import (
|
|||||||
BillingInfoFormFragment,
|
BillingInfoFormFragment,
|
||||||
EbouticCommand,
|
EbouticCommand,
|
||||||
EtransactionAutoAnswer,
|
EtransactionAutoAnswer,
|
||||||
|
EurokPartnerFragment,
|
||||||
eboutic_main,
|
eboutic_main,
|
||||||
pay_with_sith,
|
pay_with_sith,
|
||||||
payment_result,
|
payment_result,
|
||||||
@ -43,6 +44,7 @@ urlpatterns = [
|
|||||||
path("billing-infos/", BillingInfoFormFragment.as_view(), name="billing_infos"),
|
path("billing-infos/", BillingInfoFormFragment.as_view(), name="billing_infos"),
|
||||||
path("pay/sith/", pay_with_sith, name="pay_with_sith"),
|
path("pay/sith/", pay_with_sith, name="pay_with_sith"),
|
||||||
path("pay/<res:result>/", payment_result, name="payment_result"),
|
path("pay/<res:result>/", payment_result, name="payment_result"),
|
||||||
|
path("eurok/", EurokPartnerFragment.as_view(), name="eurok"),
|
||||||
path(
|
path(
|
||||||
"et_autoanswer",
|
"et_autoanswer",
|
||||||
EtransactionAutoAnswer.as_view(),
|
EtransactionAutoAnswer.as_view(),
|
||||||
|
@ -45,6 +45,7 @@ from django.views.decorators.http import require_GET, require_POST
|
|||||||
from django.views.generic import TemplateView, UpdateView, View
|
from django.views.generic import TemplateView, UpdateView, View
|
||||||
from django_countries.fields import Country
|
from django_countries.fields import Country
|
||||||
|
|
||||||
|
from core.auth.mixins import IsSubscriberMixin
|
||||||
from core.views.mixins import FragmentMixin, UseFragmentsMixin
|
from core.views.mixins import FragmentMixin, UseFragmentsMixin
|
||||||
from counter.forms import BillingInfoForm
|
from counter.forms import BillingInfoForm
|
||||||
from counter.models import BillingInfo, Counter, Customer, Product
|
from counter.models import BillingInfo, Counter, Customer, Product
|
||||||
@ -99,6 +100,10 @@ def payment_result(request, result: str) -> HttpResponse:
|
|||||||
return render(request, "eboutic/eboutic_payment_result.jinja", context)
|
return render(request, "eboutic/eboutic_payment_result.jinja", context)
|
||||||
|
|
||||||
|
|
||||||
|
class EurokPartnerFragment(IsSubscriberMixin, TemplateView):
|
||||||
|
template_name = "eboutic/eurok_fragment.jinja"
|
||||||
|
|
||||||
|
|
||||||
class BillingInfoFormFragment(
|
class BillingInfoFormFragment(
|
||||||
LoginRequiredMixin, FragmentMixin, SuccessMessageMixin, UpdateView
|
LoginRequiredMixin, FragmentMixin, SuccessMessageMixin, UpdateView
|
||||||
):
|
):
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2025-04-13 00:18+0200\n"
|
"POT-Creation-Date: 2025-04-14 01:16+0200\n"
|
||||||
"PO-Revision-Date: 2016-07-18\n"
|
"PO-Revision-Date: 2016-07-18\n"
|
||||||
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
|
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
|
||||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||||
@ -3812,6 +3812,25 @@ msgstr "cette page"
|
|||||||
msgid "Eurockéennes 2025 partnership"
|
msgid "Eurockéennes 2025 partnership"
|
||||||
msgstr "Partenariat Eurockéennes 2025"
|
msgstr "Partenariat Eurockéennes 2025"
|
||||||
|
|
||||||
|
#: eboutic/templates/eboutic/eboutic_main.jinja
|
||||||
|
msgid ""
|
||||||
|
"Our partner uses Weezevent to sell tickets. Weezevent may collect user info "
|
||||||
|
"according to it's own privacy policy. By clicking the accept button you "
|
||||||
|
"consent to their terms of services."
|
||||||
|
msgstr ""
|
||||||
|
"Notre partenaire utilises Wezevent pour vendre ses billets. Weezevent peut collecter des informatinos utilisateur "
|
||||||
|
"conformément à sa propre politique de confidentialité. En cliquant sur le bouton d'acceptation vous "
|
||||||
|
"consentez à leurs termes de service."
|
||||||
|
|
||||||
|
#: eboutic/templates/eboutic/eboutic_main.jinja
|
||||||
|
msgid "Privacy policy"
|
||||||
|
msgstr "Politique de confidentialité"
|
||||||
|
|
||||||
|
#: eboutic/templates/eboutic/eboutic_main.jinja
|
||||||
|
#: trombi/templates/trombi/comment_moderation.jinja
|
||||||
|
msgid "Accept"
|
||||||
|
msgstr "Accepter"
|
||||||
|
|
||||||
#: eboutic/templates/eboutic/eboutic_main.jinja
|
#: eboutic/templates/eboutic/eboutic_main.jinja
|
||||||
msgid ""
|
msgid ""
|
||||||
"You must be subscribed to benefit from the partnership with the Eurockéennes."
|
"You must be subscribed to benefit from the partnership with the Eurockéennes."
|
||||||
@ -5386,10 +5405,6 @@ msgstr "fin"
|
|||||||
msgid "Moderate Trombi comments"
|
msgid "Moderate Trombi comments"
|
||||||
msgstr "Modérer les commentaires du Trombi"
|
msgstr "Modérer les commentaires du Trombi"
|
||||||
|
|
||||||
#: trombi/templates/trombi/comment_moderation.jinja
|
|
||||||
msgid "Accept"
|
|
||||||
msgstr "Accepter"
|
|
||||||
|
|
||||||
#: trombi/templates/trombi/comment_moderation.jinja
|
#: trombi/templates/trombi/comment_moderation.jinja
|
||||||
msgid "Reject"
|
msgid "Reject"
|
||||||
msgstr "Refuser"
|
msgstr "Refuser"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user