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.
|
Additional js from widgets media. Allows for custom widgets in admin panel.
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
{{ media.js }}
|
{{ 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 %}
|
{% endblock %}
|
||||||
|
|
|
@ -61,14 +61,5 @@
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
{{ media.js }}
|
{{ 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" %}
|
{% include "wagtailadmin/shared/_workflow_init.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -17,16 +17,3 @@
|
||||||
</nav>
|
</nav>
|
||||||
</footer>
|
</footer>
|
||||||
{% endblock %}
|
{% 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 extra_js %}
|
||||||
{{ block.super }}
|
{{ 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 %}
|
{% if workflow_enabled %}
|
||||||
{% include "wagtailadmin/shared/_workflow_init.html" %}
|
{% include "wagtailadmin/shared/_workflow_init.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Ładowanie…
Reference in New Issue