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

ClearableFileInput widget doesn't handle initial_text, input_text and clear_checkbox_label #169

ghost opened this Issue Apr 1, 2016 · 1 comment


None yet
1 participant

ghost commented Apr 1, 2016

According to the docs you should be able to override the mentioned attributes, however setting them has no effect.

This is what I've done

class CustomClearableFileInput(floppy.ClearableFileInput):
    """Override template on ClearableFileInput.
    clear_checkbox_label = 'Remove custom cover'

but the output shows the default text. As far as I can see ClearableFileInput doesn't actually use these attributes, despite the documentation saying:

The initial_text, input_text and clear_checkbox_label attributes are provided in the template context.

I've also tried:

custom_background = forms.ImageField(
                'accept': ','.join(settings.ALLOWED_IMAGE_TYPES),
                'clear_checkbox_label': 'Remove custom cover'}

gregmuellegger added a commit that referenced this issue Apr 19, 2016


This comment has been minimized.


gregmuellegger commented Apr 19, 2016

Hi, thanks for the report. I've added the labels as documented and released 1.6.2 that contains the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment