Fix not showing filename next to upload buttons

This commit is contained in:
Stephen Abello
2021-02-16 15:35:05 +01:00
parent 6879cd762c
commit 5e56a08768
2 changed files with 3 additions and 1 deletions

View File

@@ -9,9 +9,11 @@
<span class="ibo-button ibo-is-regular ibo-is-primary">
{{ oUIBlock.GetButtonText() }}
</span>
{% if oUIBlock.GetShowFilename() %}
<span id="{{ oUIBlock.GetId() }}-file-name" class="ibo-input-file-select--file-name">
{{ oUIBlock.GetFileName() }}
</span>
{% endif %}
</label>
</div>
{% endapply %}

View File

@@ -1,6 +1,6 @@
{# @copyright Copyright (C) 2010-2021 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% if oUIBlock.GetShowFilename() == true %}
{% if oUIBlock.GetShowFilename() %}
$('#{{ oUIBlock.GetId() }}').bind('change', function() {
var fileName = $(this).val().replace(/^.*[\\\/]/, '');
$('#{{ oUIBlock.GetId() }}-file-name').html(fileName);