forms: run file widget js code from widget template (#52046)
This commit is contained in:
parent
b250ecfa57
commit
5415020101
|
@ -361,9 +361,4 @@ $.WcsFileUpload = {
|
|||
$(base_widget).parents('form').find('div.buttons button').prop('disabled', true);
|
||||
var jqXHR = data.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('.file-upload-widget').each($.WcsFileUpload.prepare);
|
||||
});
|
||||
|
|
|
@ -37,4 +37,10 @@
|
|||
data-popup>{% trans "Use file from the portfolio" %}</span></p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('[data-field-id="{{ widget.field.id }}"]').each($.WcsFileUpload.prepare);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue