kopia lustrzana https://github.com/wagtail/wagtail
Remove inline scripts that re-declare wagtailConfig.ACTIVE_CONTENT_LOCALE
This will now be set in one place centrally (admin_tags)pull/11166/head
rodzic
fa8fdaf72d
commit
ee1cb9108a
|
@ -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 %}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Ładowanie…
Reference in New Issue