Skip to content

Commit fdd4d64

Browse files
authored
fix: Allow copy with empty suffix (#1386)
* Fix #1377 * Fix: Allow empty suffix in admin copy * Add submit-row class * Fix; Cancel link too small if djangocms-admin-style is not present
1 parent 71d16ca commit fdd4d64

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

filer/admin/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CopyFilesAndFoldersForm(forms.Form, AsPWithHelpMixin):
2626
# overwrite_files = forms.BooleanField(required=False, help_text=_("Overwrite a file if there already exists a file with the same filename?"))
2727

2828
def clean_suffix(self):
29-
valid = get_valid_filename(self.cleaned_data['suffix'])
29+
valid = get_valid_filename(self.cleaned_data['suffix']) if self.cleaned_data['suffix'] else ""
3030
if valid != self.cleaned_data['suffix']:
3131
raise forms.ValidationError(_('Suffix should be a valid, simple and lowercase filename part, like "%(valid)s".') % {'valid': valid})
3232
return self.cleaned_data['suffix']

filer/private/sass/components/_base.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ body {
116116
padding: 20px 0 0;
117117
}
118118

119-
.delete-confirmation form .cancel-link {
119+
form .cancel-link {
120120
height: auto !important;
121121
line-height: inherit !important;
122+
padding: 10px 15px;
122123
}
123124

124125
.sr-only {

filer/static/filer/css/admin_filer.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

filer/static/filer/css/maps/admin_filer.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

filer/templates/admin/filer/folder/choose_copy_destination.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</p>
6161
{{ copy_form.as_p_with_help }}
6262

63-
<div class="text-right clearfix">
63+
<div class="submit-row text-right clearfix">
6464
<a href="#" onclick="window.history.back(); return false;" class="button cancel-link">{% translate "No, take me back" %}</a>
6565
<input type="submit" value="{% translate 'Copy' %}" class="default js-submit-copy-move">
6666
<span class="js-disabled-btn-tooltip disabled-btn-tooltip js-filer-tooltip filer-tooltip-wrapper"

0 commit comments

Comments
 (0)