Skip to content

Commit f32742c

Browse files
committed
Fix: only load metadata-converter.js when file-upload is enabled
1 parent 1e9ff56 commit f32742c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/admin/templates/metadata_converter.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{% for type, text in output -%}
3535
{%- if text -%}
3636
<div class="code-box">
37-
<div class="code-box-title">
37+
<div id="metadata{{ loop.index }}" class="code-box-title">
3838
<h3>{{ type }}</h3>
3939
<button data-clipboard-target="#metadata{{ loop.index }}" id="btn{{ loop.index }}" class="pure-button right clipboard-btn copy">
4040
<i class="fa fa-copy"></i>
@@ -59,5 +59,7 @@
5959
{% endif -%}
6060
{% endblock content -%}
6161
{% block postload %}
62+
{% if upload %}
6263
<script src="{{ asset('js/metadata-converter.js', 'admin') }}"></script>
64+
{% endif %}
6365
{% endblock postload %}

0 commit comments

Comments
 (0)