From 49bda926c66b1b405fc3911f35fe3d3d4e5a6eb8 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 9 Aug 2020 15:31:38 +0200 Subject: [PATCH] Disable turbolinks for pages that require custom JS, like calendars or autocomplete fields --- apps/note/tables.py | 5 ++++- apps/wei/tables.py | 3 ++- templates/activity/activity_info.html | 4 ++-- templates/activity/activity_list.html | 2 +- templates/member/club_info.html | 4 ++-- templates/member/club_list.html | 2 +- templates/note/transactiontemplate_list.html | 2 +- templates/wei/bus_tables.html | 4 ++-- templates/wei/busteam_tables.html | 4 ++-- templates/wei/weiclub_info.html | 8 ++++---- templates/wei/weiclub_tables.html | 6 +++--- templates/wei/weimembership_form.html | 2 +- 12 files changed, 25 insertions(+), 21 deletions(-) diff --git a/apps/note/tables.py b/apps/note/tables.py index 505e8dfa..f0e4469a 100644 --- a/apps/note/tables.py +++ b/apps/note/tables.py @@ -156,7 +156,10 @@ class ButtonTable(tables.Table): edit = tables.LinkColumn('note:template_update', args=[A('pk')], attrs={'td': {'class': 'col-sm-1'}, - 'a': {'class': 'btn btn-sm btn-primary'}}, + 'a': { + 'class': 'btn btn-sm btn-primary', + 'data-turbolinks': 'false', + }}, text=_('edit'), accessor='pk', verbose_name=_("Edit"),) diff --git a/apps/wei/tables.py b/apps/wei/tables.py index a1d982cd..a963ba0e 100644 --- a/apps/wei/tables.py +++ b/apps/wei/tables.py @@ -47,7 +47,8 @@ class WEIRegistrationTable(tables.Table): text=_("Edit"), attrs={ 'a': { - 'class': 'btn btn-warning' + 'class': 'btn btn-warning', + 'data-turbolinks': 'false', } } ) diff --git a/templates/activity/activity_info.html b/templates/activity/activity_info.html index 4eb6dd29..ca2988b5 100644 --- a/templates/activity/activity_info.html +++ b/templates/activity/activity_info.html @@ -68,10 +68,10 @@ {% if activity.valid %}{% trans "invalidate"|capfirst %}{% else %}{% trans "validate"|capfirst %}{% endif %} {% endif %} {% if ".change_"|has_perm:activity %} - {% trans "edit"|capfirst %} + {% trans "edit"|capfirst %} {% endif %} {% if activity.activity_type.can_invite and not activity_started %} - {% trans "Invite" %} + {% trans "Invite" %} {% endif %} {% endif %} diff --git a/templates/activity/activity_list.html b/templates/activity/activity_list.html index bf1d846b..3c2add37 100644 --- a/templates/activity/activity_list.html +++ b/templates/activity/activity_list.html @@ -19,7 +19,7 @@ {% endif %} - {% trans 'New activity' %} + {% trans 'New activity' %}
diff --git a/templates/member/club_info.html b/templates/member/club_info.html index e7974f77..8dcf5baa 100644 --- a/templates/member/club_info.html +++ b/templates/member/club_info.html @@ -61,10 +61,10 @@ {% if not club.weiclub %}
diff --git a/templates/note/transactiontemplate_list.html b/templates/note/transactiontemplate_list.html index 793b2278..dc1f9d0c 100644 --- a/templates/note/transactiontemplate_list.html +++ b/templates/note/transactiontemplate_list.html @@ -7,7 +7,7 @@
diff --git a/templates/wei/bus_tables.html b/templates/wei/bus_tables.html index f0df7e44..46509d8d 100644 --- a/templates/wei/bus_tables.html +++ b/templates/wei/bus_tables.html @@ -12,8 +12,8 @@
diff --git a/templates/wei/busteam_tables.html b/templates/wei/busteam_tables.html index c3e53bf7..433405b8 100644 --- a/templates/wei/busteam_tables.html +++ b/templates/wei/busteam_tables.html @@ -12,8 +12,8 @@ diff --git a/templates/wei/weiclub_info.html b/templates/wei/weiclub_info.html index 4af6afa0..99c57e28 100644 --- a/templates/wei/weiclub_info.html +++ b/templates/wei/weiclub_info.html @@ -59,16 +59,16 @@ {% endif %} {% if club.is_current_wei %} {% if can_add_first_year_member %} - {% trans "Register 1A" %} + {% trans "Register 1A" %} {% endif %} {% if can_add_any_member %} - {% trans "Register 2A+" %} + {% trans "Register 2A+" %} {% endif %} {% if "wei.change_"|has_perm:club %} - {% trans "Edit" %} + {% trans "Edit" %} {% endif %} {% if can_add_bus %} - {% trans "Add bus" %} + {% trans "Add bus" %} {% endif %} {% url 'wei:wei_detail' club.pk as club_detail_url %} {%if request.path_info != club_detail_url %} diff --git a/templates/wei/weiclub_tables.html b/templates/wei/weiclub_tables.html index a8d02dcb..20887384 100644 --- a/templates/wei/weiclub_tables.html +++ b/templates/wei/weiclub_tables.html @@ -13,11 +13,11 @@ {% endif %} diff --git a/templates/wei/weimembership_form.html b/templates/wei/weimembership_form.html index 1e26414b..b19353c1 100644 --- a/templates/wei/weimembership_form.html +++ b/templates/wei/weimembership_form.html @@ -125,7 +125,7 @@