Remove inline scripts that re-declare wagtailConfig.ACTIVE_CONTENT_LOCALE

This will now be set in one place centrally (admin_tags)
pull/11166/head
LB Johnston 2024-09-19 20:42:54 +10:00 zatwierdzone przez Sage Abdullah
rodzic fa8fdaf72d
commit ee1cb9108a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
4 zmienionych plików z 0 dodań i 40 usunięć

Wyświetl plik

@ -59,13 +59,4 @@
Additional js from widgets media. Allows for custom widgets in admin panel.
{% endcomment %}
{{ media.js }}
<script>
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
// This value may be used by JS widgets on the form
{% if locale %}
window.wagtailConfig = window.wagtailConfig || {};
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
{% endif %}
</script>
{% endblock %}

Wyświetl plik

@ -61,14 +61,5 @@
{% endcomment %}
{{ media.js }}
<script>
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
// This value may be used by JS widgets on the form
{% if locale %}
window.wagtailConfig = window.wagtailConfig || {};
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
{% endif %}
</script>
{% include "wagtailadmin/shared/_workflow_init.html" %}
{% endblock %}

Wyświetl plik

@ -17,16 +17,3 @@
</nav>
</footer>
{% endblock %}
{% block extra_js %}
{{ block.super }}
<script>
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
// This value may be used by JS widgets on the form
{% if locale %}
window.wagtailConfig = window.wagtailConfig || {};
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
{% endif %}
</script>
{% endblock %}

Wyświetl plik

@ -22,15 +22,6 @@
{% block extra_js %}
{{ block.super }}
<script>
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
// This value may be used by JS widgets on the form
{% if locale %}
window.wagtailConfig = window.wagtailConfig || {};
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
{% endif %}
</script>
{% if workflow_enabled %}
{% include "wagtailadmin/shared/_workflow_init.html" %}
{% endif %}