Skip to content

Commit

Permalink
fix: remove extra brace in generated HTML of data-max-filesize attrib…
Browse files Browse the repository at this point in the history
…ute (#1502)
  • Loading branch information
fabien-michel authored Oct 16, 2024
1 parent 735f728 commit efa9892
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions filer/templates/admin/filer/folder/directory_listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ <h2>&nbsp;</h2>
data-url="{% url 'admin:filer-ajax_upload' folder_id=folder.id %}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
>
{% trans "Upload Files" %}
</a>
Expand All @@ -223,7 +223,7 @@ <h2>&nbsp;</h2>
data-url="{% url 'admin:filer-ajax_upload' %}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}
>
{% trans "Upload Files" %}
</a>
Expand Down
4 changes: 2 additions & 2 deletions filer/templates/admin/filer/folder/directory_table_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<table class="js-filer-dropzone js-filer-dropzone-base navigator-table" id="result_list" data-url="{% if folder.id %}{% url 'admin:filer-ajax_upload' folder_id=folder.id %}{% else %}{% url 'admin:filer-ajax_upload' %}{% endif %}" data-folder-name="{% if folder.is_root %}{% translate 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
<thead>
<tr>
<th class="column-checkbox">
Expand Down Expand Up @@ -170,7 +170,7 @@
data-folder-name="{% if folder.is_root %}{% trans 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>

<div class="icon"><span class="filer-icon filer-upload fa fa-cloud-upload"></span></div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="js-filer-dropzone js-filer-dropzone-base navigator-list" id="result_list" data-url="{% if folder.id %}{% url 'admin:filer-ajax_upload' folder_id=folder.id %}{% else %}{% url 'admin:filer-ajax_upload' %}{% endif %}" data-folder-name="{% if folder.is_root %}{% translate 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}" data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>

<input type="checkbox" id="all-items-action-toggle">

Expand Down Expand Up @@ -43,7 +43,7 @@
data-folder-name="{{ subfolder.name }}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>

<div class="navigator-checkbox">
{% if filer_admin_context.pick_folder and item.file_type == 'Folder' %}
Expand Down Expand Up @@ -146,7 +146,7 @@
data-folder-name="{% if folder.is_root %}{% trans 'Unsorted Uploads' %}{% else %}{{ folder.name }}{% endif %}"
data-max-uploader-connections="{{ uploader_connections }}"
data-max-files="{{ max_files|safe }}"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
<div class="icon"><span class="filer-icon filer-icon-upload fa fa-cloud-upload"></span></div>

<div class="filer-dropzone-upload-welcome js-filer-dropzone-upload-welcome">
Expand Down
2 changes: 1 addition & 1 deletion filer/templates/admin/filer/widgets/admin_file.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="js-filer-dropzone filer-dropzone{% if object %} js-object-attached{% endif %}"
data-url="{% url 'admin:filer-ajax_upload' %}"
data-max-files="1"
{% if max_filesize %}}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
{% if max_filesize %}data-max-filesize="{{ max_filesize|safe }}"{% endif %}>
<div class="z-index-fix"></div>
<div class="dz-default dz-message js-filer-dropzone-message{% if object %} hidden{% endif %}">
<span class="icon filer-icon filer-icon-arrow-down fa fa-arrow-down"></span><span>{% translate "or drop your file here" %}</span>
Expand Down

0 comments on commit efa9892

Please sign in to comment.