Opened 12 years ago
Closed 12 years ago
#19464 closed New feature (fixed)
The markup for ClearableFileInput's link should be a widget template string
Reported by: | Ruy Asan | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.5-beta-1 |
Severity: | Normal | Keywords: | widget ClearableFileInput |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
ClearableFileInput
already makes great use of class attribute to let us customize various templates and wording details, except, notably (and sadly) the markup for the actual link.
This could easily be made to fall in line with the other templates, and covers the fairly common use case of wanting a more appropriate inline preview (e.g. img
tags for ImageField
widgets).
Attachments (1)
Change History (7)
by , 12 years ago
Attachment: | url_markup_template.diff added |
---|
comment:1 by , 12 years ago
Has patch: | set |
---|
comment:2 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → New feature |
comment:3 by , 12 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
comment:4 by , 12 years ago
Err... as far as as I can tell, this is an internal implementation detail that is only relevant when sub-classing - it's not really documented for any of the other widgets.
Nor is this change specifically testable - unless you mean this breaks an existing test (which I didn't think it did...)
comment:5 by , 12 years ago
Needs documentation: | unset |
---|---|
Needs tests: | unset |
I agree that this is an internal refactoring for better subclassability and does not require new tests, only that all existing tests pass.
A case could be made that if we're refactoring widget implementations specifically to make them more easily subclassable, we should also document those class attributes intended for overriding; otherwise we're encouraging reliance on undocumented implementation details. I don't feel strongly enough about that to block this going in, though.
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
have a patch why not