Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove extra brace in generated HTML of data-max-filesize attribute #1502

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading